Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #9 from OctopusDeployLabs/deprecate-win2019
Browse files Browse the repository at this point in the history
Remove win 2019 build
  • Loading branch information
harrisonmeister authored Jan 25, 2024
2 parents b17e949 + 6a68284 commit f08094b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 71 deletions.
54 changes: 7 additions & 47 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
outputs:
FLYWAY_VERSION: ${{ steps.step1.outputs.CURRENT_FLYWAY_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
Expand All @@ -40,20 +39,15 @@ jobs:
{
Write-Host "We need to upgrade the flyway container to $latestFlywayVersion"
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."
Expand Down Expand Up @@ -106,37 +100,7 @@ jobs:
- name: Push the ubuntu.2204 latest image
run: docker push octopuslabs/flyway-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:
FLYWAY_VERSION_TO_BUILD: ${{ needs.get-version-number.outputs.FLYWAY_VERSION }}
run: docker build ./windows-2019 --tag octopuslabs/flyway-workertools:${env:FLYWAY_VERSION_TO_BUILD}-windows.2019 --tag octopuslabs/flyway-workertools:latest-windows.2019 --build-arg FLYWAY_VERSION=${env:FLYWAY_VERSION_TO_BUILD}
if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }}

- name: Push the win2019 version-specific image
env:
FLYWAY_VERSION_TO_BUILD: ${{ needs.get-version-number.outputs.FLYWAY_VERSION }}
run: docker push octopuslabs/flyway-workertools:${env:FLYWAY_VERSION_TO_BUILD}-windows.2019
if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }}

- name: Push the win2019 latest image
run: docker push octopuslabs/flyway-workertools:latest-windows.2019
if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }}


build-win-2022:
needs: [get-version-number]
runs-on: windows-2022
Expand Down Expand Up @@ -168,7 +132,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:
Expand All @@ -180,15 +144,13 @@ jobs:
if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }}

- name: Create docker manifest for latest tag
run: docker manifest create octopuslabs/flyway-workertools:latest octopuslabs/flyway-workertools:latest-windows.2019 octopuslabs/flyway-workertools:latest-windows.2022 octopuslabs/flyway-workertools:latest-ubuntu.2204
run: docker manifest create octopuslabs/flyway-workertools:latest octopuslabs/flyway-workertools:latest-windows.2022 octopuslabs/flyway-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/flyway-workertools:latest" "octopuslabs/flyway-workertools:latest-windows.2019" && \
docker manifest annotate --os "windows" --os-version "$WIN2022_VERSION" --arch "amd64" "octopuslabs/flyway-workertools:latest" "octopuslabs/flyway-workertools:latest-windows.2022"
if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }}

Expand All @@ -199,16 +161,14 @@ jobs:
- name: Create docker manifest for version-specific tag
env:
FLYWAY_VERSION_TO_BUILD: ${{ needs.get-version-number.outputs.FLYWAY_VERSION }}
run: docker manifest create octopuslabs/flyway-workertools:$FLYWAY_VERSION_TO_BUILD octopuslabs/flyway-workertools:$FLYWAY_VERSION_TO_BUILD-windows.2019 octopuslabs/flyway-workertools:$FLYWAY_VERSION_TO_BUILD-windows.2022 octopuslabs/flyway-workertools:$FLYWAY_VERSION_TO_BUILD-ubuntu.2204
run: docker manifest create octopuslabs/flyway-workertools:$FLYWAY_VERSION_TO_BUILD octopuslabs/flyway-workertools:$FLYWAY_VERSION_TO_BUILD-windows.2022 octopuslabs/flyway-workertools:$FLYWAY_VERSION_TO_BUILD-ubuntu.2204
if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }}

- name: Annotate docker manifest for version-specific tag
env:
FLYWAY_VERSION_TO_BUILD: ${{ needs.get-version-number.outputs.FLYWAY_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/flyway-workertools:$FLYWAY_VERSION_TO_BUILD" "octopuslabs/flyway-workertools:$FLYWAY_VERSION_TO_BUILD-windows.2019" && \
docker manifest annotate --os "windows" --os-version "$WIN2022_VERSION" --arch "amd64" "octopuslabs/flyway-workertools:$FLYWAY_VERSION_TO_BUILD" "octopuslabs/flyway-workertools:$FLYWAY_VERSION_TO_BUILD-windows.2022"
if: ${{ needs.get-version-number.outputs.CONTINUE == 'Yes' }}

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 flyway is created. The version numbers will be based on the version of the Flyway tool.

Expand Down
23 changes: 0 additions & 23 deletions windows-2019/Dockerfile

This file was deleted.

0 comments on commit f08094b

Please sign in to comment.