mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-18 04:14:33 -05:00
ci: run e2e tests as last step of release pipeline (#1793)
This commit is contained in:
parent
ab257944f9
commit
dc9b3c1937
4
.github/actions/e2e_test/action.yml
vendored
4
.github/actions/e2e_test/action.yml
vendored
@ -67,7 +67,7 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
buildBuddyApiKey:
|
buildBuddyApiKey:
|
||||||
description: "BuildBuddy API key for caching Bazel artifacts"
|
description: "BuildBuddy API key for caching Bazel artifacts"
|
||||||
required: true
|
required: false
|
||||||
registry:
|
registry:
|
||||||
description: "Container registry to use"
|
description: "Container registry to use"
|
||||||
required: true
|
required: true
|
||||||
@ -113,7 +113,7 @@ runs:
|
|||||||
- name: Setup bazel
|
- name: Setup bazel
|
||||||
uses: ./.github/actions/setup_bazel
|
uses: ./.github/actions/setup_bazel
|
||||||
with:
|
with:
|
||||||
useCache: "true"
|
useCache: ${{ inputs.buildBuddyApiKey != '' }}
|
||||||
buildBuddyApiKey: ${{ inputs.buildBuddyApiKey }}
|
buildBuddyApiKey: ${{ inputs.buildBuddyApiKey }}
|
||||||
|
|
||||||
- name: Log in to the Container registry
|
- name: Log in to the Container registry
|
||||||
|
11
.github/workflows/e2e-mini.yml
vendored
11
.github/workflows/e2e-mini.yml
vendored
@ -5,9 +5,6 @@ name: e2e test qemu (MiniConstellation)
|
|||||||
# e2e-test-release uses the same branch as the triggering workflow and not the commit of the triggering workflow. This is because the release workflow produces further commits.
|
# e2e-test-release uses the same branch as the triggering workflow and not the commit of the triggering workflow. This is because the release workflow produces further commits.
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_run:
|
|
||||||
workflows: ["Release"]
|
|
||||||
types: [completed]
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
ref:
|
ref:
|
||||||
@ -22,14 +19,6 @@ on:
|
|||||||
description: "Git ref to checkout"
|
description: "Git ref to checkout"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
on-failure-quit:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
if: github.event_name == 'workflow_run' && github.event.workflow_run.conclusion != 'success'
|
|
||||||
steps:
|
|
||||||
- run: |
|
|
||||||
echo 'Release workflow failed, exiting..'
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
e2e-mini:
|
e2e-mini:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
environment: e2e
|
environment: e2e
|
||||||
|
30
.github/workflows/e2e-test-release.yml
vendored
30
.github/workflows/e2e-test-release.yml
vendored
@ -6,26 +6,23 @@ name: e2e test release
|
|||||||
# - any tests on the last release
|
# - any tests on the last release
|
||||||
# - loadbalancer tests for AWS. Test test is currently broken and should not block a release. AB#2780.
|
# - loadbalancer tests for AWS. Test test is currently broken and should not block a release. AB#2780.
|
||||||
#
|
#
|
||||||
# The workflow is triggered by the completion of the release workflow.
|
# The workflow is triggered as the last step of the release workflow.
|
||||||
# The workflow only executes, after being triggered, if the triggering workflow completed successfully.
|
|
||||||
# e2e-test-release uses the same branch as the triggering workflow and not the commit of the triggering workflow. This is because the release workflow produces further commits.
|
|
||||||
# e2e-test-release depends on the fact that actions/constellation_create does not overwrite the default osImage, if no osImage is supplied.
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
workflow_run:
|
inputs:
|
||||||
workflows: ["Release"]
|
ref:
|
||||||
types: [completed]
|
type: string
|
||||||
|
description: "Git ref to checkout"
|
||||||
|
required: false
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
ref:
|
||||||
|
type: string
|
||||||
|
description: "Git ref to checkout"
|
||||||
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
on-failure-quit:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
if: github.event_name == 'workflow_run' && github.event.workflow_run.conclusion != 'success'
|
|
||||||
steps:
|
|
||||||
- run: |
|
|
||||||
echo 'Release workflow failed, exiting..'
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
e2e-tests:
|
e2e-tests:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@ -169,7 +166,7 @@ jobs:
|
|||||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: ${{ !github.event.pull_request.head.repo.fork && github.event.workflow_run.head_branch || '' }}
|
ref: ${{ inputs.ref || github.head_ref }}
|
||||||
|
|
||||||
- name: Setup Go environment
|
- name: Setup Go environment
|
||||||
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
||||||
@ -258,3 +255,4 @@ jobs:
|
|||||||
cloudProvider: ${{ matrix.cloudProvider }}
|
cloudProvider: ${{ matrix.cloudProvider }}
|
||||||
workerNodesCount: 2
|
workerNodesCount: 2
|
||||||
controlNodesCount: 3
|
controlNodesCount: 3
|
||||||
|
gitRef: ${{ inputs.ref || github.head_ref }}
|
||||||
|
35
.github/workflows/release.yml
vendored
35
.github/workflows/release.yml
vendored
@ -144,7 +144,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Update enterprise image version
|
- name: Update enterprise image version
|
||||||
run: |
|
run: |
|
||||||
sed -i "s/defaultImage = \"v[0-9]\+\.[0-9]\+\.[0-9]\+\"/defaultImage = \"${VERSION}\"/" internal/config/image.go
|
defaultVersionReg='defaultImage = \"[^\"]*\"'
|
||||||
|
|
||||||
|
# Ensure regexp matches (otherwise the file was changed or the workflow is broken).
|
||||||
|
grep -E "${defaultVersionReg}" internal/config/image.go
|
||||||
|
|
||||||
|
# Update version.
|
||||||
|
sed -i "s/${defaultVersionReg}/defaultImage = \"${VERSION}\"/" internal/config/image.go
|
||||||
git add internal/config/image.go
|
git add internal/config/image.go
|
||||||
|
|
||||||
- name: Commit
|
- name: Commit
|
||||||
@ -240,3 +246,30 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
ref: "refs/tags/${{ inputs.version }}"
|
ref: "refs/tags/${{ inputs.version }}"
|
||||||
|
pushContainers: true
|
||||||
|
|
||||||
|
e2e-tests:
|
||||||
|
name: Run E2E tests
|
||||||
|
needs: [verify-inputs, draft-release-cli]
|
||||||
|
uses: ./.github/workflows/e2e-test-release.yml
|
||||||
|
permissions:
|
||||||
|
checks: write
|
||||||
|
packages: write
|
||||||
|
id-token: write
|
||||||
|
contents: read
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
ref: ${{ needs.verify-inputs.outputs.RELEASE_BRANCH }}
|
||||||
|
|
||||||
|
mini-e2e:
|
||||||
|
name: Run mini E2E tests
|
||||||
|
needs: [verify-inputs, draft-release-cli]
|
||||||
|
uses: ./.github/workflows/e2e-mini.yml
|
||||||
|
permissions:
|
||||||
|
checks: write
|
||||||
|
packages: write
|
||||||
|
id-token: write
|
||||||
|
contents: read
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
ref: ${{ needs.verify-inputs.outputs.RELEASE_BRANCH }}
|
||||||
|
Loading…
Reference in New Issue
Block a user