Skip to content

Commit 7c4d7fa

Browse files
dependabot-preview[bot]TravisEz13
authored andcommitted
Bump alpine from 3.8 to 3.10.0 in /release/preview/alpine/dependabot (#244)
1 parent 14858bb commit 7c4d7fa

File tree

16 files changed

+235
-10
lines changed

16 files changed

+235
-10
lines changed

.dependabot/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 1
44

55
update_configs:
66
- package_manager: "docker"
7-
directory: "/release/preview/alpine/dependabot"
7+
directory: "/release/preview/alpine39/dependabot"
88
update_schedule: "daily"
99

1010
- package_manager: "docker"
@@ -16,7 +16,7 @@ update_configs:
1616
update_schedule: "daily"
1717

1818
- package_manager: "docker"
19-
directory: "/release/preview/fedora28/dependabot"
19+
directory: "/release/preview/fedora/dependabot"
2020
update_schedule: "daily"
2121

2222
- package_manager: "docker"

build.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -441,11 +441,11 @@ End {
441441
if($GenerateTagsYaml.IsPresent)
442442
{
443443
Write-Output "repos:"
444-
foreach($repo in $tagGroups.Keys)
444+
foreach($repo in $tagGroups.Keys | Sort-Object)
445445
{
446446
Write-Output " - repoName: $repo"
447447
Write-Output " tagGroups:"
448-
foreach($tag in $tagGroups.$repo)
448+
foreach($tag in $tagGroups.$repo | Sort-Object -Property dockerfile)
449449
{
450450
Write-Output " - tags: [$($tag.Tags -join ', ')]"
451451
Write-Output " osVersion: $($tag.osVersion)"
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Copyright (c) Microsoft Corporation. All rights reserved.
22
# Licensed under the MIT License.
33

4-
# return objects representing the tags we need to base the xenial image on
4+
# return objects representing the tags we need to base the Alpine image on
55

6-
# The versions of xenial we care about
6+
# The versions of Alpine we care about, for this dockerfile
77
$shortTags = @('3.8')
88

99
$parent = Join-Path -Path $PSScriptRoot -ChildPath '..'
1010
$repoRoot = Join-Path -path (Join-Path -Path $parent -ChildPath '..') -ChildPath '..'
1111
$modulePath = Join-Path -Path $repoRoot -ChildPath 'tools\getDockerTags'
1212
Import-Module $modulePath
1313

14-
Get-DockerTags -ShortTags $shortTags -Image "alpine" -FullTagFilter '^3.8$' -OnlyShortTags
14+
Get-DockerTags -ShortTags $shortTags -Image "alpine" -FullTagFilter '^3.\d$' -OnlyShortTags
File renamed without changes.

release/preview/alpine/dependabot/Dockerfile release/preview/alpine39/dependabot/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
# Dummy docker image to trigger dependabot PRs
55

6-
FROM alpine:3.8
6+
FROM alpine:3.10.0
+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
4+
# Docker image file that describes an Alpine3.x image with PowerShell installed from .tar.gz file(s)
5+
6+
# Define arg(s) needed for the From statement
7+
ARG fromTag=3.9
8+
ARG imageRepo=alpine
9+
10+
FROM ${imageRepo}:${fromTag} AS installer-env
11+
12+
# Define Args for the needed to add the package
13+
ARG PS_VERSION=6.2.0-preview.3
14+
ARG PS_PACKAGE=powershell-${PS_VERSION}-linux-alpine-x64.tar.gz
15+
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
16+
ARG PS_INSTALL_VERSION=7-preview
17+
18+
# Download the Linux tar.gz and save it
19+
ADD ${PS_PACKAGE_URL} /tmp/linux.tar.gz
20+
21+
# define the folder we will be installing PowerShell to
22+
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION
23+
24+
# Create the install folder
25+
RUN mkdir -p ${PS_INSTALL_FOLDER}
26+
27+
# Unzip the Linux tar.gz
28+
RUN tar zxf /tmp/linux.tar.gz -C ${PS_INSTALL_FOLDER}
29+
30+
# Start a new stage so we lose all the tar.gz layers from the final image
31+
FROM ${imageRepo}:${fromTag}
32+
33+
# Copy only the files we need from the previous stage
34+
COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"]
35+
36+
# Define Args and Env needed to create links
37+
ARG PS_INSTALL_VERSION=7-preview
38+
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
39+
\
40+
# Define ENVs for Localization/Globalization
41+
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
42+
LC_ALL=en_US.UTF-8 \
43+
LANG=en_US.UTF-8 \
44+
# set a fixed location for the Module analysis cache
45+
PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache
46+
47+
# Install dotnet dependencies and ca-certificates
48+
RUN apk add --no-cache \
49+
ca-certificates \
50+
less \
51+
\
52+
# PSReadline/console dependencies
53+
ncurses-terminfo-base \
54+
\
55+
# .NET Core dependencies
56+
krb5-libs \
57+
libgcc \
58+
libintl \
59+
libssl1.1 \
60+
libstdc++ \
61+
tzdata \
62+
userspace-rcu \
63+
zlib \
64+
icu-libs \
65+
&& apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache \
66+
lttng-ust \
67+
\
68+
# Create the pwsh symbolic link that points to powershell
69+
&& ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh \
70+
\
71+
# Create the pwsh-preview symbolic link that points to powershell
72+
&& ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh-preview \
73+
# Give all user execute permissions and remove write permissions for others
74+
&& chmod a+x,o-w ${PS_INSTALL_FOLDER}/pwsh \
75+
# intialize powershell module cache
76+
&& pwsh \
77+
-NoLogo \
78+
-NoProfile \
79+
-Command " \
80+
\$ErrorActionPreference = 'Stop' ; \
81+
\$ProgressPreference = 'SilentlyContinue' ; \
82+
while(!(Test-Path -Path \$env:PSModuleAnalysisCachePath)) { \
83+
Write-Host "'Waiting for $env:PSModuleAnalysisCachePath'" ; \
84+
Start-Sleep -Seconds 6 ; \
85+
}"
86+
87+
# Define args needed only for the labels
88+
ARG PS_VERSION=6.2.0-preview.2
89+
ARG IMAGE_NAME=mcr.microsoft.com/powershell:preview-alpine-3.8
90+
ARG VCS_REF="none"
91+
92+
# Add label last as it's just metadata and uses a lot of parameters
93+
LABEL maintainer="PowerShell Team <[email protected]>" \
94+
readme.md="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md" \
95+
description="This Dockerfile will install the latest release of PowerShell." \
96+
org.label-schema.usage="https://github.com/PowerShell/PowerShell/tree/master/docker#run-the-docker-image-you-built" \
97+
org.label-schema.url="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md" \
98+
org.label-schema.vcs-url="https://github.com/PowerShell/PowerShell-Docker" \
99+
org.label-schema.name="powershell" \
100+
org.label-schema.vendor="PowerShell" \
101+
org.label-schema.vcs-ref=${VCS_REF} \
102+
org.label-schema.version=${PS_VERSION} \
103+
org.label-schema.schema-version="1.0" \
104+
org.label-schema.docker.cmd="docker run ${IMAGE_NAME} pwsh -c '$psversiontable'" \
105+
org.label-schema.docker.cmd.devel="docker run ${IMAGE_NAME}" \
106+
org.label-schema.docker.cmd.test="docker run ${IMAGE_NAME} pwsh -c Invoke-Pester" \
107+
org.label-schema.docker.cmd.help="docker run ${IMAGE_NAME} pwsh -c Get-Help"
108+
109+
CMD [ "pwsh" ]
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
4+
# return objects representing the tags we need to base the Alpine image on
5+
6+
# The versions of Alpine we care about, for this dockerfile
7+
$shortTags = @('3.9','3.10')
8+
9+
$parent = Join-Path -Path $PSScriptRoot -ChildPath '..'
10+
$repoRoot = Join-Path -path (Join-Path -Path $parent -ChildPath '..') -ChildPath '..'
11+
$modulePath = Join-Path -Path $repoRoot -ChildPath 'tools\getDockerTags'
12+
Import-Module $modulePath
13+
14+
Get-DockerTags -ShortTags $shortTags -Image "alpine" -FullTagFilter '^3.\d\d?$' -OnlyShortTags

release/preview/alpine39/meta.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"IsLinux" : true,
3+
"UseLinuxVersion": false,
4+
"PackageFormat": "powershell-${PS_VERSION}-linux-alpine-x64.tar.gz",
5+
"osVersion": "Alpine",
6+
"tagTemplates": [
7+
"#psversion#-alpine-#tag#",
8+
"preview-alpine-#shorttag#"
9+
],
10+
"SkipGssNtlmSspTests": true,
11+
"SubImage": "test-deps",
12+
"TestProperties": {
13+
"size": 165
14+
}
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Docker image file that describes an Alpine image with PowerShell and test dependencies
2+
3+
ARG BaseImage=mcr.microsoft.com/powershell:alpine-3.9
4+
5+
FROM node:10.15.3-alpine as node
6+
7+
# Do nothing, just added to borrow the already built node files.
8+
9+
FROM ${BaseImage}
10+
11+
ENV NODE_VERSION 10.15.3
12+
ENV YARN_VERSION=1.13.0
13+
ENV NVM_DIR="/root/.nvm"
14+
15+
# workaround for Alpine to run in Azure DevOps
16+
ENV NODE_NO_WARNINGS=1
17+
18+
# Copy node and yarn into image
19+
COPY --from=node /usr/local/bin/node /usr/local/bin/node
20+
COPY --from=node /opt/yarn-v${YARN_VERSION} /opt/yarn-v${YARN_VERSION}
21+
22+
RUN apk add --no-cache --virtual .pipeline-deps readline linux-pam \
23+
&& apk add \
24+
bash \
25+
sudo \
26+
shadow \
27+
openssl \
28+
curl \
29+
&& apk del .pipeline-deps \
30+
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
31+
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg
32+
33+
# Define args needed only for the labels
34+
ARG VCS_REF="none"
35+
ARG IMAGE_NAME=mcr.microsoft.com/powershell/test-deps:alpine-3.8
36+
ARG PS_VERSION=6.2.0
37+
38+
LABEL maintainer="PowerShell Team <[email protected]>" \
39+
readme.md="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md" \
40+
description="This Dockerfile will install the latest release of PowerShell and tools needed for runing CI/CD container jobs." \
41+
org.label-schema.usage="https://github.com/PowerShell/PowerShell/tree/master/docker#run-the-docker-image-you-built" \
42+
org.label-schema.url="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md" \
43+
org.label-schema.vcs-url="https://github.com/PowerShell/PowerShell-Docker" \
44+
org.label-schema.name="powershell" \
45+
org.label-schema.vendor="PowerShell" \
46+
org.label-schema.version=${PS_VERSION} \
47+
org.label-schema.schema-version="1.0" \
48+
org.label-schema.vcs-ref=${VCS_REF} \
49+
org.label-schema.docker.cmd="docker run ${IMAGE_NAME} pwsh -c '$psversiontable'" \
50+
org.label-schema.docker.cmd.devel="docker run ${IMAGE_NAME}" \
51+
org.label-schema.docker.cmd.test="docker run ${IMAGE_NAME} pwsh -c Invoke-Pester" \
52+
org.label-schema.docker.cmd.help="docker run ${IMAGE_NAME} pwsh -c Get-Help" \
53+
com.azure.dev.pipelines.agent.handler.node.path="/usr/local/bin/node"
54+
55+
# Use PowerShell as the default shell
56+
# Use array to avoid Docker prepending /bin/sh -c
57+
CMD [ "pwsh" ]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"IsLinux" : true,
3+
"UseLinuxVersion": false,
4+
"SkipGssNtlmSspTests": true,
5+
"osVersion": "Alpine ${fromTag}",
6+
"tagTemplates": [
7+
"preview-alpine-#shorttag#"
8+
],
9+
"OptionalTests": [
10+
"test-deps",
11+
"test-deps-musl"
12+
],
13+
"TestProperties": {
14+
"size": 212
15+
}
16+
}

release/preview/fedora/meta.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"IsLinux" : true,
33
"UseLinuxVersion": false,
44
"PackageFormat": "powershell${previewTag}-${PS_VERSION}-1.rhel.7.x86_64.rpm",
5-
"osVersion": "Fedora 28",
5+
"osVersion": "Fedora",
66
"SkipGssNtlmSspTests": false,
77
"tagTemplates": [
88
"#psversion#-fedora-#tag#",

release/preview/fedora/test-deps/meta.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"IsLinux" : true,
33
"UseLinuxVersion": false,
4-
"osVersion": "Fedora 28",
4+
"osVersion": "Fedora ${fromTag}",
55
"SkipGssNtlmSspTests": false,
66
"tagTemplates": [
77
"preview-fedora-#shorttag#"

vsts-ci.yml

+14
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,20 @@ jobs:
5757
name: alpine
5858
imagename: alpine
5959
stable: true
60+
preview: false
61+
62+
- template: .vsts-ci/phase.yml
63+
parameters:
64+
name: alpine38
65+
imagename: alpine38
66+
stable: false
67+
preview: true
68+
69+
- template: .vsts-ci/phase.yml
70+
parameters:
71+
name: alpine39
72+
imagename: alpine39
73+
stable: false
6074
preview: true
6175

6276
- template: .vsts-ci/phase.yml

0 commit comments

Comments
 (0)