Skip to content

Commit

Permalink
Merge branch 'main' into renovate/all
Browse files Browse the repository at this point in the history
  • Loading branch information
gazwald authored Nov 2, 2023
2 parents 5ed65a0 + 7178309 commit 3eade3c
Show file tree
Hide file tree
Showing 13 changed files with 181 additions and 138 deletions.
11 changes: 11 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,15 @@
"config:base",
"group:all"
]
"customManagers": [
{
"customType": "regex",
"fileMatch": [
"^scripts/include/env-app$"
],
"matchStrings": [
"# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\s]+?))?\\s(?:ENV|ARG|export) .+?_VERSION[ =]\"?(?<currentValue>.+?)\"?\\s"
]
}
]
}
2 changes: 0 additions & 2 deletions .github/workflows/build_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,3 @@ jobs:
"POETRY_VERSION=${{ env.POETRY_VERSION }}"
push: true
tags: ${{ env.CONTAINER_IMAGE_REVISION }}
cache-from: type=gha
cache-to: type=gha,mode=max
22 changes: 12 additions & 10 deletions .github/workflows/test_cdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,28 @@ on:
branches:
- "main"
paths:
- '.github/workflows/test_cdk.yaml'
- '.github/workflows/lint_python.yaml'
- '.github/workflows/lint_yaml.yaml'
- 'docker/Dockerfile.cdk'
- '.github/workflows/test_cdk.yaml'
- 'deployment/**'
- 'test/unit/cdk/**'
- 'pyproject.toml'
- 'docker/Dockerfile.cdk'
- 'poetry.lock'
- 'pyproject.toml'
- 'scripts/cdk/*'
- 'scripts/include/cdk'
- 'test/unit/cdk/**'
pull_request:
branches:
- "main"
paths:
- '.github/workflows/test_cdk.yaml'
- '.github/workflows/lint_python.yaml'
- '.github/workflows/lint_yaml.yaml'
- 'docker/Dockerfile.cdk'
- '.github/workflows/test_cdk.yaml'
- 'deployment/**'
- 'test/unit/cdk/**'
- 'pyproject.toml'
- 'docker/Dockerfile.cdk'
- 'poetry.lock'
- 'pyproject.toml'
- 'scripts/cdk/*'
- 'scripts/include/cdk'
- 'test/unit/cdk/**'

jobs:
build:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test_master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ on:
- 'pyproject.toml'
- 'poetry.lock'
pull_request:
branches:
- "main"
paths:
- '.github/workflows/test_master.yaml'
- '.github/workflows/lint_python.yaml'
Expand Down
4 changes: 2 additions & 2 deletions scripts/cdk/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ set -euo pipefail
cd "$(git rev-parse --show-toplevel)" || exit 1

ACCOUNT=$(aws sts get-caller-identity | jq -r '.Account')
scripts/include/cdk cdk bootstrap "aws://${ACCOUNT}/us-west-2"
scripts/include/cdk cdk bootstrap "aws://${ACCOUNT}/us-east-1"
scripts/include/cdk bootstrap "aws://${ACCOUNT}/us-west-2"
scripts/include/cdk bootstrap "aws://${ACCOUNT}/us-east-1"
2 changes: 1 addition & 1 deletion scripts/cdk/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ set -euo pipefail

cd "$(git rev-parse --show-toplevel)" || exit 1

scripts/include/cdk cdk deploy --app ./app.py
scripts/include/cdk deploy --app ./app.py
2 changes: 1 addition & 1 deletion scripts/cdk/ls
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ set -euo pipefail

cd "$(git rev-parse --show-toplevel)" || exit 1

scripts/include/cdk cdk ls
scripts/include/cdk ls
2 changes: 1 addition & 1 deletion scripts/cdk/synth
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ set -euo pipefail

cd "$(git rev-parse --show-toplevel)" || exit 1

scripts/include/cdk cdk synth
scripts/include/cdk synth
6 changes: 3 additions & 3 deletions scripts/include/build
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ cd "$(git rev-parse --show-toplevel)" || exit
CONTAINER=${1:-}
source scripts/include/env-container-build "$CONTAINER"

if [ "$CONTAINER_SKIP_BUILD" != "TRUE" ]; then
if [ "$CONTAINER_SKIP_BUILD" == "TRUE" ]; then
echo "+++ Skipped build for ${CONTAINER_IMAGE_REVISION} +++"
else
echo "+++ Building ${CONTAINER_IMAGE_REVISION} +++"
$CONTAINER_COMMAND build \
"${CONTAINER_BUILD_OPTIONS[@]}" \
--tag "${CONTAINER_IMAGE_REVISION}"
else
echo "+++ Skipped build for ${CONTAINER_IMAGE_REVISION} +++"
fi
10 changes: 7 additions & 3 deletions scripts/include/cdk
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ set -euo pipefail

cd "$(git rev-parse --show-toplevel)" || exit 1

source scripts/include/build-env
scripts/build-cdk > /dev/null
source scripts/include/build cdk >/dev/null 2>&1
source scripts/include/env-container-run

CONTAINER_AWS_OPTIONS+=(
--env JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION=True
)

# shellcheck disable=SC2206
CONTAINER_RUN_OPTIONS+=(
Expand All @@ -16,5 +20,5 @@ CONTAINER_RUN_OPTIONS+=(
$CONTAINER_COMMAND run \
"${CONTAINER_RUN_OPTIONS[@]}" \
"${CONTAINER_AWS_OPTIONS[@]}" \
"${APP_NAME}/cdk:latest" \
"${CONTAINER_IMAGE_REVISION}" \
"$@"
14 changes: 6 additions & 8 deletions scripts/include/env-app
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ set -euo pipefail

cd "$(git rev-parse --show-toplevel)" || exit

if ! test -f pyproject.toml; then
echo "Missing pyproject.toml"
exit 1;
fi

#
# General app variables
#
Expand All @@ -21,9 +16,12 @@ export MASTER_HEALTHCHECK="8080/tcp"
#
# Depenency versions
#
CDK_VERSION=$(awk '/^aws-cdk-lib = / {gsub(/"/, "", $3); gsub(/\^/, "", $3); print $3}' pyproject.toml)
POETRY_VERSION=$(awk '/^poetry = / {gsub(/"/, "", $3); gsub(/\^/, "", $3); print $3}' pyproject.toml)
PIP_VERSION=$(awk '/^pip = / {gsub(/"/, "", $3); gsub(/\^/, "", $3); print $3}' pyproject.toml)
# renovate: datasource=pypi depName=aws-cdk-lib
export CDK_VERSION="2.103.1"
# renovate: datasource=pypi depName=pip
export PIP_VERSION="23.3.1"
# renovate: datasource=pypi depName=poetry
export POETRY_VERSION="1.6.1"

export CDK_VERSION
export POETRY_VERSION
Expand Down
Loading

0 comments on commit 3eade3c

Please sign in to comment.