Use local Docker image in e2e pipeline and rebuild image if necessary

This commit is contained in:
Sebastian Serth
2022-09-18 01:51:50 +02:00
committed by Sebastian Serth
parent 7454e577e4
commit 69237fb415
5 changed files with 32 additions and 32 deletions

View File

@ -175,6 +175,21 @@ jobs:
uses: actions/download-artifact@v2
with:
name: poseidon
- name: Get current branch name
id: branch-name
uses: tj-actions/branch-names@v6
- name: Checkout matching branch for Dockerfiles (optional)
id: checkout-dockerfiles
if: steps.branch-name.outputs.is_default == 'false'
uses: actions/checkout@v3
continue-on-error: true
with:
repository: openHPI/dockerfiles
path: deploy/dockerfiles
ref: ${{ steps.branch-name.outputs.current_branch }}
- name: Build new e2e test image (optional)
if: steps.checkout-dockerfiles.outcome == 'success'
run: make e2e-test-docker-image
- name: Run e2e tests
run: |
sudo ./nomad agent -dev -log-level=WARN -config e2e-config.hcl &

View File

@ -51,16 +51,3 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Extract metadata (tags, labels) for Docker e2e image
id: e2e-meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-e2e-tests
- name: Build and push e2e Docker image
uses: docker/build-push-action@v2
with:
context: .
file: deploy/e2e-test-image/Dockerfile
push: true
tags: ${{ steps.e2e-meta.outputs.tags }}
labels: ${{ steps.e2e-meta.outputs.labels }}