Skip to content

Commit

Permalink
Merge pull request #239 from aztfmod/AL-2202
Browse files Browse the repository at this point in the history
February 2022 Update
  • Loading branch information
arnaudlh committed Feb 25, 2022
2 parents 6d4be14 + 26e6df3 commit 19cf31d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .env.terraform
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
0.15.5
1.0.11
1.1.3
1.1.6
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ RUN apt-get update && \
python3-pip \
software-properties-common \
sudo \
openvpn \
unzip \
vim \
wget \
Expand Down Expand Up @@ -105,10 +106,14 @@ RUN apt-get update && \
#
curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg && \
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list && \
# #
#
# Github shell
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/etc/apt/trusted.gpg.d/githubcli-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null &&\
apt-get update && \
apt-get install -y --no-install-recommends \
docker-ce-cli \
gh \
kubectl && \
#
# ################# Install binary clients ###################
Expand All @@ -123,7 +128,7 @@ RUN apt-get update && \
else \
curl -L -o /usr/libexec/docker/cli-plugins/docker-compose https://github.com/docker/compose/releases/download/v${versionDockerCompose}/docker-compose-${TARGETOS}-aarch64 ; \
fi \
&& chmod +x /usr/libexec/docker/cli-plugins/docker-compose && \
&& chmod +x /usr/libexec/docker/cli-plugins/docker-compose && \
#
# Install Helm
#
Expand Down Expand Up @@ -338,7 +343,7 @@ ENV versionRover=${versionRover} \
#
# Install Terraform
#
# Keeping this method to support alpha build installations
# Keeping this method to support alpha build installations
RUN echo "Set rover version to ${versionRover}..." && echo "Installing Terraform ${versionTerraform}..." && \
curl -sSL -o /tmp/terraform.zip https://releases.hashicorp.com/terraform/${versionTerraform}/terraform_${versionTerraform}_${TARGETOS}_${TARGETARCH}.zip 2>&1 && \
sudo unzip -d /usr/bin /tmp/terraform.zip && \
Expand Down
12 changes: 9 additions & 3 deletions agents/github/github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
set -Ee

function finally {
echo "Trapped: $1"
echo "Un-register the runner"
./config.sh remove --unattended
}

trap finally EXIT SIGTERM
trap finally EXIT SIGTERM SIGKILL TERM

AGENT_NAME=${AGENT_NAME:="agent"}

Expand All @@ -20,11 +21,16 @@ else
AGENT_TOKEN=$(az keyvault secret show -n ${KEYVAULT_SECRET} --vault-name ${KEYVAULT_NAME} -o json | jq -r .value)
fi

LABELS+="runner-version-$(./run.sh --version),"
LABELS+=",runner-version-$(./run.sh --version),"
LABELS+=$(cat /tf/rover/version.txt)

# Grant access to the docker socket
sudo chmod 666 /var/run/docker.sock
sudo chmod 666 /var/run/docker.sock || true

echo "Configuring the agent with:"
echo " - url: ${URL}"
echo " - labels: ${LABELS}"
echo " - name: ${AGENT_NAME}"

./config.sh \
--unattended \
Expand Down
8 changes: 4 additions & 4 deletions docker-bake.override.hcl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Base image tools version
extensionsAzureCli="resource-graph"
versionDockerCompose="2.2.3"
versionGolang="1.17.6"
versionKubectl="1.22.1"
versionPacker="1.7.8"
versionGolang="1.17.7"
versionKubectl="1.23.3"
versionPacker="1.7.10"
versionPowershell="7.2.1"
versionTerraformDocs="0.16.0"
versionVault="1.9.2"
versionVault="1.9.3"

# Agents versions
USERNAME="vscode"
Expand Down
2 changes: 1 addition & 1 deletion scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ function workspace_list {
--subscription ${TF_VAR_tfstate_subscription_id} \
--auth-mode "login" \
--account-name ${storage_account_name} -o json |
jq -r '["workspace", "last modification", "lease ststus"], (.[] | [.name, .properties.lastModified, .properties.leaseStatus]) | @csv' |
jq -r '["workspace", "last modification", "lease status"], (.[] | [.name, .properties.lastModified, .properties.leaseStatus]) | @csv' |
column -t -s ','

echo ""
Expand Down

0 comments on commit 19cf31d

Please sign in to comment.