Skip to content

Commit

Permalink
another try
Browse files Browse the repository at this point in the history
  • Loading branch information
fhoeben committed Nov 13, 2023
1 parent cfd3ca1 commit 19b2fc9
Showing 1 changed file with 82 additions and 27 deletions.
109 changes: 82 additions & 27 deletions .github/workflows/other-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,26 @@ jobs:
combine
test-with-pdf
chrome-with-pdf
load: true
set: |
*.tags=
*.platform=${{ matrix.platform }}
test.output=type=docker,dest=/tmp/image-test.tar
combine.output=docker,dest=/tmp/image-combine.tar
chrome.output=docker,dest=/tmp/image-chrome.tar
test-with-pdf.output=docker,dest=/tmp/image-test-with-pdf.tar
chrome-with-pdf.output=docker,dest=/tmp/image-chrome-with-pdf.tar
- name: Upload images
uses: actions/upload-artifact@v3
with:
name: images
path: /tmp/image-*.tar
if-no-files-found: error
retention-days: 1

- name: Export digests
run: |
echo "${{ fromJSON(steps.bake.outputs.metadata) }}"
echo "${{ steps.bake.outputs.metadata }}"
mkdir -p /tmp/digests/test
test_digest="${{ fromJSON(steps.bake.outputs.metadata)['test']['containerimage.digest'] }}"
touch "/tmp/digests/test/${test_digest#sha256:}"
Expand All @@ -100,39 +112,82 @@ jobs:
if-no-files-found: error
retention-days: 1

test:
runs-on: ubuntu-latest
needs:
- build
strategy:
fail-fast: false
matrix:
target: [test, combine, chrome, test-with-pdf, chrome-with-pdf]
include:
- target: test
image: hsac/fitnesse-fixtures-test-jre11
- target: combine
image: hsac/fitnesse-fixtures-combine
- target: chrome
image: hsac/fitnesse-fixtures-test-jre11-chrome
- target: test-with-pdf
image: hsac/fitnesse-fixtures-test-jre11-with-pdf
- target: chrome-with-pdf
image: hsac/fitnesse-fixtures-test-jre11-chrome-with-pdf
steps:
- name: Download meta bake definition
uses: actions/download-artifact@v3
with:
name: bake-meta
path: /tmp

- name: Download digests
uses: actions/download-artifact@v3
with:
name: digests
path: /tmp/digests

- name: Download images
uses: actions/download-artifact@v3
with:
name: images
path: /tmp

- name: Load image
run: |
docker load --input /tmp/image-${{ matrix.target }}.tar
docker image ls -a
- name: Test image
if: matrix.platform == 'linux/amd64'
run: |
SHA="sha256:$(cd /tmp/digests/test; ls *)"
IMAGE="hsac/fitnesse-fixtures-test-jre11@${SHA}"
SHA="sha256:$(cd /tmp/digests/${{ matrix.target }}; ls *)"
IMAGE="${{ matrix.image }}@${SHA}"
echo "${IMAGE}"
docker run --rm -v "$(pwd)"/src/main/wiki:/fitnesse/wiki/FitNesseRoot -e RE_RUN_FAILED=true ${IMAGE} -DfitnesseSuiteToRun=SampleTests.SlimTests.UtilityFixtures
- name: Build
id: bake-push
uses: docker/bake-action@v4
with:
files: |
./docker-bake.hcl
/tmp/bake-meta.json
targets: |
test
chrome
combine
test-with-pdf
chrome-with-pdf
set: |
*.tags=
*.platform=${{ matrix.platform }}
test.output=type=image,"name=hsac/fitnesse-fixtures-test-jre11",push-by-digest=true,name-canonical=true,push=true
combine.output=type=image,"name=hsac/fitnesse-fixtures-combine",push-by-digest=true,name-canonical=true,push=true
chrome.output=type=image,"name=hsac/fitnesse-fixtures-test-jre11-chrome",push-by-digest=true,name-canonical=true,push=true
test-with-pdf.output=type=image,"name=hsac/fitnesse-fixtures-test-jre11-with-pdf",push-by-digest=true,name-canonical=true,push=true
chrome-with-pdf.output=type=image,"name=hsac/fitnesse-fixtures-test-jre11-chrome-with-pdf",push-by-digest=true,name-canonical=true,push=true
# - name: Build
# id: bake-push
# uses: docker/bake-action@v4
# with:
# files: |
# ./docker-bake.hcl
# /tmp/bake-meta.json
# targets: |
# test
# chrome
# combine
# test-with-pdf
# chrome-with-pdf
# set: |
# *.tags=
# *.platform=${{ matrix.platform }}
# test.output=type=image,"name=hsac/fitnesse-fixtures-test-jre11",push-by-digest=true,name-canonical=true,push=true
# combine.output=type=image,"name=hsac/fitnesse-fixtures-combine",push-by-digest=true,name-canonical=true,push=true
# chrome.output=type=image,"name=hsac/fitnesse-fixtures-test-jre11-chrome",push-by-digest=true,name-canonical=true,push=true
# test-with-pdf.output=type=image,"name=hsac/fitnesse-fixtures-test-jre11-with-pdf",push-by-digest=true,name-canonical=true,push=true
# chrome-with-pdf.output=type=image,"name=hsac/fitnesse-fixtures-test-jre11-chrome-with-pdf",push-by-digest=true,name-canonical=true,push=true

merge:
runs-on: ubuntu-latest
needs:
- build
- test
strategy:
fail-fast: false
matrix:
Expand Down

0 comments on commit 19b2fc9

Please sign in to comment.