Skip to content

Commit 5a4fe4e

Browse files
authored
Add latest Terraform binary (#17)
* Add latest Terraform binary to build Signed-off-by: Daniel Chaffelson <[email protected]> * Add detach keys option to container instantiation update default build command to provide the build type information Signed-off-by: Daniel Chaffelson <[email protected]> * Update publication action to tag latest as well as release version Signed-off-by: Daniel Chaffelson <[email protected]>
1 parent 1abac63 commit 5a4fe4e

File tree

5 files changed

+33
-7
lines changed

5 files changed

+33
-7
lines changed

.github/workflows/publish_image_github_packages.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@ jobs:
2222
format: 'YYYY-MM-DD'
2323

2424
- name: Set Release Version from Tag
25+
# run: echo "RELEASE_VERSION=v0.6.3" >> $GITHUB_ENV
2526
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
2627

2728
- name: Push to GitHub Packages for Base Build
2829
uses: docker/[email protected]
2930
with:
30-
tags: ghcr.io/cloudera-labs/cldr-ansible-runner:base-${{ env.RELEASE_VERSION }}
31+
tags: |
32+
ghcr.io/cloudera-labs/cldr-ansible-runner:base-${{ env.RELEASE_VERSION }}
33+
ghcr.io/cloudera-labs/cldr-ansible-runner:base-latest
3134
push: true
3235
build-args: |
3336
BUILD_DATE=${{ steps.date.outputs.time }}
@@ -50,7 +53,9 @@ jobs:
5053
KUBECTL=true
5154
CDPY=true
5255
CACHE_TIME=${{ steps.fulltime.outputs.time }}
53-
tags: ghcr.io/cloudera-labs/cldr-ansible-runner:full-${{ env.RELEASE_VERSION }}
56+
tags: |
57+
ghcr.io/cloudera-labs/cldr-ansible-runner:full-${{ env.RELEASE_VERSION }}
58+
ghcr.io/cloudera-labs/cldr-ansible-runner:full-latest
5459
5560
- name: Get Time for AWS Build
5661
id: awstime
@@ -66,7 +71,10 @@ jobs:
6671
AWS=true
6772
CDPY=true
6873
CACHE_TIME=${{ steps.awstime.outputs.time }}
69-
tags: ghcr.io/cloudera-labs/cldr-ansible-runner:aws-${{ env.RELEASE_VERSION }}
74+
tags: |
75+
ghcr.io/cloudera-labs/cldr-ansible-runner:aws-${{ env.RELEASE_VERSION }}
76+
ghcr.io/cloudera-labs/cldr-ansible-runner:aws-latest
77+
7078
7179
- name: Get Time for GCP Build
7280
id: gcptime
@@ -82,7 +90,9 @@ jobs:
8290
GCLOUD=true
8391
CDPY=true
8492
CACHE_TIME=${{ steps.gcptime.outputs.time }}
85-
tags: ghcr.io/cloudera-labs/cldr-ansible-runner:gcp-${{ env.RELEASE_VERSION }}
93+
tags: |
94+
ghcr.io/cloudera-labs/cldr-ansible-runner:gcp-${{ env.RELEASE_VERSION }}
95+
ghcr.io/cloudera-labs/cldr-ansible-runner:gcp-latest
8696
8797
- name: Get Time for Azure Build
8898
id: azuretime
@@ -98,4 +108,6 @@ jobs:
98108
AZURE=true
99109
CDPY=true
100110
CACHE_TIME=${{ steps.azuretime.outputs.time }}
101-
tags: ghcr.io/cloudera-labs/cldr-ansible-runner:azure-${{ env.RELEASE_VERSION }}
111+
tags: |
112+
ghcr.io/cloudera-labs/cldr-ansible-runner:azure-${{ env.RELEASE_VERSION }}
113+
ghcr.io/cloudera-labs/cldr-ansible-runner:azure-latest

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ COPY payload /runner/
1414
# Update readme if you change Python version!
1515
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc \
1616
&& cp /runner/deps/*.repo /etc/yum.repos.d/ \
17-
&& dnf install -y python38-devel git curl which bash gcc \
17+
&& dnf install -y python38-devel git curl which bash gcc terraform \
1818
&& rm -rf /var/cache/dnf \
1919
&& pip install -r /runner/deps/python_base.txt \
2020
&& ansible-galaxy install -r /runner/deps/ansible.yml \

common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
BASE_IMAGE_URI="quay.io/ansible/ansible-runner"
55
BASE_IMAGE_TAG="stable-2.10-devel"
66
IMAGE_NAME=cldr-ansible-runner
7-
IMAGE_TAG=latest
7+
IMAGE_TAG=base-latest
88
IMAGE_FULL_NAME=${IMAGE_NAME}:${IMAGE_TAG}
99
CONTAINER_NAME=${IMAGE_NAME}
1010
BUILD_DATE=$(date '+%Y-%m-%d')

payload/deps/hashicorp.repo

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[hashicorp]
2+
name=Hashicorp Stable - $basearch
3+
baseurl=https://rpm.releases.hashicorp.com/RHEL/$releasever/$basearch/stable
4+
enabled=1
5+
gpgcheck=1
6+
gpgkey=https://rpm.releases.hashicorp.com/gpg
7+
8+
[hashicorp-test]
9+
name=Hashicorp Test - $basearch
10+
baseurl=https://rpm.releases.hashicorp.com/RHEL/$releasever/$basearch/test
11+
enabled=0
12+
gpgcheck=1
13+
gpgkey=https://rpm.releases.hashicorp.com/gpg

run_project.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ if [ ! "$(docker ps -q -f name="${CONTAINER_NAME}")" ]; then
4545
# create new container if not running
4646
echo "Creating new execution container named '${CONTAINER_NAME}'"
4747
docker run -itd \
48+
--detach-keys="ctrl-@" \
4849
-v "${PROJECT_DIR}":/runner/project \
4950
--mount type=bind,src=/run/host-services/ssh-auth.sock,target=/run/host-services/ssh-auth.sock \
5051
-e SSH_AUTH_SOCK="/run/host-services/ssh-auth.sock" \

0 commit comments

Comments
 (0)