From b3d7768ee6e1438b6c22ff8473cb0b879cff7643 Mon Sep 17 00:00:00 2001 From: Leonard Jonathan Oh Date: Wed, 28 Jun 2023 08:10:28 +0000 Subject: [PATCH] Feature: Add powershell `7.3` variants --- .github/workflows/ci-master-pr.yml | 488 +++++++++++++++++- README.md | 6 +- generate/definitions/VARIANTS.ps1 | 2 + variants/7.3-alpine-3.17-git-sops/Dockerfile | 25 + variants/7.3-alpine-3.17/Dockerfile | 15 + variants/7.3-ubuntu-22.04-git-sops/Dockerfile | 40 ++ variants/7.3-ubuntu-22.04/Dockerfile | 15 + 7 files changed, 586 insertions(+), 5 deletions(-) create mode 100644 variants/7.3-alpine-3.17-git-sops/Dockerfile create mode 100644 variants/7.3-alpine-3.17/Dockerfile create mode 100644 variants/7.3-ubuntu-22.04-git-sops/Dockerfile create mode 100644 variants/7.3-ubuntu-22.04/Dockerfile diff --git a/.github/workflows/ci-master-pr.yml b/.github/workflows/ci-master-pr.yml index 96714db..d4e617a 100644 --- a/.github/workflows/ci-master-pr.yml +++ b/.github/workflows/ci-master-pr.yml @@ -32,6 +32,246 @@ jobs: run: | git diff --exit-code + build-7-3-alpine-3-17: + runs-on: ubuntu-latest + env: + VARIANT: 7.3-alpine-3.17 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Display system info (linux) + run: | + set -e + hostname + whoami + cat /etc/*release + lscpu + free + df -h + pwd + docker info + docker version + + # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx- + + # This step generates the docker tags + - name: Prepare + id: prep + run: | + set -e + + # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' + REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + + # Get short commit hash E.g. 'abc0123' + SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + + # Generate docker image tags + # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' + # E.g. 'master-' and 'master-abc0123-' + REF_VARIANT="${REF}-${VARIANT}" + REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + + # Pass variables to next step + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV + echo "VARIANT=$VARIANT" >> $GITHUB_ENV + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + - name: Build (PRs) + # Run only on pull requests + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v3 + with: + context: variants/7.3-alpine-3.17 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x + push: false + tags: | + ${{ github.repository }}:${{ env.REF_VARIANT }} + ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + - name: Build and push (master) + # Run only on master + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: variants/7.3-alpine-3.17 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x + push: true + tags: | + ${{ github.repository }}:${{ env.REF_VARIANT }} + ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + - name: Build and push (release) + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v3 + with: + context: variants/7.3-alpine-3.17 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x + push: true + tags: | + ${{ github.repository }}:${{ env.VARIANT }} + ${{ github.repository }}:${{ env.REF_VARIANT }} + ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + build-7-3-alpine-3-17-git-sops: + runs-on: ubuntu-latest + env: + VARIANT: 7.3-alpine-3.17-git-sops + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Display system info (linux) + run: | + set -e + hostname + whoami + cat /etc/*release + lscpu + free + df -h + pwd + docker info + docker version + + # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx- + + # This step generates the docker tags + - name: Prepare + id: prep + run: | + set -e + + # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' + REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + + # Get short commit hash E.g. 'abc0123' + SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + + # Generate docker image tags + # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' + # E.g. 'master-' and 'master-abc0123-' + REF_VARIANT="${REF}-${VARIANT}" + REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + + # Pass variables to next step + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV + echo "VARIANT=$VARIANT" >> $GITHUB_ENV + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + - name: Build (PRs) + # Run only on pull requests + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v3 + with: + context: variants/7.3-alpine-3.17-git-sops + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x + push: false + tags: | + ${{ github.repository }}:${{ env.REF_VARIANT }} + ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + - name: Build and push (master) + # Run only on master + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: variants/7.3-alpine-3.17-git-sops + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x + push: true + tags: | + ${{ github.repository }}:${{ env.REF_VARIANT }} + ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + - name: Build and push (release) + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v3 + with: + context: variants/7.3-alpine-3.17-git-sops + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x + push: true + tags: | + ${{ github.repository }}:${{ env.VARIANT }} + ${{ github.repository }}:${{ env.REF_VARIANT }} + ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + build-7-2-2-alpine-3-14: runs-on: ubuntu-latest env: @@ -1232,6 +1472,247 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache + build-7-3-ubuntu-22-04: + runs-on: ubuntu-latest + env: + VARIANT: 7.3-ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Display system info (linux) + run: | + set -e + hostname + whoami + cat /etc/*release + lscpu + free + df -h + pwd + docker info + docker version + + # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx- + + # This step generates the docker tags + - name: Prepare + id: prep + run: | + set -e + + # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' + REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + + # Get short commit hash E.g. 'abc0123' + SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + + # Generate docker image tags + # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' + # E.g. 'master-' and 'master-abc0123-' + REF_VARIANT="${REF}-${VARIANT}" + REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + + # Pass variables to next step + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV + echo "VARIANT=$VARIANT" >> $GITHUB_ENV + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + - name: Build (PRs) + # Run only on pull requests + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v3 + with: + context: variants/7.3-ubuntu-22.04 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x + push: false + tags: | + ${{ github.repository }}:${{ env.REF_VARIANT }} + ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + - name: Build and push (master) + # Run only on master + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: variants/7.3-ubuntu-22.04 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x + push: true + tags: | + ${{ github.repository }}:${{ env.REF_VARIANT }} + ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + - name: Build and push (release) + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v3 + with: + context: variants/7.3-ubuntu-22.04 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x + push: true + tags: | + ${{ github.repository }}:${{ env.VARIANT }} + ${{ github.repository }}:${{ env.REF_VARIANT }} + ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + build-7-3-ubuntu-22-04-git-sops: + runs-on: ubuntu-latest + env: + VARIANT: 7.3-ubuntu-22.04-git-sops + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Display system info (linux) + run: | + set -e + hostname + whoami + cat /etc/*release + lscpu + free + df -h + pwd + docker info + docker version + + # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx- + + # This step generates the docker tags + - name: Prepare + id: prep + run: | + set -e + + # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' + REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + + # Get short commit hash E.g. 'abc0123' + SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + + # Generate docker image tags + # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' + # E.g. 'master-' and 'master-abc0123-' + REF_VARIANT="${REF}-${VARIANT}" + REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + + # Pass variables to next step + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV + echo "VARIANT=$VARIANT" >> $GITHUB_ENV + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + - name: Build (PRs) + # Run only on pull requests + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v3 + with: + context: variants/7.3-ubuntu-22.04-git-sops + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x + push: false + tags: | + ${{ github.repository }}:${{ env.REF_VARIANT }} + ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + - name: Build and push (master) + # Run only on master + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: variants/7.3-ubuntu-22.04-git-sops + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x + push: true + tags: | + ${{ github.repository }}:${{ env.REF_VARIANT }} + ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + - name: Build and push (release) + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v3 + with: + context: variants/7.3-ubuntu-22.04-git-sops + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x + push: true + tags: | + ${{ github.repository }}:${{ env.VARIANT }} + ${{ github.repository }}:${{ env.REF_VARIANT }} + ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:latest + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + build-7-2-2-ubuntu-20-04: runs-on: ubuntu-latest env: @@ -1461,7 +1942,6 @@ jobs: ${{ github.repository }}:${{ env.VARIANT }} ${{ github.repository }}:${{ env.REF_VARIANT }} ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} - ${{ github.repository }}:latest cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -2674,7 +3154,7 @@ jobs: mv /tmp/.buildx-cache-new /tmp/.buildx-cache update-draft-release: - 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] + needs: [build-7-3-alpine-3-17, build-7-3-alpine-3-17-git-sops, 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-3-ubuntu-22-04, build-7-3-ubuntu-22-04-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: @@ -2687,7 +3167,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} publish-draft-release: - 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] + needs: [build-7-3-alpine-3-17, build-7-3-alpine-3-17-git-sops, 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-3-ubuntu-22-04, build-7-3-ubuntu-22-04-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: @@ -2702,7 +3182,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} update-dockerhub-description: - 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] + needs: [build-7-3-alpine-3-17, build-7-3-alpine-3-17-git-sops, 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-3-ubuntu-22-04, build-7-3-ubuntu-22-04-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: diff --git a/README.md b/README.md index c6b5ff4..2f4e630 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ Dockerized `powershell`, based on [mcr.microsoft.com/powershell](https://hub.doc | Tag | Dockerfile Build Context | |:-------:|:---------:| +| `:7.3-alpine-3.17` | [View](variants/7.3-alpine-3.17) | +| `:7.3-alpine-3.17-git-sops` | [View](variants/7.3-alpine-3.17-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) | @@ -20,8 +22,10 @@ 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.3-ubuntu-22.04` | [View](variants/7.3-ubuntu-22.04) | +| `:7.3-ubuntu-22.04-git-sops`, `:latest` | [View](variants/7.3-ubuntu-22.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.2.2-ubuntu-20.04-git-sops` | [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) | diff --git a/generate/definitions/VARIANTS.ps1 b/generate/definitions/VARIANTS.ps1 index 533ecd4..31a7009 100644 --- a/generate/definitions/VARIANTS.ps1 +++ b/generate/definitions/VARIANTS.ps1 @@ -1,11 +1,13 @@ # Docker image variants' definitions $local:VARIANTS_BASE_IMAGE_TAGS = @( + '7.3-alpine-3.17' '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.3-ubuntu-22.04' '7.2.2-ubuntu-20.04-20220318' '7.1.5-ubuntu-20.04-20211021' '7.0.3-ubuntu-18.04-20201027' diff --git a/variants/7.3-alpine-3.17-git-sops/Dockerfile b/variants/7.3-alpine-3.17-git-sops/Dockerfile new file mode 100644 index 0000000..0183e23 --- /dev/null +++ b/variants/7.3-alpine-3.17-git-sops/Dockerfile @@ -0,0 +1,25 @@ +FROM mcr.microsoft.com/powershell:7.3-alpine-3.17 + +# 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 + diff --git a/variants/7.3-alpine-3.17/Dockerfile b/variants/7.3-alpine-3.17/Dockerfile new file mode 100644 index 0000000..9ac091f --- /dev/null +++ b/variants/7.3-alpine-3.17/Dockerfile @@ -0,0 +1,15 @@ +FROM mcr.microsoft.com/powershell:7.3-alpine-3.17 + +# 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' + diff --git a/variants/7.3-ubuntu-22.04-git-sops/Dockerfile b/variants/7.3-ubuntu-22.04-git-sops/Dockerfile new file mode 100644 index 0000000..a4503f5 --- /dev/null +++ b/variants/7.3-ubuntu-22.04-git-sops/Dockerfile @@ -0,0 +1,40 @@ +FROM mcr.microsoft.com/powershell:7.3-ubuntu-22.04 + +# 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/* + diff --git a/variants/7.3-ubuntu-22.04/Dockerfile b/variants/7.3-ubuntu-22.04/Dockerfile new file mode 100644 index 0000000..e46913e --- /dev/null +++ b/variants/7.3-ubuntu-22.04/Dockerfile @@ -0,0 +1,15 @@ +FROM mcr.microsoft.com/powershell:7.3-ubuntu-22.04 + +# 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' +