Skip to content

Commit

Permalink
Add step to build flyway container (#2593)
Browse files Browse the repository at this point in the history
* flyway testing

* add step to build flyway container

* revert back to original docker compose

* revert docke compose dev too

* undo localhost

* update file paths

* try copying full flyway folder

* use env var

* update context path

* cleanup

* set file separate from context for build release

* add step to build Flyway container from TEFCA viewer

* add flyway meta data
  • Loading branch information
m-goggins committed Sep 19, 2024
1 parent 7457339 commit 1983b9f
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/buildReleaseContainers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@ jobs:
labels: |
org.opencontainers.image.version=${{ inputs.container-tag }}
- name: Extract metadata (tags, labels) for Flyway Docker
id: flyway-meta
uses: docker/metadata-action@v4
if: ${{ contains(fromJSON('["tefca-viewer"]'), matrix.container-to-build) }}
with:
ref: ${{ inputs.container-tag }}
images: ghcr.io/${{ github.repository }}/tefca-viewer-flyway
# this sets the version for tags and labels for each of the containers to be
# be the same as the version/tag where the code was pulled from
tags: |
type=semver,pattern={{raw}},value=${{ inputs.container-tag }}
type=ref,event=branch
type=ref,event=tag,pattern={{raw}},value=${{ inputs.container-tag }}
labels: |
org.opencontainers.image.version=${{ inputs.container-tag }}
- name: Build and push
uses: docker/build-push-action@v3
if: ${{ !contains(fromJSON('["ecr-viewer", "tefca-viewer"]'), matrix.container-to-build) }}
Expand All @@ -69,6 +85,18 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Build Flyway Container
uses: docker/build-push-action@v3
if: ${{ contains(fromJSON('["tefca-viewer"]'), matrix.container-to-build) }}
with:
context: ./containers/tefca-viewer
file: ./Dockerfile.flyway
push: true
tags: ${{ steps.flyway-meta.outputs.tags }}
labels: ${{ steps.flyway-meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Build and push with shared-resources
uses: docker/build-push-action@v3
if: ${{ contains(fromJSON('["ecr-viewer", "tefca-viewer"]'), matrix.container-to-build) }}
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/container-tefca-viewer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ jobs:
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build ${{ env.CONTAINER }} Flyway Container
uses: docker/build-push-action@v3
with:
context: .
file: ./containers/${{ env.CONTAINER }}/Dockerfile.flyway
push: false
cache-from: type=gha
cache-to: type=gha,mode=max

playwright-tests:
timeout-minutes: 10
Expand Down
5 changes: 5 additions & 0 deletions containers/tefca-viewer/Dockerfile.flyway
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM flyway/flyway:10.16-alpine

COPY ./containers/tefca-viewer/flyway /flyway


0 comments on commit 1983b9f

Please sign in to comment.