Skip to content

Commit 5491d3c

Browse files
authored
🔧 update Terraform 1.12 to minor 28, prepare beta-3 release, rework release workflow (#81)
* 🔧 updated Terraform 1.12 to minor 28, rework release workflow * 🐛 moved broken image release tag construction out of env vars * ⬆️ update default terraform version * 🐛 correct image build step, add missing dash in image tag * 📝 update readme with new tag strategy, correct image release tag * ⬆️ prepare terraform 0.13.0-beta3 release
1 parent 4125ae1 commit 5491d3c

File tree

4 files changed

+18
-22
lines changed

4 files changed

+18
-22
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ on:
55
release:
66
types: [published]
77

8-
env:
9-
ORGANIZATION: "zenika"
10-
IMAGE_NAME: "terraform-azure-cli"
11-
128
jobs:
139
lint:
1410
runs-on: ubuntu-latest
@@ -28,15 +24,15 @@ jobs:
2824

2925
strategy:
3026
matrix:
31-
versions:
32-
- { tf_version: "0.11.14", azcli_version: "2.8.0" }
33-
- { tf_version: "0.12.26", azcli_version: "2.8.0" }
34-
- { tf_version: "0.13.0-beta2", azcli_version: "2.8.0" }
27+
tf_version:
28+
- "0.11.14"
29+
- "0.12.28"
30+
- "0.13.0-beta3"
3531

3632
env:
37-
TF_VERSION: ${{ matrix.versions.tf_version }}
38-
AWS_CLI_VERSIOIN: ${{ matrix.versions.azcli_version }}
39-
IMAGE_TAG: "tf${{ matrix.versions.tf_version }}-azcli${{ matrix.versions.azcli_version }}"
33+
ORGANIZATION: "zenika"
34+
IMAGE_NAME: "terraform-azure-cli"
35+
AZURE_CLI_VERSION: "2.8.0"
4036

4137
steps:
4238
- name: Check out the repo
@@ -46,19 +42,19 @@ jobs:
4642
run: echo "::set-env name=RELEASE_TAG::${GITHUB_REF##*/}"
4743

4844
- name: Build and save image release tag
49-
run: echo "::set-env name=IMAGE_RELEASE_TAG::r${RELEASE_TAG}-${IMAGE_TAG}"
45+
run: echo "::set-env name=IMAGE_RELEASE_TAG::release-${RELEASE_TAG}_terraform-${{ matrix.tf_version }}_azcli-${{ env.AZURE_CLI_VERSION }}"
5046

5147
- name: Build image
52-
run: docker image build . --file Dockerfile --build-arg TERRAFORM_VERSION=$TF_VERSION --build-arg AWS_CLI_VERSION=$AWS_CLI_VERSIOIN --tag $ORGANIZATION/$IMAGE_NAME:$IMAGE_RELEASE_TAG
48+
run: docker image build . --file Dockerfile --build-arg TERRAFORM_VERSION=${{ matrix.tf_version }} --build-arg AZURE_CLI_VERSION=${AZURE_CLI_VERSION} --tag ${ORGANIZATION}/${IMAGE_NAME}:${IMAGE_RELEASE_TAG}
5349

5450
- name: Login to Docker Hub registry
5551
run: echo '${{ secrets.DOCKERHUB_PASS }}' | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
5652

5753
- name: Push image to registry
58-
run: docker push $ORGANIZATION/$IMAGE_NAME:$IMAGE_RELEASE_TAG
54+
run: docker push ${ORGANIZATION}/${IMAGE_NAME}:${IMAGE_RELEASE_TAG}
5955

6056
- name: Save image
61-
run: docker image save -o $IMAGE_NAME-$IMAGE_RELEASE_TAG.tar $ORGANIZATION/$IMAGE_NAME:$IMAGE_RELEASE_TAG
57+
run: docker image save -o ${IMAGE_NAME}-${IMAGE_RELEASE_TAG}.tar ${ORGANIZATION}/${IMAGE_NAME}:${IMAGE_RELEASE_TAG}
6258

6359
- name: Upload image artifact
6460
uses: actions/upload-artifact@v2

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Setup build arguments with default versions
22
ARG AZURE_CLI_VERSION=2.8.0
3-
ARG TERRAFORM_VERSION=0.12.26
3+
ARG TERRAFORM_VERSION=0.12.28
44
ARG PYTHON_MAJOR_VERSION=3.7
55
ARG DEBIAN_VERSION=buster-20200514-slim
66

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ Available image tags can be found on the Docker Hub registry: [zenika/terraform-
1818
The following image tag strategy is applied:
1919
* `zenika/terraform-azure-cli:latest` - build from master
2020
* Included CLI versions can be found in the [Dockerfile](https://github.com/Zenika/terraform-azure-cli/blob/master/Dockerfile)
21-
* `zenika/terraform-azure-cli:rS.T-tfUU.VV.WW-azcliXX.YY.ZZ` - build from releases
22-
* `rS.T` is the release tag
23-
* `tfUU.VV.WWW` is the included Terraform CLI version
24-
* `azcliXX.YY.ZZ` is the included Azure CLI version
21+
* `zenika/terraform-azure-cli:release-S.T_terraform-UU.VV.WW_azcli-XX.YY.ZZ` - build from releases
22+
* `release-S.T` is the release tag
23+
* `terraform-UU.VV.WWW` is the included Terraform CLI version
24+
* `azcli-XX.YY.ZZ` is the included Azure CLI version
2525

2626
Please report to the [releases page](https://github.com/Zenika/terraform-azure-cli/releases) for the changelogs. Any other tags are not supported.
2727

@@ -71,7 +71,7 @@ Optionally, it is possible to choose the tools desired versions using [Docker bu
7171
```bash
7272
# Set tools desired versions
7373
AZURE_CLI_VERSION=2.8.0
74-
TERRAFORM_VERSION=0.12.26
74+
TERRAFORM_VERSION=0.12.28
7575

7676
# launch the build script with parameters
7777
./dev-build.sh $AZURE_CLI_VERSION $TERRAFORM_VERSION

tests/container-structure-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ commandTests:
2121
- name: "Check Terraform CLI version"
2222
command: "terraform"
2323
args: ["version"]
24-
expectedOutput: ["Terraform v0.12.26"]
24+
expectedOutput: ["Terraform v0.12.28"]
2525

2626
- name: "Check Azure CLI version"
2727
command: "az"

0 commit comments

Comments
 (0)