From 68c0871a1f17ff0cb8bb298040bd2696a3ce0767 Mon Sep 17 00:00:00 2001 From: Dmitry Miroshnichenko Date: Thu, 26 Oct 2023 18:22:58 +0300 Subject: [PATCH] DOPS-420 workflow change for neonevm/neon-evm repository (#224) * DOPS-420 image name variable added * DOPS-420 workflow changed - added variable with githab organisation and repo name for run link - hardcoded proxy repo url changed to variable * DOPS-420 github api script fix added os lib --- .github/workflows/deploy.py | 5 +++-- .github/workflows/github_api_client.py | 3 ++- .github/workflows/pipeline.yml | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.py b/.github/workflows/deploy.py index 65edb8c3d..d9d5b9298 100644 --- a/.github/workflows/deploy.py +++ b/.github/workflows/deploy.py @@ -29,7 +29,8 @@ DOCKER_USER = os.environ.get("DHUBU") DOCKER_PASSWORD = os.environ.get("DHUBP") -IMAGE_NAME = 'neonlabsorg/evm_loader' +IMAGE_NAME = os.environ.get("IMAGE_NAME") +RUN_LINK_REPO = os.environ.get("RUN_LINK_REPO") SOLANA_NODE_VERSION = 'v1.16.17' SOLANA_BPF_VERSION = 'v1.16.17' @@ -199,7 +200,7 @@ def trigger_proxy_action(head_ref_branch, base_ref_branch, github_ref, github_sh runs_after = github.get_proxy_runs_list(proxy_branch) proxy_run_id = list(set(runs_after) - set(runs_before))[0] - link = f"https://github.com/neonlabsorg/proxy-model.py/actions/runs/{proxy_run_id}" + link = f"https://github.com/{RUN_LINK_REPO}/actions/runs/{proxy_run_id}" click.echo(f"Proxy run link: {link}") click.echo("Waiting for completed status...") wait_condition(lambda: github.get_proxy_run_info(proxy_run_id)["status"] == "completed", timeout_sec=10800, delay=5) diff --git a/.github/workflows/github_api_client.py b/.github/workflows/github_api_client.py index dc5e519b7..e29dddd29 100644 --- a/.github/workflows/github_api_client.py +++ b/.github/workflows/github_api_client.py @@ -1,9 +1,10 @@ import click import requests +import os class GithubClient(): - PROXY_ENDPOINT = "https://api.github.com/repos/neonlabsorg/proxy-model.py" + PROXY_ENDPOINT = os.environ.get("PROXY_ENDPOINT") def __init__(self, token): self.headers = {"Authorization": f"Bearer {token}", diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 3ee1e4ae4..c46a959e0 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -13,6 +13,9 @@ on: env: DHUBU: ${{secrets.DHUBU}} DHUBP: ${{secrets.DHUBP}} + IMAGE_NAME: ${{vars.IMAGE_NAME}} + PROXY_ENDPOINT: ${{vars.PROXY_ENDPOINT}} + RUN_LINK_REPO: ${{vars.RUN_LINK_REPO}} BUILD_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" concurrency: