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: update e2e image tag for devnet #159

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
submodules: "true"
- uses: ./.github/actions/install_toolchain
- name: Install cargo deny
run: cargo install --locked cargo-deny
run: cargo install --locked cargo-deny --version 0.14.24
- name: Run cargo deny checks for pallets
run: cargo-deny check licenses

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-docker-build-push.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# The Licensed Work is (c) 2022 Sygma
# SPDX-License-Identifier: LGPL-3.0-only

name: Build and publish E2E Docker image
name: Build and publish E2E Docker image with Sygma standalone chain node

on:
push:
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/phala-e2e-docker-build-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# The Licensed Work is (c) 2022 Sygma
# SPDX-License-Identifier: LGPL-3.0-only

name: Build and publish E2E Docker image with Phala Subbridge parachain node

on:
pull_request:
types: [opened, synchronize, reopened]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
push_e2e_to_registry:
name: Push Phala subbridge integrated E2E Docker image to GitHub Container Registry
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false

# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: true

- name: Check out the repo
uses: actions/checkout@v3
with:
submodules: "true"
- uses: ./.github/actions/install_toolchain

- name: Prepare
id: prep
run: |
# creates local variable of docker image
# creates local variable of commit hash that triggered workflow
COMMIT_HASH=$(echo $GITHUB_SHA | head -c7)
# creates local variable to hold docker images
TAGS="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${COMMIT_HASH},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:e2e-phala-latest"
# check if branch/tag that triggered workflow was from tags
if [[ $GITHUB_REF == refs/tags/* ]]; then
# set version
VERSION=${GITHUB_REF#refs/tags/}
# append version and e2e testing name to tags
TAGS="${TAGS},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:e2e-phala-${VERSION}"
fi
# sets output of step
echo ::set-output name=tags::${TAGS}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
push: true
file: ./Dockerfile_phala_parachain_e2e
tags: ${{ steps.prep.outputs.tags }}

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
4 changes: 2 additions & 2 deletions .github/workflows/tangle-e2e-docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
COMMIT_HASH=$(echo $GITHUB_SHA | head -c7)

# creates local variable to hold docker images
TAGS="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${COMMIT_HASH},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:e2e-latest"
TAGS="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${COMMIT_HASH},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:e2e-tangle-latest"

# check if branch/tag that triggered workflow was from tags
if [[ $GITHUB_REF == refs/tags/* ]]; then
Expand All @@ -40,7 +40,7 @@ jobs:
VERSION=${GITHUB_REF#refs/tags/}

# append version and e2e testing name to tags
TAGS="${TAGS},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:e2e-${VERSION}"
TAGS="${TAGS},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:e2e-tangle-${VERSION}"

fi

Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion Dockerfile_tangle_standalone_e2e
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ COPY ./scripts/tangle .
# build
RUN git clone https://github.com/webb-tools/tangle.git ./tangle
WORKDIR /code/tangle
RUN git checkout sygma/polkadot-version-upgrade
# checkout to the latest release tag
RUN git checkout v$(git tag --sort=committerdate | grep -E '[0-9]' | tail -1 | cut -b 2-7)
RUN cargo build --release --features testnet

FROM --platform=linux/amd64 node:18.14.2
Expand Down
2 changes: 1 addition & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,4 @@ github = [""]
# 1 or more gitlab.com organizations to allow git sources for
gitlab = [""]
# 1 or more bitbucket.org organizations to allow git sources for
bitbucket = [""]
bitbucket = [""]
Loading