Skip to content

Commit

Permalink
Merge pull request #7 from golemfoundation/michal/workflows-debug
Browse files Browse the repository at this point in the history
Workflows debugging
  • Loading branch information
mike-code authored Feb 21, 2024
2 parents 8f93430 + f6bde23 commit 3542508
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ jobs:
run: |
set -ex
exit 0
export CI_PROJECT_DIR="${GITHUB_WORKSPACE}"
source ${CI_PROJECT_DIR}/ci/argocd/resolve_env.sh $ENV_TYPE
Expand Down Expand Up @@ -149,7 +147,9 @@ jobs:
export ETH_RPC_PROVIDER_URL; ETH_RPC_PROVIDER_URL=https://$(bash ${CI_PROJECT_DIR}/ci/argocd/get_rpc_url.sh)
export SUBGRAPH_ENDPOINT; SUBGRAPH_ENDPOINT=https://$(bash ${CI_PROJECT_DIR}/ci/argocd/get_graph_url.sh)/subgraphs/name/octant
poetry run pytest --onlyapi
# Tests are disabled???
# https://gitlab.com/golemfoundation/governance/octant/-/commit/14e996ebed1fb73788e8ace045ea3b9a69bd5ca8
# poetry run pytest --onlyapi
shell: bash

deploy-e2e-env:
Expand All @@ -161,6 +161,7 @@ jobs:
with:
# ---
env-type: e2e
branch-head-ref: ${{ github.ref }}
image-tag: ${{ github.sha }}
pull-request-id: ${{ github.event.pull_request.number }}
workflow-id: ${{ github.run_id }}
Expand All @@ -187,6 +188,7 @@ jobs:
with:
# ---
env-type: apitest
branch-head-ref: ${{ github.ref }}
image-tag: ${{ github.sha }}
pull-request-id: ${{ github.event.pull_request.number }}
workflow-id: ${{ github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
uses: ./.github/workflows/tpl-deploy-app.yml
with:
env-type: master
branch-head-ref: ${{ github.ref }}
env-id: ${{ needs.run.outputs.env-id }}
deployment-id: ${{ needs.run.outputs.deployment-id }}
image-tag: ${{ github.sha }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
with:
# ---
env-type: pr
branch-head-ref: ${{ needs.run.outputs.ref }}
image-tag: ${{ needs.run.outputs.sha }}
pull-request-id: ${{ needs.run.outputs.pr_id }}
workflow-id: ${{ github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-uat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
uses: ./.github/workflows/tpl-deploy-app.yml
with:
env-type: uat
branch-head-ref: ${{ github.ref }}
env-id: ${{ needs.run.outputs.env-id }}
deployment-id: ${{ needs.run.outputs.deployment-id }}
image-tag: ${{ github.sha }}
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/tpl-deploy-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
contracts-env-artifact-id:
value: ${{ inputs.env-type }}-contracts-env
inputs:
branch-head-ref:
required: true
type: string
env-type:
required: true
type: string
Expand Down Expand Up @@ -132,6 +135,7 @@ env:
TESTNET_RPC_URL: "${{ secrets.TESTNET_RPC_URL }}"
ETHERSCAN_API_KEY: "${{ secrets.ETHERSCAN_API_KEY }}"
VITE_ALCHEMY_ID: "${{ secrets.VITE_ALCHEMY_ID }}"
IPFS_GATEWAY: "${{ vars.IPFS_GATEWAY }}"
# ----------------------------------------------------------------------------
# CI/CD
GCP_DOCKER_IMAGES_REGISTRY_SERVICE_ACCOUNT: "${{ secrets.GCP_DOCKER_IMAGES_REGISTRY_SERVICE_ACCOUNT }}"
Expand All @@ -158,6 +162,8 @@ jobs:
password: "${{ secrets.GITLAB_PAT_CONTAINER_BUILDER_DOCKER_IMAGES_READ }}"
steps:
- uses: actions/[email protected]
with:
ref: ${{ inputs.branch-head-ref }}

- name: (debug)
run: |
Expand Down Expand Up @@ -200,6 +206,9 @@ jobs:
password: "${{ secrets.GCP_DOCKER_IMAGES_REGISTRY_SERVICE_ACCOUNT }}"
steps:
- uses: actions/[email protected]
with:
ref: ${{ inputs.branch-head-ref }}

- name: Deploy contracts
run: |
set -ex
Expand All @@ -212,7 +221,9 @@ jobs:
export LOCAL_RPC_URL; LOCAL_RPC_URL=https://$(bash ${CI_PROJECT_DIR}/ci/argocd/get_rpc_url.sh)
yarn install
# BUG: For some reason this cache is a problem for this job to pass
# https://linear.app/golemfoundation/issue/OCT-1382/error-during-ci-contracts-deployment
rm -r $HOME/.cache/hardhat-nodejs/
/app/entrypoint.sh $NETWORK ${CI_PROJECT_DIR}/contracts.env
shell: bash
Expand Down Expand Up @@ -241,6 +252,9 @@ jobs:
password: "${{ secrets.GITLAB_PAT_CONTAINER_BUILDER_DOCKER_IMAGES_READ }}"
steps:
- uses: actions/[email protected]
with:
ref: ${{ inputs.branch-head-ref }}

- uses: actions/download-artifact@v4
if: ${{ inputs.deploy-contracts }}
with:
Expand Down

0 comments on commit 3542508

Please sign in to comment.