Skip to content

ci: auto deploy codex on devnet #1302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 28, 2025
Merged

Conversation

veaceslavdoina
Copy link
Contributor

@veaceslavdoina veaceslavdoina commented Jul 11, 2025

PR is a part of a Devnet launch and it was required to

  1. Adjust docker-reusable.yml workflow to output Codex Docker image tag
  2. Add a deploy-devnet.yml workflow which will update bootstrap and cloud storage nodes and restart crawler/discordbot
  3. Updated docker-dist-tests.yml workflow to trigger deploy-devnet.yml from step 2.

It works in the following way

  1. On master push, Docker - Dist-Tests will deploy Smart contracts and Codex on Devnet
  2. We could run Docker - Dist-Tests on master or a custom branch and set a checkbox to deploy Codex on Devnet
  3. We also could deploy a custom Docker image using Deploy - Devnet workflow

Remote workflow is called using a token generated based on GitHub App installed in nim-codex and codex-contracts-eth repositories. Appropriate secrets were added to nim-codex repository.

screenshots - smart contracts deployment is missed

Deploy result

Screenshot 2025-07-11 at 22 09 23

Run Docker - Dist-Tests and deploy on Devnet

Screenshot 2025-07-11 at 22 11 14

Run Deploy - Devnet to deploy a custom image on Devnet

Screenshot 2025-07-11 at 22 03 39

Closes https://github.com/codex-storage/infra-codex/issues/347, closes https://github.com/codex-storage/infra-codex/issues/353.

Copy link
Member

@gmega gmega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In @veaceslavdoina we trust

run: |
for node in {1..1}; do
kubectl -n "${{ env.CODEX_NAMESPACE }}" patch statefulset codex-validator-${node} \
--patch '{"spec": {"template": {"spec":{"containers":[{"name": "codex", "image":"codexstorage/nim-codex:sha-352273f-dist-tests"}]}}}}'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a hard-coded codex image here. Is that intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good observation, fixing!

@veaceslavdoina veaceslavdoina added this pull request to the merge queue Jul 28, 2025
@veaceslavdoina veaceslavdoina removed this pull request from the merge queue due to a manual request Jul 28, 2025
@veaceslavdoina veaceslavdoina enabled auto-merge July 28, 2025 08:38
@veaceslavdoina veaceslavdoina added this pull request to the merge queue Jul 28, 2025
Merged via the queue into master with commit 8cd10ed Jul 28, 2025
62 of 64 checks passed
@veaceslavdoina veaceslavdoina deleted the ci/auto-deploy-devnet branch July 28, 2025 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client See https://miro.com/app/board/uXjVNZ03E-c=/ for details
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants