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

[terraform-agent-2408, inf-terraform-[aws|azure]] feature/version bump 202408 #1036

Merged
merged 29 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8c1683e
[inf-terraform-aws] bump ruby, terraform, and pre-commit versions
tbugfinder Aug 6, 2024
03af5f4
[inf-terraform-aws] execute (updated) pre-commit-hooks
tbugfinder Aug 6, 2024
88dbf1b
[inf-terraform-aws] bump version of inspec-aws library
tbugfinder Aug 6, 2024
5660579
[inf-terraform-aws] update CHANGELOG
tbugfinder Aug 6, 2024
1eab687
[inf-terraform-[aws|azure]] update CHANGELOG
tbugfinder Aug 6, 2024
c5c7e05
[inf-terraform-azure] bump versions of ruby, terraform, pre-commit ho…
tbugfinder Aug 6, 2024
9688b37
[inf-terraform-[aws|azure]] - add terraform agent 2408 using updated …
tbugfinder Aug 7, 2024
a850811
[inf-terraform-[aws|azure]] - add terraform agent 2408 to CHANGELOG.md
tbugfinder Aug 7, 2024
bb06154
[inf-terraform-[aws|azure]] - resync Gemfile.lock files
tbugfinder Aug 7, 2024
772824e
reset CODEOWNERS for inf-terraform-[aws|azure]
tbugfinder Aug 7, 2024
97622b7
jenkins-agent terraform-2408 - add python 3.12 as default
tbugfinder Aug 7, 2024
7dd0493
jenkins-agent-terraform-2408: bump pre-commit version
tbugfinder Aug 7, 2024
6c6aaf8
inf-terraform-[aws|azure]: switch to new terraform-agent-2408
tbugfinder Aug 7, 2024
7e30250
terraform-agent-2408: use tenv, add go (experimental use of terratest).
tbugfinder Aug 7, 2024
8a4166c
remove left-over get-pip.py
tbugfinder Aug 8, 2024
7e75e51
minor README updates
tbugfinder Aug 8, 2024
d29fe63
bump terraform to 1.9.4
tbugfinder Aug 8, 2024
a2b0e6b
add csv,syslog to Gemfile. This resolves a warning message.
tbugfinder Aug 9, 2024
15f66a0
enable tflint, yamllint & harmonize aws&azure pre-commit-config.yaml
tbugfinder Aug 10, 2024
ecb8572
add inspec contraint to fix version selection.
tbugfinder Aug 10, 2024
3f1191f
minor editorconfig cleanup.
tbugfinder Aug 12, 2024
3b78adc
add go-task
tbugfinder Aug 12, 2024
cd2fc56
update Gemfile and built Gemfile.lock using updated constraints.
tbugfinder Aug 13, 2024
1814675
replace centos repos by rockylinux 8 repos
tbugfinder Oct 14, 2024
828a585
add xorriso to support iso image generation (e.g. virtualization envi…
tbugfinder Oct 14, 2024
85b888e
fix changelog entries
tbugfinder Oct 14, 2024
4412f5a
remove SOPS from terraform agents as it is part of jenkins-agent-base
tbugfinder Oct 14, 2024
bdb2e27
fix rebase leftover in changelog
tbugfinder Oct 15, 2024
5e28b4b
Restore ETL e2e Python quickstarter
BraisVQ Oct 17, 2024
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
13 changes: 13 additions & 0 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,19 @@ jobs:
run: |
docker build --tag agent-terraform-2306-test-ubi8 --file Dockerfile.ubi8 .

jenkins-agent-terraform-2408-ubi8:
name: Jenkins agent Terraform 2408 (UBI8)
runs-on: ubuntu-22.04
steps:
-
name: Checkout repository
uses: actions/checkout@v4.1.6
-
name: Build docker image
working-directory: common/jenkins-agents/terraform-2408/docker
run: |
docker build --tag agent-terraform-2408-test-ubi8 --file Dockerfile.ubi8 .

jenkins-agent-scala-ubi8:
name: Jenkins agent Scala (UBI8)
runs-on: ubuntu-22.04
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
- Add microsoft-edge to nodejs agents for using with cypress ([#1063](https://github.com/opendevstack/ods-quickstarters/pull/1063))
- Replaced centos8 repository for AlmaLinux 8 due to deprecation ([#1063](https://github.com/opendevstack/ods-quickstarters/pull/1063))
- Improvements in the reporter for cypress ([#1042](https://github.com/opendevstack/ods-quickstarters/issues/1042))
- inf-terraform-[aws|azure]: bump terraform versions, pre-commit-hooks, library versions ([#1036](https://github.com/opendevstack/ods-quickstarters/pull/1036))
- jenkins-agent-terraform-2408: add jenkins agent terraform-2408, add go-task, go for experimental terratest, add python-3.12 (drop python-3.8), use tenv for terraform (tofu) version management, ruby version 3.3.4, terraform 1.9.4 ([#1036](https://github.com/opendevstack/ods-quickstarters/pull/1036))
- Replaced centos8 repository for RockyLinux 8 due to deprecation in terraform agents ([#1067](https://github.com/opendevstack/ods-quickstarters/pull/1036))

### Added

Expand Down Expand Up @@ -467,4 +470,4 @@

## [0.1.0 ods-project-quickstarters] - 2018-07-27

Initial release.
Initial release.
4 changes: 2 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
/e2e-spock-geb/ @metmajer @garcanam @roicarrera
/fe-angular/ @cschweikert
/fe-ionic/ @rianet @bljubisic
/inf-terraform-aws/ @frankjoas @metmajer @nichtraunzer @tbugfinder
/inf-terraform-azure/ @frankjoas @metmajer @nichtraunzer @tbugfinder
/inf-terraform-aws/ @terra-naut @tbugfinder
/inf-terraform-azure/ @terra-naut @tbugfinder
/ods-document-gen-svc/ @metmajer
/ods-provisioning-app/ @clemensutschig @michaelsauter
/release-manager/ @metmajer @michaelsauter
22 changes: 19 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ ODS_NAMESPACE := $(shell grep ODS_NAMESPACE $(CURDIR)/../ods-configuration/ods-c

# JENKINS AGENT
## Install or update Jenkins agent resources.
install-jenkins-agent: install-jenkins-agent-golang install-jenkins-agent-jdk install-jenkins-agent-nodejs install-jenkins-agent-python install-jenkins-agent-scala install-jenkins-agent-terraform install-jenkins-agent-terraform-2306 install-jenkins-agent-rust
install-jenkins-agent: install-jenkins-agent-golang install-jenkins-agent-jdk install-jenkins-agent-nodejs install-jenkins-agent-python install-jenkins-agent-scala install-jenkins-agent-terraform install-jenkins-agent-terraform-2306 install-jenkins-agent-terraform-2408 install-jenkins-agent-rust
.PHONY: install-jenkins-agent

## Update OpenShift resources related Jenkins agent resources.
apply-jenkins-agent-build: apply-jenkins-agent-golang-build apply-jenkins-agent-jdk-build apply-jenkins-agent-nodejs16-build apply-jenkins-agent-nodejs18-build apply-jenkins-agent-nodejs20-build apply-jenkins-agent-nodejs22-build apply-jenkins-agent-python-build apply-jenkins-agent-scala-build apply-jenkins-agent-terraform-build apply-jenkins-agent-terraform-build-2306 apply-jenkins-agent-rust-build
apply-jenkins-agent-build: apply-jenkins-agent-golang-build apply-jenkins-agent-jdk-build apply-jenkins-agent-nodejs16-build apply-jenkins-agent-nodejs18-build apply-jenkins-agent-nodejs20-build apply-jenkins-agent-nodejs22-build apply-jenkins-agent-python-build apply-jenkins-agent-scala-build apply-jenkins-agent-terraform-build apply-jenkins-agent-terraform-build-2306 apply-jenkins-agent-terraform-build-2408 apply-jenkins-agent-rust-build
.PHONY: apply-jenkins-agent-build

## Start builds of Jenkins agents.
start-jenkins-agent-build: start-jenkins-agent-golang-build start-jenkins-agent-jdk-build start-jenkins-agent-nodejs16-build start-jenkins-agent-nodejs18-build start-jenkins-agent-nodejs20-build start-jenkins-agent-nodejs22-build start-jenkins-agent-python-build start-jenkins-agent-scala-build start-jenkins-agent-terraform-build start-jenkins-agent-terraform-build-2306 start-jenkins-agent-rust-build
start-jenkins-agent-build: start-jenkins-agent-golang-build start-jenkins-agent-jdk-build start-jenkins-agent-nodejs16-build start-jenkins-agent-nodejs18-build start-jenkins-agent-nodejs20-build apply-jenkins-agent-nodejs22-build start-jenkins-agent-python-build start-jenkins-agent-scala-build start-jenkins-agent-terraform-build start-jenkins-agent-terraform-build-2306 start-jenkins-agent-terraform-build-2408 start-jenkins-agent-rust-build
.PHONY: start-jenkins-agent-build


Expand Down Expand Up @@ -177,6 +177,22 @@ start-jenkins-agent-terraform-build-2306:
.PHONY: start-jenkins-agent-terraform-build-2306


# JENKINS AGENT TERRAFORM-2408
## Install or update Jenkins Terraform agent resources.
install-jenkins-agent-terraform-2408: apply-jenkins-agent-terraform-build-2408 start-jenkins-agent-terraform-build-2408
.PHONY: install-jenkins-agent-terraform-2408

## Update OpenShift resources related to Jenkins Terraform agent image 2408.
apply-jenkins-agent-terraform-build-2408:
cd common/jenkins-agents/terraform-2408/ocp-config && tailor apply --namespace $(ODS_NAMESPACE)
.PHONY: apply-jenkins-agent-terraform-build-2408

## Start build of BuildConfig "jenkins-agent-terraform-2408".
start-jenkins-agent-terraform-build-2408:
oc -n $(ODS_NAMESPACE) start-build jenkins-agent-terraform-2408 --follow
.PHONY: start-jenkins-agent-terraform-build-2408


# HELP
# Based on https://gist.github.com/prwhite/8168133#gistcomment-2278355.
help:
Expand Down
1 change: 1 addition & 0 deletions common/jenkins-agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The ODS [jenkins shared library](https://github.com/opendevstack/ods-jenkins-sha
8. [Scala & SBT](scala)
9. [Terraform](terraform)
10. [Terraform 2306](terraform-2306)
11. [Terraform 2408](terraform-2408)

## OCP Config / Installation

Expand Down
15 changes: 6 additions & 9 deletions common/jenkins-agents/terraform-2306/docker/Dockerfile.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ ENV TERRAFORM_VERSION=1.4.6 \
TFLINT_VERSION=0.46.1 \
NODEJS_VERSION=18.16.0 \
BUNDLER_VERSION=2.4.13 \
SOPS_VERSION=3.7.3 \
AGE_VERSION=1.1.1 \
GEM_HOME=/opt/bundle \
RBENV_ROOT=/opt/rbenv \
Expand All @@ -34,7 +33,7 @@ ENV INSTALL_PKGS="yum-utils gcc make git-core zlib zlib-devel gcc-c++ patch \
python3.11 python3.11-pip python3.11-setuptools \
readline \
libffi-devel libyaml-devel openssl-devel make bzip2 autoconf curl sqlite-devel xz"
ENV INSTALL_CENTOS_PKGS="readline-devel bison automake libtool"
ENV INSTALL_DNF_PKGS="readline-devel bison automake libtool"
ENV PATH=/opt/tfenv/bin:/opt/rbenv/shims:/opt/rbenv/bin:/opt/node/bin:$PATH
ENV HOME=/home/jenkins

Expand All @@ -46,16 +45,15 @@ COPY python_requirements /tmp/requirements.txt
# COPY certs/* /etc/pki/ca-trust/source/anchors/
# RUN update-ca-trust force-enable && update-ca-trust extract

COPY yum.repos.d/centos8.repo /etc/yum.repos.d/centos8.repo
COPY yum.repos.d/rockylinux.repo /etc/yum.repos.d/rockylinux.repo
RUN sed -i 's@^\s*enabled\s*=.*$@enabled = 1@g' /etc/yum.repos.d/*.repo \
&& sed -i 's@^\s*enabled\s*=.*$@enabled = 0@g' /etc/yum.repos.d/centos8.repo \
&& sed -i 's@^\s*enabled\s*=.*$@enabled = 0@g' /etc/yum.repos.d/rockylinux.repo \
&& grep -i '\(name\|enabled\)' /etc/yum.repos.d/*.repo

RUN set -x \
&& dnf -y repolist \
&& dnf -y install $INSTALL_PKGS \
&& dnf -y install --enablerepo centos-base --enablerepo centos-plus --enablerepo centos-extras \
--enablerepo centos-appstream --enablerepo centos-devel $INSTALL_CENTOS_PKGS
&& dnf -y install --enablerepo rockylinux-baseos --enablerepo rockylinux-appstream $INSTALL_DNF_PKGS

RUN curl -sSL "https://bootstrap.pypa.io/pip/3.6/get-pip.py" -o "get-pip.py" \
&& python3 get-pip.py
Expand Down Expand Up @@ -151,9 +149,8 @@ RUN wget -q "https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CO
&& chmod +x /usr/local/bin/consul \
&& /usr/local/bin/consul -version

# Install mozilla/sops and age
RUN dnf install -y https://github.com/mozilla/sops/releases/download/v${SOPS_VERSION}/sops-${SOPS_VERSION}-1.x86_64.rpm \
&& wget -q -O /tmp/age.tar.gz https://github.com/FiloSottile/age/releases/download/v${AGE_VERSION}/age-v${AGE_VERSION}-linux-amd64.tar.gz \
# Install age
RUN wget -q -O /tmp/age.tar.gz https://github.com/FiloSottile/age/releases/download/v${AGE_VERSION}/age-v${AGE_VERSION}-linux-amd64.tar.gz \
&& tar xzf /tmp/age.tar.gz -C /usr/local/bin \
&& rm -f /tmp/age.tar.gz

Expand Down
4 changes: 2 additions & 2 deletions common/jenkins-agents/terraform-2306/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Introduction
This jenkins agent is used to build and deploy AWS & Azure workloads in the cloud.

The image is built in the global `ods` project and is named `jenkins-agent-terraform`. It can be referenced in a `Jenkinsfile` with `ods/jenkins-agent-terraform`.
The image is built in the global `ods` project and is named `jenkins-agent-terraform-2306`. It can be referenced in a `Jenkinsfile` with `ods/jenkins-agent-terraform-2306`.

## Known limitations
MS Azure support is on the Roadmap.
N/A

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[rockylinux-baseos]
name=Rocky Linux 8 - BaseOS
#mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=x86_64&repo=BaseOS-8
baseurl=https://dl.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/
gpgcheck=1
enabled=0
countme=1
gpgkey=https://dl.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/RPM-GPG-KEY-rockyofficial

[rockylinux-appstream]
name=Rocky Linux 8 - AppStream
#mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=x86_64&repo=AppStream-8
baseurl=http://dl.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/
gpgcheck=1
enabled=0
countme=1
gpgkey=https://dl.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/RPM-GPG-KEY-rockyofficial
Loading