forked from ava-labs/subnet-evm
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature/oonodz-integration. Integrate ooNodz workflow and create and …
…push docker images (#176) * tresor, kitkat, berghain (#171) * tresor, kitkat, berghain * resolve debas comments * chain config * slight refactor * resolve lumos comments * feature/oonodz-integration. Integrate ooNodz workflow and create and push docker images feature/oonodz-integration. Update variables * feature/oonodz-integration. Also produce the aylin image for the mainnet --------- Co-authored-by: atvanguard <[email protected]> Co-authored-by: Hugo Broudeur <[email protected]>
- Loading branch information
1 parent
62c931a
commit 34e14f5
Showing
14 changed files
with
253 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Build + Push aylin image | ||
|
||
on: | ||
push: | ||
branches: | ||
- aylin | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build_fuji_image_aylin: | ||
name: Build Docker Image | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get Current Tag | ||
id: get_tag | ||
run: echo ::set-output name=tag::$(git describe --abbrev=0 --tags) | ||
|
||
- name: Login to Docker hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASS }} | ||
|
||
- name: Build Dockerfile and Push it | ||
run: | | ||
TAG_END=$GITHUB_SHA | ||
if [ -n "$GITHUB_TAG" ]; then | ||
TAG_END=$GITHUB_TAG | ||
fi | ||
export BUILD_IMAGE_ID="${{ vars.AVALANCHE_VERSION_DEV }}-aylin-${TAG_END}" | ||
# Copy binary to the correct Fuji VM ID respository | ||
echo "COPY --from=builder /build/jvrKsTB9MfYGnAXtxbzFYpXKceXr9J8J8ej6uWGrYM5tXswhJ /root/.avalanchego/plugins/jvrKsTB9MfYGnAXtxbzFYpXKceXr9J8J8ej6uWGrYM5tXswhJ" >> Dockerfile | ||
# Copy binary to the correct Mainnet VM ID respository | ||
echo "COPY --from=builder /build/jvrKsTB9MfYGnAXtxbzFYpXKceXr9J8J8ej6uWGrYM5tXswhJ /root/.avalanchego/plugins/o1Fg94YujMqL75Ebrdkos95MTVjZpPpdeAp5ocEsp2X9c2FSz" >> Dockerfile | ||
./scripts/build_image.sh | ||
env: | ||
CURRENT_BRANCH: ${{ github.head_ref || github.ref_name }} | ||
PUSH_DOCKER_IMAGE: true | ||
DOCKERHUB_REPO: hubbleexchange/hubblenet | ||
GITHUB_TAG: ${{ steps.get_tag.outputs.tag }} | ||
GITHUB_SHA: ${{ github.sha }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: Build + Push release image | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_tag: | ||
description: 'Release tag' | ||
required: true | ||
type: string | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build_release_image: | ||
name: Build Docker Image | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Login to Docker hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASS }} | ||
|
||
- name: Create the Dockerfile | ||
env: | ||
HUBBLENET_RELEASE_TAG: ${{ inputs.release_tag }} | ||
AVALANCHE_VERSION: ${{ vars.AVALANCHE_VERSION }} | ||
run: | | ||
if [ "${HUBBLENET_RELEASE_TAG:0:1}" = "v" ]; then | ||
HUBBLENET_VERSION="${HUBBLENET_RELEASE_TAG:1}"; | ||
HUBBLENET_RELEASE_TAG="${HUBBLENET_RELEASE_TAG}"; | ||
else | ||
HUBBLENET_VERSION="${HUBBLENET_RELEASE_TAG}"; | ||
fi | ||
multiline_text=$(cat <<EOF | ||
FROM avaplatform/avalanchego:${AVALANCHE_VERSION} as builder | ||
RUN apt update \ | ||
&& DEBIAN_FRONTEND="noninteractive" apt install -y wget \ | ||
&& cd /tmp \ | ||
&& wget https://github.com/hubble-exchange/hubblenet/releases/download/${HUBBLENET_RELEASE_TAG}/hubblenet_${HUBBLENET_VERSION}_linux_amd64.tar.gz \ | ||
&& tar -xf hubblenet_${HUBBLENET_VERSION}_linux_amd64.tar.gz | ||
FROM avaplatform/avalanchego:${AVALANCHE_VERSION} | ||
LABEL Description="Hubblenet image" | ||
ARG VM_ID | ||
RUN mkdir -p /root/.avalanchego/plugins \ | ||
&& DEBIAN_FRONTEND="noninteractive" apt update \ | ||
&& DEBIAN_FRONTEND="noninteractive" apt install -y wget | ||
COPY --from=builder /tmp/hubblenet-${HUBBLENET_VERSION} /root/.avalanchego/plugins/\${VM_ID} | ||
EOF | ||
) | ||
echo "$multiline_text" > Dockerfile-release | ||
cat Dockerfile-release | ||
- name: Build and push release image for the mainnet | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./Dockerfile-release | ||
push: true | ||
tags: "hubbleexchange/hubblenet:${{ vars.AVALANCHE_VERSION }}-${{ inputs.release_tag }}" | ||
build-args: | | ||
VM_ID=o1Fg94YujMqL75Ebrdkos95MTVjZpPpdeAp5ocEsp2X9c2FSz | ||
- name: Build and push release image for the fuji | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./Dockerfile-release | ||
push: true | ||
tags: "hubbleexchange/hubblenet:${{ vars.AVALANCHE_VERSION }}-fuji-${{ inputs.release_tag }}" | ||
build-args: | | ||
VM_ID=jvrKsTB9MfYGnAXtxbzFYpXKceXr9J8J8ej6uWGrYM5tXswhJ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"state-sync-enabled": true, | ||
"feeRecipient": "0xB3D25D47291D7F8b97FE3884A924541cDDcbB8Be", | ||
"node-type": "tresor" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.