NDEV-2620: Add executor_state: &impl Database parameter to EventListener::event method #1992
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy image | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize, labeled, unlabeled, ready_for_review] | |
repository_dispatch: | |
push: | |
branches: | |
- master | |
- develop | |
- '[vt][0-9].[0-9]+.[0-9x]+*' | |
tags: | |
- "*" | |
env: | |
DHUBU: ${{secrets.DHUBU}} | |
DHUBP: ${{secrets.DHUBP}} | |
IMAGE_NAME: ${{vars.IMAGE_NAME}} | |
PROXY_ENDPOINT: ${{vars.PROXY_ENDPOINT}} | |
NEON_TESTS_ENDPOINT: ${{vars.NEON_TESTS_ENDPOINT}} | |
DOCKERHUB_ORG_NAME: ${{vars.DOCKERHUB_ORG_NAME}} | |
RUN_LINK_REPO: ${{vars.RUN_LINK_REPO}} | |
BUILD_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-neon-evm: | |
runs-on: neon-evm-1 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: build docker image | |
run: | | |
python3 ./.github/workflows/deploy.py build_docker_image \ | |
--github_sha=${GITHUB_SHA} | |
- name: publish image | |
run: | | |
python3 ./.github/workflows/deploy.py publish_image \ | |
--github_sha=${GITHUB_SHA} | |
run-neon-evm-tests: | |
runs-on: test-runner | |
needs: | |
- build-neon-evm | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Define base branch if the action is tag creation | |
id: tag_creation | |
if: startsWith(github.ref , 'refs/tags/') | |
run: | | |
base_branch=`echo ${{ github.ref_name }} | sed 's/\.[0-9]*$/\.x/'` | |
echo "base_branch=$base_branch" >> $GITHUB_OUTPUT | |
echo "base_branch=$base_branch" | |
- name: Define neon test branch | |
id: neon_test_branch | |
run: | | |
if [[ "${{ github.ref }}" =~ "refs/heads/"[vt][0-9]+\.[0-9]+\.x ]]; then # version branch | |
tag=${GITHUB_REF/refs\/heads\//} | |
elif [[ "${{ steps.tag_creation.outputs.base_branch }}" != "" ]]; then # tag creation | |
tag=${{ steps.tag_creation.outputs.base_branch }} | |
elif [[ "${{ github.head_ref }}" != "" ]]; then # pr to feature or version branch | |
tag=${{ github.head_ref }} | |
else | |
tag='develop' | |
fi | |
echo "value=${tag}" | |
echo "value=${tag}" >> $GITHUB_OUTPUT | |
- name: Run tests | |
run: | | |
python3 ./.github/workflows/deploy.py run_tests \ | |
--github_sha=${GITHUB_SHA} \ | |
--neon_test_branch=${{ steps.neon_test_branch.outputs.value }} | |
trigger-proxy-tests: | |
runs-on: trigger-runner | |
needs: | |
- build-neon-evm | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Trigger proxy build | |
run: | | |
python3 ./.github/workflows/deploy.py trigger_proxy_action \ | |
--github_sha=${GITHUB_SHA} \ | |
--head_ref_branch=${{ github.head_ref }} \ | |
--base_ref_branch=${{ github.base_ref }} \ | |
--github_ref=${{ github.ref }} \ | |
--token=${{secrets.GHTOKEN }} \ | |
--is_draft=${{github.event.pull_request.draft}} \ | |
--labels='${{ toJson(github.event.pull_request.labels.*.name) }}' \ | |
--pr_url="${{ github.api_url }}/repos/${{ github.repository }}/issues" \ | |
--pr_number="${{ github.event.pull_request.number }}" | |
finalize-image: | |
runs-on: neon-evm-1 | |
needs: | |
- trigger-proxy-tests | |
- run-neon-evm-tests | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Finalize image | |
run: | | |
python3 ./.github/workflows/deploy.py finalize_image \ | |
--head_ref_branch=${{ github.head_ref }} \ | |
--github_ref=${GITHUB_REF} \ | |
--github_sha=${GITHUB_SHA} | |
- name: Check if it version branch | |
id: is_version_branch | |
run: | | |
if [[ "${{ github.ref }}" =~ "refs/heads/"[vt][0-9]+\.[0-9]+\.x ]]; then | |
echo "value=true" | |
echo "value=true" >> $GITHUB_OUTPUT | |
else | |
echo "value=false" | |
echo "value=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Send notification to slack | |
if: | | |
failure() && | |
(github.ref_name == 'develop' || | |
github.ref_name == 'master' || | |
steps.is_version_branch.outputs.value) || | |
startsWith(github.ref , 'refs/tags/') | |
run: | | |
python3 ./.github/workflows/deploy.py send_notification \ | |
--url=${{secrets.SLACK_EVM_CHANNEL_URL}} \ | |
--build_url=${BUILD_URL} |