Skip to content

Commit

Permalink
CI - update zombie builder build steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Azovtsev committed Jan 26, 2025
1 parent c31e29c commit 0fa107f
Showing 1 changed file with 68 additions and 6 deletions.
74 changes: 68 additions & 6 deletions .github/workflows/zombie-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,17 @@ env:

jobs:
build_polkadot_builder:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- platform: linux/amd64
os: ubuntu-24.04
- platform: linux/arm64
os: ubuntu-24.04-arm
timeout-minutes: 60
env:
PLATFORM: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -103,7 +112,53 @@ jobs:
- name: "Build Polkadot Builder"
working-directory: ./zombienet/docker
if: env.exists == 'false' || github.event.inputs.polkadot_builder == 'true'
run: make polkadot_builder_all_arch
run: make polkadot_builder && make polkadot_builder_push

- name: "Versions Info"
if: always()
working-directory: ./zombienet/docker
run: |
make polkadot_builder_image_info
docker_manifest:
runs-on: ubuntu-24.04
timeout-minutes: 60
needs: [build_polkadot_builder]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Fetch master branch
run: git fetch origin master:master

- name : "Authenticate with Google Cloud"
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}

- name: "Set up Cloud SDK"
uses: 'google-github-actions/setup-gcloud@v2'

- name: "Configure Docker for GCR"
run: |
gcloud auth configure-docker --quiet
gcloud auth configure-docker ${{ secrets.GCP_REGISTRY }} --quiet
- name: "Check if image tag exists using Makefile"
id: check-tag
working-directory: ./zombienet/docker
run: |
make set_versions
exists=$(make polkadot_builder_check_tag)
echo "Image Exists: $exists"
echo "exists=$exists" >> $GITHUB_ENV
- name: "Build Polkadot Builder"
working-directory: ./zombienet/docker
if: env.exists == 'false' || github.event.inputs.polkadot_builder == 'true'
run: make polkadot_builder_push_manifest

- name: "Versions Info"
if: always()
Expand All @@ -122,13 +177,20 @@ jobs:
# os: ubuntu-24.04
# - platform: linux/arm64
# os: ubuntu-24.04-arm
needs: [build_polkadot_builder]
needs:
- build_polkadot_builder
- docker_manifest
timeout-minutes: 120

steps:
- name: Checkout repository
uses: actions/checkout@v4

with:
fetch-depth: 0

- name: Fetch master branch
run: git fetch origin master:master

- uses: actions/cache@v4
with:
path: ${{ env.CACHE_PATHS }}
Expand All @@ -148,12 +210,12 @@ jobs:
gcloud auth configure-docker ${{ secrets.GCP_REGISTRY }} --quiet
- name: "Build target"
if: github.event.inputs.polkadot_binaries == true
if: github.event.inputs.polkadot_binaries == 'true'
working-directory: ./zombienet/docker
run: make polkadot_binary

- name: "Push Polkadot APT Package"
if: github.event.inputs.polkadot_binaries == true
if: github.event.inputs.polkadot_binaries == 'true'
working-directory: ./zombienet/docker
run: make upload_apt_package

Expand Down

0 comments on commit 0fa107f

Please sign in to comment.