Skip to content

Commit

Permalink
Devnet-Add release pipeline for devnet (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
naveen-consensys authored Nov 10, 2024
1 parent 59a8e76 commit 304ea29
Showing 1 changed file with 117 additions and 0 deletions.
117 changes: 117 additions & 0 deletions .github/workflows/linea-devnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: linea-devnet

on:
workflow_call:
outputs:
workflow_run_id:
description: "the run id of the workflow"
value: ${{ jobs.build.outputs.workflow_run_id }}
workflow_dispatch:

permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
environment: build
outputs:
workflow_run_id: ${{ steps.workflow_details.outputs.id }}
steps:

- name: checkout
uses: actions/checkout@v4

- name: get workflow_details
id: workflow_details
run: echo "id=${{ github.run_id }}" >> $GITHUB_OUTPUT

- name: get versions via dotenv
id: dotenv
uses: falti/dotenv-action@v1
with:
path: versions/linea-devnet.env
mode: development
keys-case: lower
log-variables: true
load-mode: strict

- name: set docker tag
id: dockertag
run: |
if [ "${{ github.event_name }}" == "push" ] && [ "${{ github.ref_type }}" == "tag" ]; then
echo "IMAGE=devnet-${{ github.ref_name }}" >> $GITHUB_OUTPUT
else
echo "IMAGE=devnet-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
fi
- name: download and untar the linea-besu archive
run: |
cd /tmp/
echo "downloading linea-besu: ${{ steps.dotenv.outputs.linea_besu_tar_gz }}"
wget -nv "https://artifacts.consensys.net/public/linea-besu/raw/names/linea-besu.tar.gz/versions/${{ steps.dotenv.outputs.linea_besu_tar_gz }}/linea-besu-${{ steps.dotenv.outputs.linea_besu_tar_gz }}.tar.gz"
tar -xvf linea-besu-${{ steps.dotenv.outputs.linea_besu_tar_gz }}.tar.gz
mkdir -p /opt/besu
mv /tmp/linea-besu-${{ steps.dotenv.outputs.linea_besu_tar_gz }}/* /opt/besu/
echo "moved to /opt/besu"
- name: copy the list of versions to the container
run: |
cp ./versions/linea-devnet.env /opt/besu/versions.txt
mkdir -p /opt/besu/plugins
- name: get the plugins
run: |
cd /opt/besu/plugins
echo "getting linea_sequencer_plugin_version: ${{ steps.dotenv.outputs.linea_sequencer_plugin_version }}"
wget -nv "https://github.com/Consensys/linea-sequencer/releases/download/v${{ steps.dotenv.outputs.linea_sequencer_plugin_version }}/besu-sequencer-plugins-v${{ steps.dotenv.outputs.linea_sequencer_plugin_version }}.jar" -P /opt/besu/plugins
echo "getting finalized_tag_updater_plugin_version: ${{ steps.dotenv.outputs.finalized_tag_updater_plugin_version }}"
wget -nv "https://github.com/Consensys/linea-monorepo/releases/download/finalized-tag-updater-v${{ steps.dotenv.outputs.finalized_tag_updater_plugin_version }}/finalized-tag-updater-v${{ steps.dotenv.outputs.finalized_tag_updater_plugin_version }}.jar" -P /opt/besu/plugins
echo "getting linea_tracer_plugin_version: ${{ steps.dotenv.outputs.linea_tracer_plugin_version }}"
wget -nv "https://github.com/Consensys/linea-tracer/releases/download/v${{ steps.dotenv.outputs.linea_tracer_plugin_version }}/linea-tracer-v${{ steps.dotenv.outputs.linea_tracer_plugin_version }}.jar" -P /opt/besu/plugins
echo "getting shomei_plugin_version: ${{ steps.dotenv.outputs.shomei_plugin_version }}"
wget -nv "https://github.com/Consensys/besu-shomei-plugin/releases/download/v${{ steps.dotenv.outputs.shomei_plugin_version }}/besu-shomei-plugin-v${{ steps.dotenv.outputs.shomei_plugin_version }}.jar" -P /opt/besu/plugins
- name: piece the package together to build the docker images
run: |
cd linea-besu
mv /opt/besu ./
mv config/ genesis/ profiles/ besu/
tree .
# - name: set up docker buildx
# uses: docker/setup-buildx-action@v3

# - name: login to docker
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKER_USER_RW }}
# password: ${{ secrets.DOCKER_PASSWORD_RW }}

# - name: set docker build args
# run: |
# echo "BUILD_DATE=$(date --rfc-3339=date)" >> ${GITHUB_ENV}
# echo "Building image tag: ${{ steps.dockertag.outputs.IMAGE }}"

# - name: build and push the combined manifest
# uses: docker/build-push-action@v6
# env:
# DOCKER_BUILD_SUMMARY: false
# with:
# context: besu-fleet/.
# platforms: linux/arm64,linux/amd64
# provenance: false
# cache-from: type=local,src=/tmp/.buildx-cache
# cache-to: type=local,dest=/tmp/.buildx-cache
# build-args: |
# VERSION=${{ steps.dockertag.outputs.IMAGE }}
# VCS_REF=${{ github.sha }}
# BUILD_DATE=${{ env.BUILD_DATE }}
# push: true
# tags: |
# consensys/linea-besu-package:${{ steps.dockertag.outputs.IMAGE }}

0 comments on commit 304ea29

Please sign in to comment.