Skip to content

initial framework for lookup #2353

initial framework for lookup

initial framework for lookup #2353

Workflow file for this run

name: main
on:
pull_request:
push:
branches:
- main
jobs:
store-image-name-and-tags:
uses: ./.github/workflows/reuse-store-image-name-and-tags.yml
filter-commit-changes:
runs-on: [self-hosted, ubuntu-20.04, X64, small]
name: Filter commit changes
outputs:
coordinator: ${{ steps.filter.outputs.coordinator }}
postman: ${{ steps.filter.outputs.postman }}
prover: ${{ steps.filter.outputs.prover }}
traces-api-facade: ${{ steps.filter.outputs.traces-api-facade }}
transaction-exclusion-api: ${{ steps.filter.outputs.transaction-exclusion-api }}
finalized-tag-updater: ${{ steps.filter.outputs.finalized-tag-updater }}
has-changes-requiring-build: ${{ steps.filter-out.outputs.has-changes-requiring-build }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Filter commit changes
uses: dorny/paths-filter@v3
id: filter
with:
base: ${{ github.ref }}
list-files: "json"
filters: |
coordinator:
- 'coordinator/**'
- 'testdata/**'
- 'buildSrc/**'
- 'jvm-libs/**'
- 'gradle/**'
- 'build.gradle'
- 'gradle.properties'
- 'settings.gradle'
- '.github/workflows/coordinator-*.yml'
- '.github/workflows/build-and-publish.yml'
- '.github/workflows/main.yml'
- '.github/workflows/reuse-*.yml'
- 'config/common/traces-limits-v1.toml'
- 'config/common/traces-limits-v2.toml'
- 'config/coordinator/**'
- 'e2e/**'
- 'docker/compose.yml'
- 'docker/compose-local-dev.overrides.yml'
- 'docker/compose-local-dev-traces-v2.overrides.yml'
postman:
- 'sdk/**'
- '.github/workflows/postman-*.yml'
- '.github/workflows/build-and-publish.yml'
- '.github/workflows/main.yml'
- '.github/workflows/reuse-*.yml'
prover:
- 'prover/**'
- '.github/workflows/prover-*.yml'
- '.github/workflows/build-and-publish.yml'
- '.github/workflows/main.yml'
- '.github/workflows/reuse-*.yml'
- 'constraints'
traces-api-facade:
- 'traces-api-facade/**'
- 'jvm-libs/linea/core/domain-models/**'
- 'jvm-libs/linea/core/traces/**'
- 'jvm-libs/linea/core/metrics/**'
- 'jvm-libs/generic/json-rpc/**'
- 'jvm-libs/generic/extensions/kotlin/**'
- 'jvm-libs/generic/extensions/futures/**'
- 'jvm-libs/generic/vertx-helper/**'
- 'jvm-libs/linea/metrics/**'
- 'config/common/traces-limits-v1.toml'
- '.github/workflows/traces-api-facade-*.yml'
- '.github/workflows/build-and-publish.yml'
- '.github/workflows/main.yml'
- '.github/workflows/reuse-*.yml'
- 'buildSrc/**'
- 'gradle/**'
- 'build.gradle'
- 'gradle.properties'
- 'settings.gradle'
transaction-exclusion-api:
- 'transaction-exclusion-api/**'
- 'jvm-libs/generic/extensions/futures/**'
- 'jvm-libs/generic/extensions/kotlin/**'
- 'jvm-libs/generic/json-rpc/**'
- 'jvm-libs/generic/persistence/**'
- 'jvm-libs/generic/vertx-helper/**'
- 'jvm-libs/linea/core/long-running-service/**'
- 'jvm-libs/linea/core/metrics/**'
- 'jvm-libs/linea/metrics/**'
- '.github/workflows/transaction-exclusion-api-*.yml'
- '.github/workflows/build-and-publish.yml'
- '.github/workflows/main.yml'
- '.github/workflows/reuse-*.yml'
- 'buildSrc/**'
- 'gradle/**'
- 'build.gradle'
- 'gradle.properties'
- 'settings.gradle'
finalized-tag-updater:
- 'jvm-libs/linea/core/long-running-service/**'
- 'jvm-libs/linea/web3j-extensions/**'
- 'jvm-libs/extensions/kotlin/**'
- 'jvm-libs/extensions/futures/**'
- 'finalized-tag-updater/**'
- '.github/workflows/main.yml'
- '.github/workflows/finalized-tag-updater-github-release.yml'
- name: Filter out commit changes
uses: dorny/paths-filter@v3
id: filter-out
with:
base: ${{ github.ref }}
list-files: "json"
filters: |
has-changes-requiring-build:
- '!**/*.md'
- '!docs/**'
# Enables us to exclude changes in multiple file types if required
predicate-quantifier: 'every'
check-and-tag-images:
needs: [ store-image-name-and-tags, filter-commit-changes ]
uses: ./.github/workflows/reuse-check-images-tags-and-push.yml
if: ${{ needs.filter-commit-changes.outputs.has-changes-requiring-build == 'true' }}
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
last_commit_tag: ${{ needs.store-image-name-and-tags.outputs.last_commit_tag }}
develop_tag: ${{ needs.store-image-name-and-tags.outputs.develop_tag }}
coordinator_changed: ${{ needs.filter-commit-changes.outputs.coordinator }}
postman_changed: ${{ needs.filter-commit-changes.outputs.postman }}
prover_changed: ${{ needs.filter-commit-changes.outputs.prover }}
traces_api_facade_changed: ${{ needs.filter-commit-changes.outputs.traces-api-facade }}
transaction_exclusion_api_changed: ${{ needs.filter-commit-changes.outputs.transaction-exclusion-api }}
secrets: inherit
manual-docker-build-and-e2e-tests:
runs-on: [self-hosted, ubuntu-20.04, X64, small]
needs: [ store-image-name-and-tags, filter-commit-changes, check-and-tag-images ]
if: ${{ needs.filter-commit-changes.outputs.has-changes-requiring-build == 'true' }}
environment: ${{ github.ref != 'refs/heads/main' && 'docker-build-and-e2e' || '' }}
concurrency:
group: manual-docker-build-and-e2e-tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
steps:
- name: Deploy environment
run: |
echo "Build and e2e test environment deployed"
docker-build:
needs: [ store-image-name-and-tags, filter-commit-changes, check-and-tag-images, manual-docker-build-and-e2e-tests ]
uses: ./.github/workflows/build-and-publish.yml
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
develop_tag: ${{ needs.store-image-name-and-tags.outputs.develop_tag }}
coordinator_changed: ${{ needs.filter-commit-changes.outputs.coordinator }}
postman_changed: ${{ needs.filter-commit-changes.outputs.postman }}
prover_changed: ${{ needs.filter-commit-changes.outputs.prover }}
traces_api_facade_changed: ${{ needs.filter-commit-changes.outputs.traces-api-facade }}
transaction_exclusion_api_changed: ${{ needs.filter-commit-changes.outputs.transaction-exclusion-api }}
coordinator_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_coordinator }}
postman_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_postman }}
prover_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_prover }}
traces_api_facade_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_traces_api_facade }}
transaction_exclusion_api_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_transaction_exclusion_api }}
secrets: inherit
# Comment out the auto build and release step below as the plugin release should be
# by manual Github action for versioning control
# finalized-tag-updater-jar-build-release:
# needs: [ filter-commit-changes ]
# if: ${{ always() && needs.filter-commit-changes.outputs.finalized-tag-updater == 'true' }}
# uses: ./.github/workflows/finalized-tag-updater-github-release.yml
# with:
# version: '0.0.1'
testing:
needs: [ store-image-name-and-tags, filter-commit-changes, check-and-tag-images ]
if: ${{ always() && needs.filter-commit-changes.outputs.has-changes-requiring-build == 'true' }}
uses: ./.github/workflows/testing.yml
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
coordinator_changed: ${{ needs.filter-commit-changes.outputs.coordinator }}
postman_changed: ${{ needs.filter-commit-changes.outputs.postman }}
prover_changed: ${{ needs.filter-commit-changes.outputs.prover }}
traces_api_facade_changed: ${{ needs.filter-commit-changes.outputs.traces-api-facade }}
transaction_exclusion_api_changed: ${{ needs.filter-commit-changes.outputs.transaction-exclusion-api }}
secrets: inherit
run-e2e-tests-geth-tracing:
needs: [ store-image-name-and-tags, docker-build, manual-docker-build-and-e2e-tests ]
# Make this execute for has-changes-requiring-build == 'false' so that we can get to the required job @ which is in reuse-run-e2e-tests.yml
if: ${{ always() && needs.filter-commit-changes.outputs.has-changes-requiring-build == 'false' || needs.docker-build.result == 'success' }}
concurrency:
group: run-e2e-tests-geth-tracing-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
uses: ./.github/workflows/reuse-run-e2e-tests.yml
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
tracing-engine: 'geth'
e2e-tests-logs-dump: true
has-changes-requiring-build: ${{ needs.filter-commit-changes.outputs.has-changes-requiring-build }}
secrets: inherit
run-e2e-tests:
needs: [ store-image-name-and-tags, docker-build, manual-docker-build-and-e2e-tests, filter-commit-changes ]
# Make this execute for has-changes-requiring-build == 'false' so that we can get to the required job @ which is in reuse-run-e2e-tests.yml
if: ${{ always() && needs.filter-commit-changes.outputs.has-changes-requiring-build == 'false' || needs.docker-build.result == 'success' }}
concurrency:
group: run-e2e-tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
uses: ./.github/workflows/reuse-run-e2e-tests.yml
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
tracing-engine: 'besu'
e2e-tests-logs-dump: true
has-changes-requiring-build: ${{ needs.filter-commit-changes.outputs.has-changes-requiring-build }}
secrets: inherit
publish-images-after-run-tests-success-on-main:
needs: [ store-image-name-and-tags, testing, run-e2e-tests, run-e2e-tests-geth-tracing ]
if: ${{ always() && github.ref == 'refs/heads/main' && needs.testing.result == 'success' && needs.run-e2e-tests.outputs.tests_outcome == 'success' && needs.run-e2e-tests-geth-tracing.outputs.tests_outcome == 'success' }}
uses: ./.github/workflows/build-and-publish.yml
with:
push_image: true
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
develop_tag: ${{ needs.store-image-name-and-tags.outputs.develop_tag }}
coordinator_changed: ${{ needs.filter-commit-changes.outputs.coordinator }}
postman_changed: ${{ needs.filter-commit-changes.outputs.postman }}
prover_changed: ${{ needs.filter-commit-changes.outputs.prover }}
traces_api_facade_changed: ${{ needs.filter-commit-changes.outputs.traces-api-facade }}
transaction_exclusion_api_changed: ${{ needs.filter-commit-changes.outputs.transaction-exclusion-api }}
coordinator_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_coordinator }}
postman_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_postman }}
prover_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_prover }}
traces_api_facade_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_traces_api_facade }}
transaction_exclusion_api_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_transaction_exclusion_api }}
secrets: inherit
cleanup-deployments:
needs: [ run-e2e-tests, run-e2e-tests-geth-tracing ]
if: ${{ always() }}
runs-on: [self-hosted, ubuntu-20.04, X64, small]
steps:
- uses: strumwolf/delete-deployment-environment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: docker-build-and-e2e
ref: ${{ github.ref_name }}
onlyRemoveDeployments: true