Skip to content

Commit

Permalink
DOPS-420 workflow change for neonevm/neon-evm repository (#224)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
vodolaz authored and afalaleev committed Oct 27, 2023
1 parent 9ed9a7c commit 68c0871
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/github_api_client.py
Original file line number Diff line number Diff line change
@@ -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}",
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 68c0871

Please sign in to comment.