Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Bump terraform 1.10 variants to 1.10.3 #93

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 51 additions & 51 deletions .github/workflows/ci-master-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: |
git diff --exit-code

build-1-10-2:
build-1-10-3:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -64,9 +64,9 @@ jobs:
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-1.10.2-${{ github.sha }}
key: ${{ runner.os }}-buildx-1.10.3-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-1.10.2-
${{ runner.os }}-buildx-1.10.3-
${{ runner.os }}-buildx-

- name: Login to Docker Hub registry
Expand All @@ -79,7 +79,7 @@ jobs:

# This step generates the docker tags
- name: Prepare
id: prep-1-10-2
id: prep-1-10-3
run: |
set -e

Expand All @@ -92,7 +92,7 @@ jobs:
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="1.10.2"
VARIANT="1.10.3"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"

Expand All @@ -102,52 +102,52 @@ jobs:
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT

- name: 1.10.2 - Build (PRs)
- name: 1.10.3 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/1.10.2
context: variants/1.10.3
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-1-10-2.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-2.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: 1.10.2 - Build and push (master)
- name: 1.10.3 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/1.10.2
context: variants/1.10.3
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-1-10-2.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-2.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: 1.10.2 - Build and push (release)
- name: 1.10.3 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/1.10.2
context: variants/1.10.3
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-1-10-2.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-2.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-2.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

# This step generates the docker tags
- name: Prepare
id: prep-1-10-2-jq-sops-ssh
id: prep-1-10-3-jq-sops-ssh
run: |
set -e

Expand All @@ -160,7 +160,7 @@ jobs:
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="1.10.2-jq-sops-ssh"
VARIANT="1.10.3-jq-sops-ssh"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"

Expand All @@ -170,51 +170,51 @@ jobs:
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT

- name: 1.10.2-jq-sops-ssh - Build (PRs)
- name: 1.10.3-jq-sops-ssh - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/1.10.2-jq-sops-ssh
context: variants/1.10.3-jq-sops-ssh
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-1-10-2-jq-sops-ssh.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-2-jq-sops-ssh.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3-jq-sops-ssh.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3-jq-sops-ssh.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: 1.10.2-jq-sops-ssh - Build and push (master)
- name: 1.10.3-jq-sops-ssh - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/1.10.2-jq-sops-ssh
context: variants/1.10.3-jq-sops-ssh
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-1-10-2-jq-sops-ssh.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-2-jq-sops-ssh.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3-jq-sops-ssh.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3-jq-sops-ssh.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: 1.10.2-jq-sops-ssh - Build and push (release)
- name: 1.10.3-jq-sops-ssh - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/1.10.2-jq-sops-ssh
context: variants/1.10.3-jq-sops-ssh
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-1-10-2-jq-sops-ssh.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-2-jq-sops-ssh.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-2-jq-sops-ssh.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3-jq-sops-ssh.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3-jq-sops-ssh.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3-jq-sops-ssh.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

# This step generates the docker tags
- name: Prepare
id: prep-1-10-2-jq-libvirt-sops-ssh
id: prep-1-10-3-jq-libvirt-sops-ssh
run: |
set -e

Expand All @@ -227,7 +227,7 @@ jobs:
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="1.10.2-jq-libvirt-sops-ssh"
VARIANT="1.10.3-jq-libvirt-sops-ssh"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"

Expand All @@ -237,45 +237,45 @@ jobs:
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT

- name: 1.10.2-jq-libvirt-sops-ssh - Build (PRs)
- name: 1.10.3-jq-libvirt-sops-ssh - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/1.10.2-jq-libvirt-sops-ssh
context: variants/1.10.3-jq-libvirt-sops-ssh
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-1-10-2-jq-libvirt-sops-ssh.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-2-jq-libvirt-sops-ssh.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3-jq-libvirt-sops-ssh.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3-jq-libvirt-sops-ssh.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: 1.10.2-jq-libvirt-sops-ssh - Build and push (master)
- name: 1.10.3-jq-libvirt-sops-ssh - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/1.10.2-jq-libvirt-sops-ssh
context: variants/1.10.3-jq-libvirt-sops-ssh
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-1-10-2-jq-libvirt-sops-ssh.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-2-jq-libvirt-sops-ssh.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3-jq-libvirt-sops-ssh.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3-jq-libvirt-sops-ssh.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: 1.10.2-jq-libvirt-sops-ssh - Build and push (release)
- name: 1.10.3-jq-libvirt-sops-ssh - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/1.10.2-jq-libvirt-sops-ssh
context: variants/1.10.3-jq-libvirt-sops-ssh
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-1-10-2-jq-libvirt-sops-ssh.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-2-jq-libvirt-sops-ssh.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-2-jq-libvirt-sops-ssh.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3-jq-libvirt-sops-ssh.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3-jq-libvirt-sops-ssh.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-10-3-jq-libvirt-sops-ssh.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

Expand Down Expand Up @@ -4843,7 +4843,7 @@ jobs:

update-draft-release:
needs:
- build-1-10-2
- build-1-10-3
- build-1-9-8
- build-1-8-5
- build-1-7-5
Expand Down Expand Up @@ -4875,7 +4875,7 @@ jobs:

publish-draft-release:
needs:
- build-1-10-2
- build-1-10-3
- build-1-9-8
- build-1-8-5
- build-1-7-5
Expand Down Expand Up @@ -4909,7 +4909,7 @@ jobs:

update-dockerhub-description:
needs:
- build-1-10-2
- build-1-10-3
- build-1-9-8
- build-1-8-5
- build-1-7-5
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ The base image is `alpine`. The image is not the closed-source [`hashicorp/terra

| Tag | Dockerfile Build Context |
|:-------:|:---------:|
| `:1.10.2`, `:latest` | [View](variants/1.10.2) |
| `:1.10.2-jq-sops-ssh` | [View](variants/1.10.2-jq-sops-ssh) |
| `:1.10.2-jq-libvirt-sops-ssh` | [View](variants/1.10.2-jq-libvirt-sops-ssh) |
| `:1.10.3`, `:latest` | [View](variants/1.10.3) |
| `:1.10.3-jq-sops-ssh` | [View](variants/1.10.3-jq-sops-ssh) |
| `:1.10.3-jq-libvirt-sops-ssh` | [View](variants/1.10.3-jq-libvirt-sops-ssh) |
| `:1.9.8` | [View](variants/1.9.8) |
| `:1.9.8-jq-sops-ssh` | [View](variants/1.9.8-jq-sops-ssh) |
| `:1.9.8-jq-libvirt-sops-ssh` | [View](variants/1.9.8-jq-libvirt-sops-ssh) |
Expand Down
2 changes: 1 addition & 1 deletion generate/definitions/versions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"terraform": {
"versions": [
"1.10.2",
"1.10.3",
"1.9.8",
"1.8.5",
"1.7.5",
Expand Down
63 changes: 63 additions & 0 deletions variants/1.10.3-jq-libvirt-sops-ssh/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
FROM alpine:3.17
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"
# Install terraform
RUN set -eux; \
TERRAFORM_VERSION=1.10.3; \
case "$( uname -m )" in \
'x86') \
URL="https://releases.hashicorp.com/terraform/1.10.3/terraform_1.10.3_linux_386.zip"; \
SHA256=f255e91b6d18ed7fdfffc32beff3877583ccce19d239685e9521e49c36b88f14; \
;; \
'x86_64') \
URL="https://releases.hashicorp.com/terraform/1.10.3/terraform_1.10.3_linux_amd64.zip"; \
SHA256=ea3020db6b53c25a4a84e40cdc36c1a86df26967d718219ab4c71b44435da81e; \
;; \
'armhf') \
URL="https://releases.hashicorp.com/terraform/1.10.3/terraform_1.10.3_linux_arm.zip"; \
SHA256=829bf0965dbae58e88fc885159889908583220b5fff4ca8ff34326534a824dbd; \
;; \
'armv7l') \
URL="https://releases.hashicorp.com/terraform/1.10.3/terraform_1.10.3_linux_arm.zip"; \
SHA256=829bf0965dbae58e88fc885159889908583220b5fff4ca8ff34326534a824dbd; \
;; \
'aarch64') \
URL="https://releases.hashicorp.com/terraform/1.10.3/terraform_1.10.3_linux_arm64.zip"; \
SHA256=b92d8245c67d4f7193245bc9d534048a63520302b6edb3c7764277b00c96ed31; \
;; \
*) \
echo "Architecture not supported"; \
exit 1; \
;; \
esac; \
FILE=terraform.zip; \
wget -q "$URL" -O "$FILE"; \
echo "$SHA256 $FILE" | sha256sum -c -; \
unzip "$FILE" terraform; \
mkdir -pv /usr/local/bin; \
mv -v terraform /usr/local/bin/terraform; \
chmod +x /usr/local/bin/terraform; \
CHECKPOINT_DISABLE=1 terraform version; \
:

RUN apk add --no-cache ca-certificates

RUN apk add --no-cache jq

RUN apk add --no-cache libvirt-client

RUN set -eux; \
wget -qO- https://github.com/mozilla/sops/releases/download/v3.7.3/sops-v3.7.3.linux > /usr/local/bin/sops; \
chmod +x /usr/local/bin/sops; \
sha256sum /usr/local/bin/sops | grep '^53aec65e45f62a769ff24b7e5384f0c82d62668dd96ed56685f649da114b4dbb '; \
sops --version

RUN apk add --no-cache gnupg

RUN apk add --no-cache openssh-client sshpass

# Disable telemetry. See: https://developer.hashicorp.com/terraform/cli/commands#upgrade-and-security-bulletin-checks
ENV CHECKPOINT_DISABLE=1

CMD [ "terraform" ]
Loading
Loading