Skip to content
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

chore: add github action to update remote docker images on a new tag push #1595

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Update Docker Image Tag from "latest" to 'testnet'

on:
workflow_dispatch: # Allows manual triggering of the workflow
push:
tags:
- v*

jobs:
retag-and-push:
name: Retag and Push Docker Image
runs-on: ubuntu-latest

steps:
# Step 1: Log in to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

# Step 2: Pull the latest images
- name: Pull Docker images
run: |
docker pull portalnetwork/trin:latest
docker pull portalnetwork/trin:latest-bridge

# Step 3: Retag the images
- name: Retag Docker images
run: |
docker image tag portalnetwork/trin:latest portalnetwork/trin:testnet
docker image tag portalnetwork/trin:latest-bridge portalnetwork/trin:bridge

# Step 4: Push the new tags to Docker Hub
- name: Push new tags to Docker Hub
run: |
docker push portalnetwork/trin:testnet
docker push portalnetwork/trin:bridge
13 changes: 0 additions & 13 deletions book/src/developers/contributing/releases/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,6 @@
- Announce in Discord #trin that you're about to run the deployment
- Make sure to schedule plenty of time to react to deployment issues

### Update Docker images
Docker images are how Ansible moves the binaries to the nodes. Update the Docker tags with:
```shell
docker pull portalnetwork/trin:latest
docker pull portalnetwork/trin:latest-bridge
docker image tag portalnetwork/trin:latest portalnetwork/trin:testnet
docker image tag portalnetwork/trin:latest-bridge portalnetwork/trin:bridge
docker push portalnetwork/trin:testnet
docker push portalnetwork/trin:bridge
```

This step directs Ansible to use the current master version of trin. Read [about the tags](#what-do-the-docker-tags-mean) to understand more.

### Run ansible
- Check monitoring tools to understand network health, and compare against post-deployment, eg~
- [Glados](https://glados.ethdevops.io/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,18 @@ git pull --rebase upstream master
```
2. Create a new git tag with the chosen version, for example:
```bash
git tag v0.1.0-alpha.15
git tag v0.1.1
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should still release alpha versions. Meaning, next release should probably be: v0.1.1-alpha.1.

And once we achieve milestone or want to make proper release for whatever reason, we release non-alpha (v0.1.1).

Copy link
Member Author

Choose a reason for hiding this comment

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

I think two approaches are viable here:

  • we can bump the minor version on every new release 0.2.0, 0.3.0 ... 0.123.0
  • or use a pre-release identifier: 0.2.0-alpha.1 until we release a stable 0.2.0 version.

I'm more in favor of the second approach.

```
3. Push the tag to the upstream repository:
```bash
git push upstream v0.1.0-alpha.15
git push upstream v0.1.1
```
4. Wait for the github actions release job to finish. It will create automatically a draft release with all precompiled binaries included.
4. Wait for the github actions release job to finish. It will create automatically a draft release with all precompiled binaries included
and will update the remote docker images for deployment.
This should take 15-20 min to complete.
5. Find the draft release generated by the github bot in releases and edit the template by completing and deleting all checklists.
Write a short summary if available. Add any clarifying information that's helpful about the release.
6. Scroll to the bottom, check the `Set as a pre-release` box and click `Publish release`.
6. Scroll to the bottom, and click `Publish release`.

### Build Instructions
* [Linux](../build_instructions/linux.md)
Expand Down
2 changes: 1 addition & 1 deletion portal-spec-tests
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are portal-spec-tests updated?

Loading