Skip to content

fix(elasticache-alpha): deployment fails when serverlessCacheName or userGroupId is not specified #5964

fix(elasticache-alpha): deployment fails when serverlessCacheName or userGroupId is not specified

fix(elasticache-alpha): deployment fails when serverlessCacheName or userGroupId is not specified #5964

name: Codebuild PR Build
on:
workflow_dispatch: {}
merge_group: {}
push:
branches:
- main
- v2-release
pull_request: {}
pull_request_target:
branches:
- v2-release
types:
- opened
- synchronize
- reopened
# For every PR, cancel any previous builds in progress
# ... but for all other builds we keep them running
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
build:
# Runner exists only for aws-cdk repo
if: github.repository == 'aws/aws-cdk'
runs-on: codebuild-aws-cdk-github-actions-runner-${{ github.run_id }}-${{ github.run_attempt }}
env:
PR_BUILD: true
JSII_SILENCE_WARNING_DEPRECATED_NODE_VERSION: true
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "20"
cache: "yarn"
- name: Set up Docker
uses: docker/setup-buildx-action@v3
- name: Load Docker images
id: docker-cache
uses: actions/cache/restore@v5
with:
path: |
~/.docker-images.tar
key: docker-cache-${{ runner.os }}
- name: Restore Docker images
if: ${{ steps.docker-cache.outputs.cache-hit }}
run: docker image load --input ~/.docker-images.tar
- name: Cache build artifacts
uses: actions/cache@v5
with:
path: |
~/.s3buildcache
key: s3buildcache-${{ runner.os }}
- name: Configure system settings
run: |
(command -v sysctl || sudo apt-get update && sudo apt-get install -y procps) && \
sudo sysctl -w vm.max_map_count=2251954
- name: Build
run: /bin/bash ./build.sh --ci --concurrency 10
- name: Run Rosetta
run: /bin/bash ./scripts/run-rosetta.sh
- name: Check for uncommitted changes
run: git diff-index --exit-code --ignore-space-at-eol --stat HEAD
- name: Export Docker images
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
run: docker image save --output ~/.docker-images.tar $(docker image list --format '{{ if ne .Repository "<none>" }}{{ .Repository }}{{ if ne .Tag "<none>" }}:{{ .Tag }}{{ end }}{{ else }}{{ .ID }}{{ end }}')
- name: Cache Docker images
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
uses: actions/cache/save@v5
with:
path: |
~/.docker-images.tar
key: docker-cache-${{ runner.os }}
- name: Save PR info for PR Linter
if: github.event_name == 'pull_request'
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
run: |
mkdir -p ./pr
echo $PR_NUMBER > ./pr/pr_number
echo $PR_SHA > ./pr/pr_sha
- name: Upload PR info artifact
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v6
with:
name: pr_info
path: pr/