Skip to content

Commit

Permalink
ci: comments with todo to uncomment blocks once final PR version is r…
Browse files Browse the repository at this point in the history
…eady

Signed-off-by: Misha Sakhnov <[email protected]>
  • Loading branch information
mikhail-sakhnov committed Oct 29, 2024
1 parent 3e193a1 commit 0cf6386
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,6 @@ env:
ECR_DEV: "369495373322.dkr.ecr.eu-central-1.amazonaws.com"
ECR_PROD: "093970136003.dkr.ecr.eu-central-1.amazonaws.com"

# Why localhost? We use a local registry so that when docker/build-push-action tries to pull the
# image we built locally, it'll actually have a place to pull from.
#
# Otherwise, if we just try to use a local image, it fails trying to pull it from dockerhub.
# See https://github.com/moby/buildkit/issues/2343 for more information.
# GO_BASE_IMG_PREFIX: "localhost:5000/neondatabase/autoscaling-go-base"
# Default architecture to build. In future it would be changed to multi-arch build or separate builds for each arch
TARGET_ARCH: "amd64" # move to matrix strategy

defaults:
run:
shell: bash -euo pipefail {0}
Expand All @@ -93,7 +84,8 @@ jobs:
echo "scheduler=${{ env.IMG_SCHEDULER }}-${{matrix.arch}}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
echo "autoscaler-agent=${{ env.IMG_AUTOSCALER_AGENT }}-${{matrix.arch}}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
echo "cluster-autoscaler=${{ env.IMG_CLUSTER_AUTOSCALER }}-${{matrix.arch}}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
# TODO: uncomment when the final PR version is ready
# vm-kernel:
# # nb: use format(..) to catch both inputs.skip = true AND inputs.skip = 'true'.
# if: ${{ format('{0}', inputs.skip) != 'true' }}
Expand All @@ -110,8 +102,13 @@ jobs:
build:
# nb: use format(..) to catch both inputs.skip = true AND inputs.skip = 'true'.
if: ${{ format('{0}', inputs.skip) != 'true' }}
needs: [ tags ]
env:
needs: [ tags ] # TODO: return vm-kernel dependency when the final PR version is ready
env:
# Why localhost? We use a local registry so that when docker/build-push-action tries to pull the
# image we built locally, it'll actually have a place to pull from.
#
# Otherwise, if we just try to use a local image, it fails trying to pull it from dockerhub.
# See https://github.com/moby/buildkit/issues/2343 for more information.
GO_BASE_IMG: ${{ format('localhost:5000/neondatabase/autoscaling-go-base-{0}:dev', matrix.arch) }}
permissions:
contents: read # This is required for actions/checkout
Expand Down Expand Up @@ -177,7 +174,7 @@ jobs:
registry: cache.neon.build
username: ${{ secrets.NEON_CI_DOCKERCACHE_USERNAME }}
password: ${{ secrets.NEON_CI_DOCKERCACHE_PASSWORD }}

# TODO: uncomment when the final PR version is ready
# - name: Configure dev AWS credentials
# if: ${{ format('{0}', inputs.upload-to-ecr) == 'true' }}
# uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -214,7 +211,7 @@ jobs:
- name: Load VM kernel
env:
# IMAGE: ${{format(needs.vm-kernel.outputs.image_placeholder, matrix.arch)}}
# temporary always use image from one of the previous runs
# TODO: temporary always use image from one of the previous runs to speedup the build during debug
IMAGE: ${{format('neondatabase/vm-kernel-{0}:3372e65.11573472293', matrix.arch)}}
run: |
docker pull --quiet $IMAGE
Expand Down Expand Up @@ -328,7 +325,8 @@ jobs:
cache-to: ${{ github.ref_name == 'main' && 'type=registry,ref=cache.neon.build/cluster-autoscaler-neonvm:cache,mode=max' || '' }}
build-args: |
CA_GIT_TAG=${{ steps.get-ca-tag.outputs.tag }}
# TODO: Uncomment when the final PR version is ready
# - name: Copy all images to ECR
# if: ${{ format('{0}', inputs.upload-to-ecr) == 'true' }}
# run: |
Expand Down

0 comments on commit 0cf6386

Please sign in to comment.