Skip to content

Commit

Permalink
Set build and e2e test workflows to test-and-builds environment (#49)
Browse files Browse the repository at this point in the history
* Added test-and-builds environment to some workflows

* Rename environment

* Cleanup deployments for this branch

* Testing hardcoded branch name

* Testing github variables

* Use github.ref_name in deployment cleanup

* Add needs to cleanup

* Add always() tag to job to delete deployments even when jobs fail
  • Loading branch information
bradbown authored Sep 27, 2024
1 parent 2ee4363 commit 5d7cda2
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/coordinator-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
build-and-publish:
runs-on: ubuntu-22.04
name: Coordinator build
environment: docker-build-and-e2e
env:
COMMIT_TAG: ${{ inputs.commit_tag }}
DEVELOP_TAG: ${{ inputs.develop_tag }}
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,15 @@ jobs:
untested_tag_suffix: ${{ needs.store-image-name-and-tags.outputs.untested_tag_suffix }}
image_names: '["consensys/linea-coordinator", "consensys/linea-postman", "consensys/linea-prover", "consensys/linea-traces-api-facade"]'
secrets: inherit

cleanup-deployments:
needs: [ run-e2e-tests, run-e2e-tests-geth-tracing ]
if: ${{ always() }}
runs-on: besu-arm64
steps:
- uses: strumwolf/delete-deployment-environment@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: docker-build-and-e2e
ref: ${{ github.ref_name }}
onlyRemoveDeployments: true
1 change: 1 addition & 0 deletions .github/workflows/postman-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
build-and-publish:
runs-on: ubuntu-22.04
name: Postman build
environment: docker-build-and-e2e
env:
COMMIT_TAG: ${{ inputs.commit_tag }}
DEVELOP_TAG: ${{ inputs.develop_tag }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/prover-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
build-and-publish:
runs-on: ubuntu-latest
name: Prover build
environment: docker-build-and-e2e
env:
COMMIT_TAG: ${{ inputs.commit_tag }}
DEVELOP_TAG: ${{ inputs.develop_tag }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/reuse-run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
outputs:
tests_outcome: ${{ steps.run_e2e_tests.outcome }}
runs-on: ubuntu-22.04
environment: docker-build-and-e2e
steps:
- name: Setup upterm session
if: ${{ inputs.e2e-tests-with-ssh }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/traces-api-facade-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
build-and-publish:
runs-on: ubuntu-latest
name: Traces api facade build
environment: docker-build-and-e2e
env:
COMMIT_TAG: ${{ inputs.commit_tag }}
DEVELOP_TAG: ${{ inputs.develop_tag }}
Expand Down

0 comments on commit 5d7cda2

Please sign in to comment.