Skip to content

Commit

Permalink
Enhancement: Bump powershell 7.2 variants to 7.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
leojonathanoh committed Jun 28, 2023
1 parent 93d1cde commit 0e8f40d
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 29 deletions.
46 changes: 23 additions & 23 deletions .github/workflows/ci-master-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
run: |
git diff --exit-code
build-7-2-0-alpine-3-14:
build-7-2-2-alpine-3-14:
runs-on: ubuntu-latest
env:
VARIANT: 7.2.0-alpine-3.14
VARIANT: 7.2.2-alpine-3.14
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v3
with:
context: variants/7.2.0-alpine-3.14
context: variants/7.2.2-alpine-3.14
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
push: false
tags: |
Expand All @@ -121,7 +121,7 @@ jobs:
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v3
with:
context: variants/7.2.0-alpine-3.14
context: variants/7.2.2-alpine-3.14
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
push: true
tags: |
Expand All @@ -134,7 +134,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v3
with:
context: variants/7.2.0-alpine-3.14
context: variants/7.2.2-alpine-3.14
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
push: true
tags: |
Expand All @@ -152,10 +152,10 @@ jobs:
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-7-2-0-alpine-3-14-git-sops:
build-7-2-2-alpine-3-14-git-sops:
runs-on: ubuntu-latest
env:
VARIANT: 7.2.0-alpine-3.14-git-sops
VARIANT: 7.2.2-alpine-3.14-git-sops
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -227,7 +227,7 @@ jobs:
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v3
with:
context: variants/7.2.0-alpine-3.14-git-sops
context: variants/7.2.2-alpine-3.14-git-sops
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
push: false
tags: |
Expand All @@ -241,7 +241,7 @@ jobs:
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v3
with:
context: variants/7.2.0-alpine-3.14-git-sops
context: variants/7.2.2-alpine-3.14-git-sops
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
push: true
tags: |
Expand All @@ -254,7 +254,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v3
with:
context: variants/7.2.0-alpine-3.14-git-sops
context: variants/7.2.2-alpine-3.14-git-sops
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
push: true
tags: |
Expand Down Expand Up @@ -1232,10 +1232,10 @@ jobs:
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-7-2-0-ubuntu-20-04:
build-7-2-2-ubuntu-20-04:
runs-on: ubuntu-latest
env:
VARIANT: 7.2.0-ubuntu-20.04
VARIANT: 7.2.2-ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -1307,7 +1307,7 @@ jobs:
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v3
with:
context: variants/7.2.0-ubuntu-20.04
context: variants/7.2.2-ubuntu-20.04
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
push: false
tags: |
Expand All @@ -1321,7 +1321,7 @@ jobs:
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v3
with:
context: variants/7.2.0-ubuntu-20.04
context: variants/7.2.2-ubuntu-20.04
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
push: true
tags: |
Expand All @@ -1334,7 +1334,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v3
with:
context: variants/7.2.0-ubuntu-20.04
context: variants/7.2.2-ubuntu-20.04
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
push: true
tags: |
Expand All @@ -1352,10 +1352,10 @@ jobs:
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-7-2-0-ubuntu-20-04-git-sops:
build-7-2-2-ubuntu-20-04-git-sops:
runs-on: ubuntu-latest
env:
VARIANT: 7.2.0-ubuntu-20.04-git-sops
VARIANT: 7.2.2-ubuntu-20.04-git-sops
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -1427,7 +1427,7 @@ jobs:
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v3
with:
context: variants/7.2.0-ubuntu-20.04-git-sops
context: variants/7.2.2-ubuntu-20.04-git-sops
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
push: false
tags: |
Expand All @@ -1441,7 +1441,7 @@ jobs:
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v3
with:
context: variants/7.2.0-ubuntu-20.04-git-sops
context: variants/7.2.2-ubuntu-20.04-git-sops
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
push: true
tags: |
Expand All @@ -1454,7 +1454,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v3
with:
context: variants/7.2.0-ubuntu-20.04-git-sops
context: variants/7.2.2-ubuntu-20.04-git-sops
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
push: true
tags: |
Expand Down Expand Up @@ -2674,7 +2674,7 @@ jobs:
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
update-draft-release:
needs: [build-7-2-0-alpine-3-14, build-7-2-0-alpine-3-14-git-sops, build-7-1-5-alpine-3-13, build-7-1-5-alpine-3-13-git-sops, build-7-0-3-alpine-3-9, build-7-0-3-alpine-3-9-git-sops, build-6-2-4-alpine-3-8, build-6-2-4-alpine-3-8-git-sops, build-6-1-3-alpine-3-8, build-6-1-3-alpine-3-8-git-sops, build-7-2-0-ubuntu-20-04, build-7-2-0-ubuntu-20-04-git-sops, build-7-1-5-ubuntu-20-04, build-7-1-5-ubuntu-20-04-git-sops, build-7-0-3-ubuntu-18-04, build-7-0-3-ubuntu-18-04-git-sops, build-6-2-4-ubuntu-18-04, build-6-2-4-ubuntu-18-04-git-sops, build-6-1-3-ubuntu-18-04, build-6-1-3-ubuntu-18-04-git-sops, build-6-0-2-ubuntu-16-04, build-6-0-2-ubuntu-16-04-git-sops]
needs: [build-7-2-2-alpine-3-14, build-7-2-2-alpine-3-14-git-sops, build-7-1-5-alpine-3-13, build-7-1-5-alpine-3-13-git-sops, build-7-0-3-alpine-3-9, build-7-0-3-alpine-3-9-git-sops, build-6-2-4-alpine-3-8, build-6-2-4-alpine-3-8-git-sops, build-6-1-3-alpine-3-8, build-6-1-3-alpine-3-8-git-sops, build-7-2-2-ubuntu-20-04, build-7-2-2-ubuntu-20-04-git-sops, build-7-1-5-ubuntu-20-04, build-7-1-5-ubuntu-20-04-git-sops, build-7-0-3-ubuntu-18-04, build-7-0-3-ubuntu-18-04-git-sops, build-6-2-4-ubuntu-18-04, build-6-2-4-ubuntu-18-04-git-sops, build-6-1-3-ubuntu-18-04, build-6-1-3-ubuntu-18-04-git-sops, build-6-0-2-ubuntu-16-04, build-6-0-2-ubuntu-16-04-git-sops]
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
Expand All @@ -2687,7 +2687,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-draft-release:
needs: [build-7-2-0-alpine-3-14, build-7-2-0-alpine-3-14-git-sops, build-7-1-5-alpine-3-13, build-7-1-5-alpine-3-13-git-sops, build-7-0-3-alpine-3-9, build-7-0-3-alpine-3-9-git-sops, build-6-2-4-alpine-3-8, build-6-2-4-alpine-3-8-git-sops, build-6-1-3-alpine-3-8, build-6-1-3-alpine-3-8-git-sops, build-7-2-0-ubuntu-20-04, build-7-2-0-ubuntu-20-04-git-sops, build-7-1-5-ubuntu-20-04, build-7-1-5-ubuntu-20-04-git-sops, build-7-0-3-ubuntu-18-04, build-7-0-3-ubuntu-18-04-git-sops, build-6-2-4-ubuntu-18-04, build-6-2-4-ubuntu-18-04-git-sops, build-6-1-3-ubuntu-18-04, build-6-1-3-ubuntu-18-04-git-sops, build-6-0-2-ubuntu-16-04, build-6-0-2-ubuntu-16-04-git-sops]
needs: [build-7-2-2-alpine-3-14, build-7-2-2-alpine-3-14-git-sops, build-7-1-5-alpine-3-13, build-7-1-5-alpine-3-13-git-sops, build-7-0-3-alpine-3-9, build-7-0-3-alpine-3-9-git-sops, build-6-2-4-alpine-3-8, build-6-2-4-alpine-3-8-git-sops, build-6-1-3-alpine-3-8, build-6-1-3-alpine-3-8-git-sops, build-7-2-2-ubuntu-20-04, build-7-2-2-ubuntu-20-04-git-sops, build-7-1-5-ubuntu-20-04, build-7-1-5-ubuntu-20-04-git-sops, build-7-0-3-ubuntu-18-04, build-7-0-3-ubuntu-18-04-git-sops, build-6-2-4-ubuntu-18-04, build-6-2-4-ubuntu-18-04-git-sops, build-6-1-3-ubuntu-18-04, build-6-1-3-ubuntu-18-04-git-sops, build-6-0-2-ubuntu-16-04, build-6-0-2-ubuntu-16-04-git-sops]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
Expand All @@ -2702,7 +2702,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

update-dockerhub-description:
needs: [build-7-2-0-alpine-3-14, build-7-2-0-alpine-3-14-git-sops, build-7-1-5-alpine-3-13, build-7-1-5-alpine-3-13-git-sops, build-7-0-3-alpine-3-9, build-7-0-3-alpine-3-9-git-sops, build-6-2-4-alpine-3-8, build-6-2-4-alpine-3-8-git-sops, build-6-1-3-alpine-3-8, build-6-1-3-alpine-3-8-git-sops, build-7-2-0-ubuntu-20-04, build-7-2-0-ubuntu-20-04-git-sops, build-7-1-5-ubuntu-20-04, build-7-1-5-ubuntu-20-04-git-sops, build-7-0-3-ubuntu-18-04, build-7-0-3-ubuntu-18-04-git-sops, build-6-2-4-ubuntu-18-04, build-6-2-4-ubuntu-18-04-git-sops, build-6-1-3-ubuntu-18-04, build-6-1-3-ubuntu-18-04-git-sops, build-6-0-2-ubuntu-16-04, build-6-0-2-ubuntu-16-04-git-sops]
needs: [build-7-2-2-alpine-3-14, build-7-2-2-alpine-3-14-git-sops, build-7-1-5-alpine-3-13, build-7-1-5-alpine-3-13-git-sops, build-7-0-3-alpine-3-9, build-7-0-3-alpine-3-9-git-sops, build-6-2-4-alpine-3-8, build-6-2-4-alpine-3-8-git-sops, build-6-1-3-alpine-3-8, build-6-1-3-alpine-3-8-git-sops, build-7-2-2-ubuntu-20-04, build-7-2-2-ubuntu-20-04-git-sops, build-7-1-5-ubuntu-20-04, build-7-1-5-ubuntu-20-04-git-sops, build-7-0-3-ubuntu-18-04, build-7-0-3-ubuntu-18-04-git-sops, build-6-2-4-ubuntu-18-04, build-6-2-4-ubuntu-18-04-git-sops, build-6-1-3-ubuntu-18-04, build-6-1-3-ubuntu-18-04-git-sops, build-6-0-2-ubuntu-16-04, build-6-0-2-ubuntu-16-04-git-sops]
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Dockerized `powershell`, based on [mcr.microsoft.com/powershell](https://hub.doc

| Tag | Dockerfile Build Context |
|:-------:|:---------:|
| `:7.2.0-alpine-3.14` | [View](variants/7.2.0-alpine-3.14) |
| `:7.2.0-alpine-3.14-git-sops` | [View](variants/7.2.0-alpine-3.14-git-sops) |
| `:7.2.2-alpine-3.14` | [View](variants/7.2.2-alpine-3.14) |
| `:7.2.2-alpine-3.14-git-sops` | [View](variants/7.2.2-alpine-3.14-git-sops) |
| `:7.1.5-alpine-3.13` | [View](variants/7.1.5-alpine-3.13) |
| `:7.1.5-alpine-3.13-git-sops` | [View](variants/7.1.5-alpine-3.13-git-sops) |
| `:7.0.3-alpine-3.9` | [View](variants/7.0.3-alpine-3.9) |
Expand All @@ -20,8 +20,8 @@ Dockerized `powershell`, based on [mcr.microsoft.com/powershell](https://hub.doc
| `:6.2.4-alpine-3.8-git-sops` | [View](variants/6.2.4-alpine-3.8-git-sops) |
| `:6.1.3-alpine-3.8` | [View](variants/6.1.3-alpine-3.8) |
| `:6.1.3-alpine-3.8-git-sops` | [View](variants/6.1.3-alpine-3.8-git-sops) |
| `:7.2.0-ubuntu-20.04` | [View](variants/7.2.0-ubuntu-20.04) |
| `:7.2.0-ubuntu-20.04-git-sops`, `:latest` | [View](variants/7.2.0-ubuntu-20.04-git-sops) |
| `:7.2.2-ubuntu-20.04` | [View](variants/7.2.2-ubuntu-20.04) |
| `:7.2.2-ubuntu-20.04-git-sops`, `:latest` | [View](variants/7.2.2-ubuntu-20.04-git-sops) |
| `:7.1.5-ubuntu-20.04` | [View](variants/7.1.5-ubuntu-20.04) |
| `:7.1.5-ubuntu-20.04-git-sops` | [View](variants/7.1.5-ubuntu-20.04-git-sops) |
| `:7.0.3-ubuntu-18.04` | [View](variants/7.0.3-ubuntu-18.04) |
Expand Down
4 changes: 2 additions & 2 deletions generate/definitions/VARIANTS.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Docker image variants' definitions
$local:VARIANTS_BASE_IMAGE_TAGS = @(
'7.2.0-alpine-3.14-20211102'
'7.2.2-alpine-3.14-20220318'
'7.1.5-alpine-3.13-20211021'
'7.0.3-alpine-3.9-20200928'
'6.2.4-alpine-3.8'
'6.1.3-alpine-3.8'

'7.2.0-ubuntu-20.04-20211102'
'7.2.2-ubuntu-20.04-20220318'
'7.1.5-ubuntu-20.04-20211021'
'7.0.3-ubuntu-18.04-20201027'
'6.2.4-ubuntu-18.04'
Expand Down
25 changes: 25 additions & 0 deletions variants/7.2.2-alpine-3.14-git-sops/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM mcr.microsoft.com/powershell:7.2.2-alpine-3.14-20220318

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

# Install Pester
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose'
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose'

RUN apk add --no-cache git

RUN set -eux; \
wget -qO- https://github.com/mozilla/sops/releases/download/v3.7.1/sops-v3.7.1.linux > /usr/local/bin/sops; \
chmod +x /usr/local/bin/sops; \
sha256sum /usr/local/bin/sops | grep '^185348fd77fc160d5bdf3cd20ecbc796163504fd3df196d7cb29000773657b74 '; \
sops --version

RUN apk add --no-cache gnupg

15 changes: 15 additions & 0 deletions variants/7.2.2-alpine-3.14/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM mcr.microsoft.com/powershell:7.2.2-alpine-3.14-20220318

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

# Install Pester
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose'
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose'

40 changes: 40 additions & 0 deletions variants/7.2.2-ubuntu-20.04-git-sops/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM mcr.microsoft.com/powershell:7.2.2-ubuntu-20.04-20220318

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

# Install Pester
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose'
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose'

RUN set -eux; \
apt-get update; \
apt-get install -y git; \
rm -rf /var/lib/apt/lists/*

# Install sops
RUN set -eux; \
buildDeps="wget"; \
apt-get update; \
apt-get install --no-install-recommends -y $buildDeps; \
wget -qO- https://github.com/mozilla/sops/releases/download/v3.7.1/sops-v3.7.1.linux > /usr/local/bin/sops; \
chmod +x /usr/local/bin/sops; \
sha256sum /usr/local/bin/sops | grep '^185348fd77fc160d5bdf3cd20ecbc796163504fd3df196d7cb29000773657b74 '; \
sops --version; \
apt-get purge --auto-remove -y $buildDeps; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*

# Install gnupg for sops
RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y gnupg2; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*

15 changes: 15 additions & 0 deletions variants/7.2.2-ubuntu-20.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM mcr.microsoft.com/powershell:7.2.2-ubuntu-20.04-20220318

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

# Install Pester
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose'
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose'

0 comments on commit 0e8f40d

Please sign in to comment.