The home for Hyperlane core contracts, sdk packages, and other infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hyperlane-monorepo/.github/workflows/monorepo-docker.yml

92 lines
2.9 KiB

Helloworld kathy infra (#636) * Alpha7 * Checker * Move AbacusCoreChecker to deploy * Transfer ownership of Router in RouterDeployer (#546) * Transfer ownership of Router in RouterDeployer * Improve router config/deploy/init (#557) * Add default initialize to Router * Remove proxies from router framework Co-authored-by: yorhodes <yorke@useabacus.network> * Update router tests for initialization * Move libs to contracts dir * Publish alpha12 * Publish beta1 * Small adjustments * Fix lint * Add newlines to package json * Publish beta3 * Add hello world commands to infra * Make hello world artifacts consistent with infra * Add back helloworld after merge * Fix kathy scripts for 0.2.2 Hoist resolveJsonModule ts config to root * Run prettier * Cleanup tsconfig trailing commas * initial dockerfile * Update and cleanup Ethers.JS Dependencies (#510) - Update all deps to latest ethers.js and remove redundancies - Replace celo-ethers-provider dep with celo-ethers-wrapper * Update yarn.lock * rm old scripts * Override GCP secrets with env vars, some initial infra * log errors * Replace celo-ethers-wrapper with new celo-ethers-provider lib * Use recomemnded alfajores forno url * Helloworld-kathy tooling * Config stuff * monorepo docker image ci * Bump patch versions * Make infra private (for now) * Stash deployment artifacts * Fix prettier * Add ethereum partial deployment * Add helloworld git submodule * Ensure contracts are connected at end of deploy * Updates for hello world * Add submodule status config * Update submodule to branch * Add post-merge git hook for submodule init update * Try post checkout hook * Make post-checkout executable * Update submodule without yarn.lock * Add remote flag to git submodule update * Update submodule again * Adjust post checkout hook * Add submodules true to github actions checkout * Move helloworld mod to main * Fix github actions checkout submodules * Add submodules true for yarn build step * fix kathy * nit name * try rm submodule? * rm submodule bit in husky post-checkout * Try again * no need to try catch * buildin * Getting rid of unintentional changes * Clean up a lil * Config * fix build .... * better dockerfile * Cleanin * nearly there * one step closer * agh * Gracefully handle errors * Don't hardcode gas * Final schedules * rm accidental submodule * Add comments describing env var overriding * Cleaning up * Avoid race cond * 0.2.4 * PR comments * New kathy img * Allow CHAINS_TO_SKIP to be an empty str * upgrade kathy img * once every hour * once every 2 hrs actually Co-authored-by: nambrot <nambrot@googlemail.com> Co-authored-by: yorhodes <yorke@useabacus.network> Co-authored-by: J M Rossy <jm.rossy@gmail.com>
2 years ago
name: Build and Push Monorepo Image to GCR
on:
push:
branches: [main]
tags:
- '**'
pull_request:
paths:
# For now, because this image is only used to use `infra`, we just build for infra or .registryrc changes
Helloworld kathy infra (#636) * Alpha7 * Checker * Move AbacusCoreChecker to deploy * Transfer ownership of Router in RouterDeployer (#546) * Transfer ownership of Router in RouterDeployer * Improve router config/deploy/init (#557) * Add default initialize to Router * Remove proxies from router framework Co-authored-by: yorhodes <yorke@useabacus.network> * Update router tests for initialization * Move libs to contracts dir * Publish alpha12 * Publish beta1 * Small adjustments * Fix lint * Add newlines to package json * Publish beta3 * Add hello world commands to infra * Make hello world artifacts consistent with infra * Add back helloworld after merge * Fix kathy scripts for 0.2.2 Hoist resolveJsonModule ts config to root * Run prettier * Cleanup tsconfig trailing commas * initial dockerfile * Update and cleanup Ethers.JS Dependencies (#510) - Update all deps to latest ethers.js and remove redundancies - Replace celo-ethers-provider dep with celo-ethers-wrapper * Update yarn.lock * rm old scripts * Override GCP secrets with env vars, some initial infra * log errors * Replace celo-ethers-wrapper with new celo-ethers-provider lib * Use recomemnded alfajores forno url * Helloworld-kathy tooling * Config stuff * monorepo docker image ci * Bump patch versions * Make infra private (for now) * Stash deployment artifacts * Fix prettier * Add ethereum partial deployment * Add helloworld git submodule * Ensure contracts are connected at end of deploy * Updates for hello world * Add submodule status config * Update submodule to branch * Add post-merge git hook for submodule init update * Try post checkout hook * Make post-checkout executable * Update submodule without yarn.lock * Add remote flag to git submodule update * Update submodule again * Adjust post checkout hook * Add submodules true to github actions checkout * Move helloworld mod to main * Fix github actions checkout submodules * Add submodules true for yarn build step * fix kathy * nit name * try rm submodule? * rm submodule bit in husky post-checkout * Try again * no need to try catch * buildin * Getting rid of unintentional changes * Clean up a lil * Config * fix build .... * better dockerfile * Cleanin * nearly there * one step closer * agh * Gracefully handle errors * Don't hardcode gas * Final schedules * rm accidental submodule * Add comments describing env var overriding * Cleaning up * Avoid race cond * 0.2.4 * PR comments * New kathy img * Allow CHAINS_TO_SKIP to be an empty str * upgrade kathy img * once every hour * once every 2 hrs actually Co-authored-by: nambrot <nambrot@googlemail.com> Co-authored-by: yorhodes <yorke@useabacus.network> Co-authored-by: J M Rossy <jm.rossy@gmail.com>
2 years ago
- 'typescript/infra/**'
- '.registryrc'
- 'Dockerfile'
- '.dockerignore'
- '.github/workflows/monorepo-docker.yml'
concurrency:
group: build-push-monorepo-${{ github.ref }}
cancel-in-progress: true
jobs:
check-env:
runs-on: ubuntu-latest
# assign output from step to job output
outputs:
gcloud-service-key: ${{ steps.gcloud-service-key.outputs.defined }}
steps:
- id: gcloud-service-key
# assign GCLOUD_SERVICE_KEY to env for access in conditional
env:
GCLOUD_SERVICE_KEY: ${{ secrets.GCLOUD_SERVICE_KEY }}
if: "${{ env.GCLOUD_SERVICE_KEY != '' }}"
# runs if GCLOUD_SERVICE_KEY is defined, so we set the output to true
feat: remove extraneous caching (#4469) feat: remove yarn build cache - saves 600MB of cache space PER COMMIT - doesn't impact overall per-commit CI time - better CI time in the general case due to fewer cache evictions on the e2e matrix job - [with caching](https://github.com/hyperlane-xyz/hyperlane-monorepo/actions/runs/10797745470) vs [no caching](https://github.com/hyperlane-xyz/hyperlane-monorepo/actions/runs/10797213927?pr=4469) drive-by: disable docker caching for agent build - currently cache has no impact on build time of the agent image - rerunning builds for a commit or pushing empty commits should in theory lead to quicker builds with layer caching, but the main problem is that the `RUN` step of building the agents is not cached by the docker action - only RUNs with bind mounts get a checksum computed [(reference)](https://docs.docker.com/build/cache/invalidation/#general-rules) - disabling docker build caching could help save a bunch of cache space - best way to 4x speed here is moving this job to a buildjet 8vcpu runner (read [here](https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/4445) for more info) drive-by: TLC - update to latest docker build action - provides a nice build summary and can generate artifacts that help break down where build time is spent - update check-env before build, given the current deprecation annotations - https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ - coverage step doesn't need to wait for `yarn-test` anymore
3 months ago
run: echo "defined=true" >> $GITHUB_OUTPUT
build-and-push-to-gcr:
runs-on: ubuntu-latest
# uses check-env to determine if secrets.GCLOUD_SERVICE_KEY is defined
needs: [check-env]
if: needs.check-env.outputs.gcloud-service-key == 'true'
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
submodules: recursive
- name: Generate tag data
id: taggen
run: |
echo "TAG_DATE=$(date +'%Y%m%d-%H%M%S')" >> $GITHUB_OUTPUT
echo "TAG_SHA=$(echo '${{ github.event.pull_request.head.sha || github.sha }}' | cut -b 1-7)" >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
gcr.io/abacus-labs-dev/hyperlane-monorepo
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=ref,event=pr
type=raw,value=${{ steps.taggen.outputs.TAG_SHA }}-${{ steps.taggen.outputs.TAG_DATE }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GCR
uses: docker/login-action@v3
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.GCLOUD_SERVICE_KEY }}
- name: Read .registryrc
shell: bash
run: |
REGISTRY_VERSION=$(cat .registryrc)
echo "REGISTRY_VERSION=$REGISTRY_VERSION" >> $GITHUB_ENV
- name: Build and push
feat: remove extraneous caching (#4469) feat: remove yarn build cache - saves 600MB of cache space PER COMMIT - doesn't impact overall per-commit CI time - better CI time in the general case due to fewer cache evictions on the e2e matrix job - [with caching](https://github.com/hyperlane-xyz/hyperlane-monorepo/actions/runs/10797745470) vs [no caching](https://github.com/hyperlane-xyz/hyperlane-monorepo/actions/runs/10797213927?pr=4469) drive-by: disable docker caching for agent build - currently cache has no impact on build time of the agent image - rerunning builds for a commit or pushing empty commits should in theory lead to quicker builds with layer caching, but the main problem is that the `RUN` step of building the agents is not cached by the docker action - only RUNs with bind mounts get a checksum computed [(reference)](https://docs.docker.com/build/cache/invalidation/#general-rules) - disabling docker build caching could help save a bunch of cache space - best way to 4x speed here is moving this job to a buildjet 8vcpu runner (read [here](https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/4445) for more info) drive-by: TLC - update to latest docker build action - provides a nice build summary and can generate artifacts that help break down where build time is spent - update check-env before build, given the current deprecation annotations - https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ - coverage step doesn't need to wait for `yarn-test` anymore
3 months ago
uses: docker/build-push-action@v6
with:
Helloworld kathy infra (#636) * Alpha7 * Checker * Move AbacusCoreChecker to deploy * Transfer ownership of Router in RouterDeployer (#546) * Transfer ownership of Router in RouterDeployer * Improve router config/deploy/init (#557) * Add default initialize to Router * Remove proxies from router framework Co-authored-by: yorhodes <yorke@useabacus.network> * Update router tests for initialization * Move libs to contracts dir * Publish alpha12 * Publish beta1 * Small adjustments * Fix lint * Add newlines to package json * Publish beta3 * Add hello world commands to infra * Make hello world artifacts consistent with infra * Add back helloworld after merge * Fix kathy scripts for 0.2.2 Hoist resolveJsonModule ts config to root * Run prettier * Cleanup tsconfig trailing commas * initial dockerfile * Update and cleanup Ethers.JS Dependencies (#510) - Update all deps to latest ethers.js and remove redundancies - Replace celo-ethers-provider dep with celo-ethers-wrapper * Update yarn.lock * rm old scripts * Override GCP secrets with env vars, some initial infra * log errors * Replace celo-ethers-wrapper with new celo-ethers-provider lib * Use recomemnded alfajores forno url * Helloworld-kathy tooling * Config stuff * monorepo docker image ci * Bump patch versions * Make infra private (for now) * Stash deployment artifacts * Fix prettier * Add ethereum partial deployment * Add helloworld git submodule * Ensure contracts are connected at end of deploy * Updates for hello world * Add submodule status config * Update submodule to branch * Add post-merge git hook for submodule init update * Try post checkout hook * Make post-checkout executable * Update submodule without yarn.lock * Add remote flag to git submodule update * Update submodule again * Adjust post checkout hook * Add submodules true to github actions checkout * Move helloworld mod to main * Fix github actions checkout submodules * Add submodules true for yarn build step * fix kathy * nit name * try rm submodule? * rm submodule bit in husky post-checkout * Try again * no need to try catch * buildin * Getting rid of unintentional changes * Clean up a lil * Config * fix build .... * better dockerfile * Cleanin * nearly there * one step closer * agh * Gracefully handle errors * Don't hardcode gas * Final schedules * rm accidental submodule * Add comments describing env var overriding * Cleaning up * Avoid race cond * 0.2.4 * PR comments * New kathy img * Allow CHAINS_TO_SKIP to be an empty str * upgrade kathy img * once every hour * once every 2 hrs actually Co-authored-by: nambrot <nambrot@googlemail.com> Co-authored-by: yorhodes <yorke@useabacus.network> Co-authored-by: J M Rossy <jm.rossy@gmail.com>
2 years ago
context: ./
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
Helloworld kathy infra (#636) * Alpha7 * Checker * Move AbacusCoreChecker to deploy * Transfer ownership of Router in RouterDeployer (#546) * Transfer ownership of Router in RouterDeployer * Improve router config/deploy/init (#557) * Add default initialize to Router * Remove proxies from router framework Co-authored-by: yorhodes <yorke@useabacus.network> * Update router tests for initialization * Move libs to contracts dir * Publish alpha12 * Publish beta1 * Small adjustments * Fix lint * Add newlines to package json * Publish beta3 * Add hello world commands to infra * Make hello world artifacts consistent with infra * Add back helloworld after merge * Fix kathy scripts for 0.2.2 Hoist resolveJsonModule ts config to root * Run prettier * Cleanup tsconfig trailing commas * initial dockerfile * Update and cleanup Ethers.JS Dependencies (#510) - Update all deps to latest ethers.js and remove redundancies - Replace celo-ethers-provider dep with celo-ethers-wrapper * Update yarn.lock * rm old scripts * Override GCP secrets with env vars, some initial infra * log errors * Replace celo-ethers-wrapper with new celo-ethers-provider lib * Use recomemnded alfajores forno url * Helloworld-kathy tooling * Config stuff * monorepo docker image ci * Bump patch versions * Make infra private (for now) * Stash deployment artifacts * Fix prettier * Add ethereum partial deployment * Add helloworld git submodule * Ensure contracts are connected at end of deploy * Updates for hello world * Add submodule status config * Update submodule to branch * Add post-merge git hook for submodule init update * Try post checkout hook * Make post-checkout executable * Update submodule without yarn.lock * Add remote flag to git submodule update * Update submodule again * Adjust post checkout hook * Add submodules true to github actions checkout * Move helloworld mod to main * Fix github actions checkout submodules * Add submodules true for yarn build step * fix kathy * nit name * try rm submodule? * rm submodule bit in husky post-checkout * Try again * no need to try catch * buildin * Getting rid of unintentional changes * Clean up a lil * Config * fix build .... * better dockerfile * Cleanin * nearly there * one step closer * agh * Gracefully handle errors * Don't hardcode gas * Final schedules * rm accidental submodule * Add comments describing env var overriding * Cleaning up * Avoid race cond * 0.2.4 * PR comments * New kathy img * Allow CHAINS_TO_SKIP to be an empty str * upgrade kathy img * once every hour * once every 2 hrs actually Co-authored-by: nambrot <nambrot@googlemail.com> Co-authored-by: yorhodes <yorke@useabacus.network> Co-authored-by: J M Rossy <jm.rossy@gmail.com>
2 years ago
cache-to: type=gha,mode=max
build-args: |
REGISTRY_COMMIT=${{ env.REGISTRY_VERSION }}