diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index 97e3d60..90e8fda 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -14,7 +14,6 @@ jobs: outputs: VERSION: ${{ steps.step1.outputs.VERSION }} CONTINUE: ${{ steps.step1.outputs.Continue }} - WIN2019_VERSION: ${{ steps.step1.outputs.WIN2019_VERSION }} WIN2022_VERSION: ${{ steps.step1.outputs.WIN2022_VERSION }} steps: - uses: actions/checkout@v3 @@ -48,20 +47,15 @@ jobs: { Write-Host "We need to upgrade the container to $versionToCompare" - Write-Host "Getting OS versions for windows 2022 and 2019" - $win2019_manifest = (docker manifest inspect --verbose "octopuslabs/workertools:latest-windows.2019" | ConvertFrom-Json) - $WIN2019_VERSION = $win2019_manifest.Descriptor.Platform.'os.version' - Write-Host "WIN2019_VERSION: $WIN2019_VERSION" - + Write-Host "Getting OS versions for windows 2022" $win2022_manifest = (docker manifest inspect --verbose "octopuslabs/workertools:latest-windows.2022" | ConvertFrom-Json) $WIN2022_VERSION = $win2022_manifest.Descriptor.Platform.'os.version' Write-Host "WIN2022_VERSION: $WIN2022_VERSION" - if([string]::IsNullOrWhiteSpace($WIN2019_VERSION) -or [string]::IsNullOrWhiteSpace($WIN2022_VERSION)) { - throw "Could not establish OS versions for windows 2022 and 2019 needed for docker manifest" + if([string]::IsNullOrWhiteSpace($WIN2022_VERSION)) { + throw "Could not establish OS versions for windows 2022 needed for docker manifest" } - echo "WIN2019_VERSION=$WIN2019_VERSION" >> $env:GITHUB_OUTPUT echo "WIN2022_VERSION=$WIN2022_VERSION" >> $env:GITHUB_OUTPUT Write-Host "We have everything we need, continuing." @@ -116,36 +110,6 @@ jobs: run: docker push octopuslabs/terraform-workertools:latest-ubuntu.2204 if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }} - build-win-2019: - needs: [get-version-number] - runs-on: windows-2019 - - steps: - - uses: actions/checkout@v3 - - - name: DockerHub Login - env: - USERNAME: ${{ secrets.DOCKER_HUB_USER }} - PASSWORD: ${{ secrets.DOCKER_HUB_PAT }} - run: docker login --username ${env:USERNAME} --password "${env:PASSWORD}" - if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }} - - - name: Build the win2019 image - env: - VERSION_NUMBER: ${{ needs.get-version-number.outputs.VERSION }} - run: docker build ./windows-2019 --tag octopuslabs/terraform-workertools:${env:VERSION_NUMBER}-windows.2019 --tag octopuslabs/terraform-workertools:latest-windows.2019 - if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }} - - - name: Push the win2019 version-specific image - env: - VERSION_NUMBER: ${{ needs.get-version-number.outputs.VERSION }} - run: docker push octopuslabs/terraform-workertools:${env:VERSION_NUMBER}-windows.2019 - if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }} - - - name: Push the win2019 latest image - run: docker push octopuslabs/terraform-workertools:latest-windows.2019 - if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }} - build-win-2022: needs: [get-version-number] runs-on: windows-2022 @@ -177,7 +141,7 @@ jobs: if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }} build-docker-manifest: - needs: [get-version-number, build-ubuntu, build-win-2019, build-win-2022] + needs: [get-version-number, build-ubuntu, build-win-2022] runs-on: ubuntu-latest steps: @@ -189,15 +153,13 @@ jobs: if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }} - name: Create docker manifest for latest tag - run: docker manifest create octopuslabs/terraform-workertools:latest octopuslabs/terraform-workertools:latest-windows.2019 octopuslabs/terraform-workertools:latest-windows.2022 octopuslabs/terraform-workertools:latest-ubuntu.2204 + run: docker manifest create octopuslabs/terraform-workertools:latest octopuslabs/terraform-workertools:latest-windows.2022 octopuslabs/terraform-workertools:latest-ubuntu.2204 if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }} - name: Annotate docker manifest for latest tag env: - WIN2019_VERSION: ${{ needs.get-version-number.outputs.WIN2019_VERSION }} WIN2022_VERSION: ${{ needs.get-version-number.outputs.WIN2022_VERSION }} run: | - docker manifest annotate --os "windows" --os-version "$WIN2019_VERSION" --arch "amd64" "octopuslabs/terraform-workertools:latest" "octopuslabs/terraform-workertools:latest-windows.2019" && \ docker manifest annotate --os "windows" --os-version "$WIN2022_VERSION" --arch "amd64" "octopuslabs/terraform-workertools:latest" "octopuslabs/terraform-workertools:latest-windows.2022" if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }} @@ -208,16 +170,14 @@ jobs: - name: Create docker manifest for version-specific tag env: VERSION_NUMBER: ${{ needs.get-version-number.outputs.VERSION }} - run: docker manifest create octopuslabs/terraform-workertools:$VERSION_NUMBER octopuslabs/terraform-workertools:$VERSION_NUMBER-windows.2019 octopuslabs/terraform-workertools:$VERSION_NUMBER-windows.2022 octopuslabs/terraform-workertools:$VERSION_NUMBER-ubuntu.2204 + run: docker manifest create octopuslabs/terraform-workertools:$VERSION_NUMBER octopuslabs/terraform-workertools:$VERSION_NUMBER-windows.2022 octopuslabs/terraform-workertools:$VERSION_NUMBER-ubuntu.2204 if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }} - name: Annotate docker manifest for version-specific tag env: VERSION_NUMBER: ${{ needs.get-version-number.outputs.VERSION }} - WIN2019_VERSION: ${{ needs.get-version-number.outputs.WIN2019_VERSION }} WIN2022_VERSION: ${{ needs.get-version-number.outputs.WIN2022_VERSION }} run: | - docker manifest annotate --os "windows" --os-version "$WIN2019_VERSION" --arch "amd64" "octopuslabs/terraform-workertools:$VERSION_NUMBER" "octopuslabs/terraform-workertools:$VERSION_NUMBER-windows.2019" && \ docker manifest annotate --os "windows" --os-version "$WIN2022_VERSION" --arch "amd64" "octopuslabs/terraform-workertools:$VERSION_NUMBER" "octopuslabs/terraform-workertools:$VERSION_NUMBER-windows.2022" if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }} diff --git a/README.md b/README.md index ec01371..ee6f77c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ The following images are built in this repo: - Ubuntu 22.04 - Ubuntu 20.04 - Windows 2022 -- Windows 2019 A new image will be built each time a new version of Terraform is created. The version numbers will be based on the version of Terraform. diff --git a/windows-2019/Dockerfile b/windows-2019/Dockerfile deleted file mode 100644 index 8117680..0000000 --- a/windows-2019/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -# escape=` - -FROM octopuslabs/workertools:latest-windows.2019 -SHELL ["powershell", "-Command"] - -# Install Terraform -RUN choco install git -y --no-progress - -# Install Terraform -RUN choco install terraform -y --no-progress \ No newline at end of file