From ab57b61dc739382f4825c5d4e31a4910cfcaf608 Mon Sep 17 00:00:00 2001 From: Pascal Casteran <15686972+pcasteran@users.noreply.github.com> Date: Sun, 4 Dec 2022 18:45:49 +0100 Subject: [PATCH] Update versions (#5) * Update versions * Reverted alpine version upgrade * Use correct CDKTF version * Fixed action * Fixed tests * Updated versions --- .github/workflows/build_test.yml | 13 ++++++++++++- Dockerfile | 16 ++++++++-------- test/go/main_full_test.go | 8 ++++---- test/python/test.bats | 2 +- 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index b6b588c..582ea4b 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -11,7 +11,6 @@ on: env: IMAGE_NAME: "cdktf-bundle" IMAGE_PLATFORMS: "linux/amd64,linux/arm64" - CDKTF_VERSION: "0.13.3" jobs: @@ -36,6 +35,18 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Use CDKTF version from tag + if: ${{ startsWith(github.event.ref, 'refs/tags/') }} + run: | + TAG_VERSION=$(echo "${{ github.event.ref }}" | sed -n 's/.*\/v\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p') + echo "CDKTF_VERSION=${TAG_VERSION}" >> "${GITHUB_ENV}" + + - name: Use CDKTF version from Dockerfile + if: ${{ !startsWith(github.event.ref, 'refs/tags/') }} + run: | + DOCKERFILE_VERSION=$(sed -n 's/^.*CDKTF_VERSION=\"\(.*\)\"$/\1/p' Dockerfile) + echo "CDKTF_VERSION=${DOCKERFILE_VERSION}" >> "${GITHUB_ENV}" + - name: Set up Docker if: ${{ startsWith(matrix.platform.runner, 'macos') }} run: | diff --git a/Dockerfile b/Dockerfile index f26d504..4d9c4d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,15 @@ ARG BASE="python" -ARG PYTHON_BASE_VERSION="3.10-alpine3.16" -ARG GO_BASE_VERSION="1.19-alpine3.16" +ARG PYTHON_BASE_VERSION="3.11-alpine3.17" +ARG GO_BASE_VERSION="1.19-alpine3.17" -ARG PIPENV_VERSION="2022.11.11" -ARG POETRY_VERSION="1.1.13-r2" +ARG PIPENV_VERSION="2022.11.30" +ARG POETRY_VERSION="1.2.2-r0" -ARG NODE_VERSION="18.9.1-r0" -ARG NPM_VERSION="8.10.0-r0" +ARG NODE_VERSION="18.12.1-r0" +ARG NPM_VERSION="9.1.2-r0" ARG TERRAFORM_VERSION="1.3.6" -ARG CDKTF_VERSION="0.13.3" +ARG CDKTF_VERSION="0.14.1" ## @@ -41,7 +41,7 @@ ARG CDKTF_VERSION # Install node and npm. RUN apk add --no-cache \ - nodejs-current=${NODE_VERSION} \ + nodejs=${NODE_VERSION} \ npm=${NPM_VERSION} # Install Terraform. diff --git a/test/go/main_full_test.go b/test/go/main_full_test.go index 793be12..e051efc 100644 --- a/test/go/main_full_test.go +++ b/test/go/main_full_test.go @@ -3,10 +3,10 @@ package main import ( "github.com/aws/constructs-go/constructs/v10" "github.com/aws/jsii-runtime-go" - localFile "github.com/cdktf/cdktf-provider-local-go/local/v3/file" - localProvider "github.com/cdktf/cdktf-provider-local-go/local/v3/provider" - randomProvider "github.com/cdktf/cdktf-provider-random-go/random/v3/provider" - "github.com/cdktf/cdktf-provider-random-go/random/v3/stringresource" + localFile "github.com/cdktf/cdktf-provider-local-go/local/v4/file" + localProvider "github.com/cdktf/cdktf-provider-local-go/local/v4/provider" + randomProvider "github.com/cdktf/cdktf-provider-random-go/random/v4/provider" + "github.com/cdktf/cdktf-provider-random-go/random/v4/stringresource" "github.com/hashicorp/terraform-cdk-go/cdktf" "os" "path/filepath" diff --git a/test/python/test.bats b/test/python/test.bats index 6e87e51..ccf4c5b 100755 --- a/test/python/test.bats +++ b/test/python/test.bats @@ -75,7 +75,7 @@ initialize_project() { assert_file_contains "poetry.lock" '^name = "cdktf"$' # Install the `random` provider. - run cdktf_bundle poetry add cdktf-cdktf-provider-random==3.0.11 + run cdktf_bundle poetry add cdktf-cdktf-provider-random assert_success assert_file_contains "pyproject.toml" '^cdktf-cdktf-provider-random = ".*"' assert_file_contains "poetry.lock" '^name = "cdktf-cdktf-provider-random"$'