Skip to content

Commit

Permalink
Merge pull request #274 from aztfmod/patch.agent_sudo
Browse files Browse the repository at this point in the history
Fix permission on agents, migrate to Ubuntu 22.04, update tools, include graph extension for az cli
  • Loading branch information
arnaudlh authored Jul 29, 2022
2 parents 0f14d46 + ef7c63b commit 58606da
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .env.terraform
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
1.2.3
1.2.5
1.1.9
1.3.0-alpha20220706
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
hooks:
- id: docker-compose-check
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.3.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###########################################################
# base tools and dependencies
###########################################################
FROM --platform=${TARGETPLATFORM} ubuntu:21.10 as base
FROM --platform=${TARGETPLATFORM} ubuntu:22.04 as base

SHELL ["/bin/bash", "-c"]

Expand Down Expand Up @@ -97,7 +97,7 @@ RUN apt-get update && \
#
# Add Microsoft repository
#
sudo apt-add-repository https://packages.microsoft.com/ubuntu/21.10/prod && \
sudo apt-add-repository https://packages.microsoft.com/ubuntu/22.04/prod && \
#
# Add Docker repository
#
Expand Down Expand Up @@ -213,6 +213,7 @@ RUN apt-get update && \
#
echo "Installing latest Azure CLI ..." && \
pip3 install azure-cli && \
az extension add --name ${extensionsAzureCli} --system && \
az config set extension.use_dynamic_install=yes_without_prompt && \
#
# Install checkov
Expand Down
1 change: 0 additions & 1 deletion agents/github/github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ echo " - name: ${AGENT_NAME}"

./config.sh \
--unattended \
--disableupdate \
--replace \
--url ${URL} \
--token ${AGENT_TOKEN} \
Expand Down
2 changes: 1 addition & 1 deletion docker-bake-agents.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ variable "versionRover" {
}

group "rover_agents" {
targets = ["github","azdo", "tfc", "gitlab"]
targets = ["github", "tfc", "gitlab"]
}

target "github" {
Expand Down
18 changes: 9 additions & 9 deletions docker-bake.override.hcl
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Base image tools version
extensionsAzureCli="resource-graph"
versionDockerCompose="2.2.3"
versionGolang="1.18.2"
versionKubectl="1.23.3"
versionPacker="1.8.0"
versionPowershell="7.2.2"
versionDockerCompose="2.6.1"
versionGolang="1.18.4"
versionKubectl="1.24.3"
versionPacker="1.8.2"
versionPowershell="7.2.5"
versionTerraformDocs="0.16.0"
versionVault="1.10.3"
versionVault="1.11.1"

# Agents versions
USERNAME="vscode"
versionAzdo="2.204.0"
versionGithubRunner="2.292.0"
versionGitlab="15.0.0"
versionTfc="1.2.2"
versionGithubRunner="2.294.0"
versionGitlab="15.2.1"
versionTfc="1.2.6"
4 changes: 2 additions & 2 deletions scripts/tfstate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function tfstate_configure {
azurerm)
echo "@calling tfstate_configure -- azurerm"
sudo rm -f -- ${landingzone_name}/backend.hcl.tf
cp -f ${script_path}/backend.azurerm.tf ${landingzone_name}/backend.azurerm.tf
sudo cp -f ${script_path}/backend.azurerm.tf ${landingzone_name}/backend.azurerm.tf
;;
remote)
echo "@calling tfstate_configure -- remote"
Expand Down Expand Up @@ -277,7 +277,7 @@ function destroy_from_remote_state {
function terraform_init_azurerm {

sudo rm -f -- ${landingzone_name}/backend.hcl.tf
cp -f /tf/rover/backend.azurerm.tf ${landingzone_name}/backend.azurerm.tf
sudo cp -f /tf/rover/backend.azurerm.tf ${landingzone_name}/backend.azurerm.tf

case ${terraform_version} in
*"15"* | *"1."*)
Expand Down

0 comments on commit 58606da

Please sign in to comment.