From 94a6e4dc5618ad3d0c3b0cee738f6ae7d8a684ed Mon Sep 17 00:00:00 2001 From: JT Date: Tue, 16 Dec 2025 16:19:53 +1100 Subject: [PATCH 01/37] feature: add arm based worker tools with option to have amd64 version as well. --- ubuntu.24.04/Dockerfile | 257 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 257 insertions(+) create mode 100644 ubuntu.24.04/Dockerfile diff --git a/ubuntu.24.04/Dockerfile b/ubuntu.24.04/Dockerfile new file mode 100644 index 0000000..e3968be --- /dev/null +++ b/ubuntu.24.04/Dockerfile @@ -0,0 +1,257 @@ +ARG TARGETPLATFORM=linux/arm64 + +FROM --platform=$TARGETPLATFORM ubuntu:24.04 + +# Redeclare to make available in this build stage +ARG TARGETPLATFORM + +ENV DEBIAN_FRONTEND=noninteractive + +ARG Argocd_Version=2.14.21 +ARG Aws_Cli_Version=2.24.10 +ARG Aws_Iam_Authenticator_Version=0.7.9 +ARG Aws_Powershell_Version=4.1.734 +ARG Azure_Cli_Version=2.67.0-1~noble +ARG Azure_Powershell_Version=13.0.0 +ARG Dotnet_Sdk_Version=8.0 +ARG Ecs_Cli_Version=1.21.0 +ARG Eks_Cli_Version=v0.220.0 +ARG Google_Cloud_Cli_Version=505.0.0-0 +ARG Google_Cloud_Gke_Cloud_Auth_Plugin_Version=505.0.0-0 +ARG Helm_Version=v3.16.4 +ARG Java_Jdk_Version=21 +ARG Kubectl_Version=1.32 +ARG Kubelogin_Version=v0.1.6 +ARG NodeJs_Version=22 +ARG Octopus_Cli_Legacy_Version=9.1.7 +ARG Octopus_Cli_Version=2.20.1 +ARG Octopus_Client_Version=14.3.1789 +ARG Powershell_Version=7.5.4 +ARG Terraform_Version=1.10.4 + +# Install common tools +RUN apt-get update && \ + apt-get install -y --no-install-recommends wget unzip apt-utils curl software-properties-common iputils-ping gnupg ca-certificates apt-transport-https && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Install PowerShell - Architecture-specific +RUN case "$TARGETPLATFORM" in \ + "linux/amd64") PWSH_ARCH="x64" ;; \ + "linux/arm64") PWSH_ARCH="arm64" ;; \ + *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ + esac && \ + wget -q https://github.com/PowerShell/PowerShell/releases/download/v${Powershell_Version}/powershell-${Powershell_Version}-linux-${PWSH_ARCH}.tar.gz && \ + mkdir -p /opt/microsoft/powershell/7 && \ + tar zxf powershell-${Powershell_Version}-linux-${PWSH_ARCH}.tar.gz -C /opt/microsoft/powershell/7 && \ + chmod +x /opt/microsoft/powershell/7/pwsh && \ + ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh && \ + rm powershell-${Powershell_Version}-linux-${PWSH_ARCH}.tar.gz + +# Install Octopus/Octo CLI +RUN case "$TARGETPLATFORM" in \ + "linux/amd64") OCTO_CLI_ARCH="amd64" ;; \ + "linux/arm64") OCTO_CLI_ARCH="arm64" ;; \ + *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ + esac && \ + apt-get update && \ + curl -fsSL https://apt.octopus.com/public.key | gpg --dearmor -o /etc/apt/keyrings/octopus.gpg && \ + echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/octopus.gpg] https://apt.octopus.com/ stable main" | tee /etc/apt/sources.list.d/octopus.list > /dev/null && \ + apt-get update && \ + apt-get install -y octopus-cli=${Octopus_Cli_Version} && \ + # octopuscli=${Octopus_Cli_Legacy_Version} Not sure if we have an ARM version of this + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Install Octopus Client +# https://octopus.com/docs/octopus-rest-api/octopus.client +RUN pwsh -c 'Install-Package -Force Octopus.Client -MaximumVersion "'${Octopus_Client_Version}'" -source https://www.nuget.org/api/v2 -SkipDependencies' && \ + octopusClientPackagePath=$(pwsh -c '(Get-Item ((Get-Package Octopus.Client).source)).Directory.FullName') && \ + cp -r $octopusClientPackagePath/lib/netstandard2.0/* . + +# Install AWS Powershell core modules +# https://docs.aws.amazon.com/powershell/latest/userguide/pstools-getting-set-up-linux-mac.html +RUN pwsh -c 'Install-Module -Force -Name AWSPowerShell.NetCore -AllowClobber -Scope AllUsers -MaximumVersion "'${Aws_Powershell_Version}'"' + +# Install AZ Powershell core modules +# https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-3.6.1 +RUN pwsh -c 'Install-Module -Force -Name Az -AllowClobber -Scope AllUsers -MaximumVersion "'${Azure_Powershell_Version}'"' + +# Install Helm3 +RUN wget --quiet -O - https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash -s -- -v ${Helm_Version} + +# Install .NET SDK +# https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-install?pivots=os-linux-ubuntu-2404&tabs=dotnet10 +RUN DOTNET_CLI_TELEMETRY_OPTOUT=1 && \ + touch /etc/apt/preferences && \ + echo "Package: dotnet* aspnet* netstandard* \nPin: origin \"packages.microsoft.com\" \nPin-Priority: -10" > /etc/apt/preferences && \ + echo "export DOTNET_CLI_TELEMETRY_OPTOUT=1" > /etc/profile.d/set-dotnet-env-vars.sh && \ + apt-get update && \ + apt-get install -y dotnet-sdk-${Dotnet_Sdk_Version} && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Install JDK / Tools +# https://ubuntuhandbook.org/index.php/2025/03/install-openjdk-24-ubuntu/ +RUN apt-get update && \ + apt-get install -y --no-install-recommends openjdk-${Java_Jdk_Version}-jdk-headless maven gradle && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# # Install Azure CLI +# # https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt#option-2-step-by-step-installation-instructions +RUN mkdir -p /etc/apt/keyrings && \ + curl -sLS https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/keyrings/microsoft.gpg > /dev/null && \ + chmod go+r /etc/apt/keyrings/microsoft.gpg && \ + AZ_DIST=$(lsb_release -cs) && \ + printf "Types: deb\nURIs: https://packages.microsoft.com/repos/azure-cli/\nSuites: %s\nComponents: main\nArchitectures: %s\nSigned-by: /etc/apt/keyrings/microsoft.gpg\n" "${AZ_DIST}" "$(dpkg --print-architecture)" | tee /etc/apt/sources.list.d/azure-cli.sources && \ + apt-get update && \ + apt-get install -y azure-cli=${Azure_Cli_Version} && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* && \ + # remove az cli warning - https://github.com/Azure/arm-deploy/issues/173 + az config set bicep.use_binary_from_path=false + +# Install NodeJS +RUN wget --quiet -O - https://deb.nodesource.com/setup_${NodeJs_Version}.x | bash && \ + apt-get install -y nodejs && \ + rm -rf /var/lib/apt/lists/* + +# Install kubectl +# https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#install-using-native-package-management +RUN curl -fsSL "https://pkgs.k8s.io/core:/stable:/v${Kubectl_Version}/deb/Release.key" | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg && \ + echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v${Kubectl_Version}/deb/ /" | tee /etc/apt/sources.list.d/kubernetes.list && \ + apt-get update && \ + apt-get install -y kubectl=${Kubectl_Version}.* && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Install Kubelogin - Architecture-specific +RUN case "$TARGETPLATFORM" in \ + "linux/amd64") KUBELOGIN_ARCH="amd64" ;; \ + "linux/arm64") KUBELOGIN_ARCH="arm64" ;; \ + *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ + esac && \ + wget --quiet https://github.com/Azure/kubelogin/releases/download/${Kubelogin_Version}/kubelogin-linux-${KUBELOGIN_ARCH}.zip && \ + unzip kubelogin-linux-${KUBELOGIN_ARCH}.zip -d kubelogin-linux-${KUBELOGIN_ARCH} && \ + mv kubelogin-linux-${KUBELOGIN_ARCH}/bin/linux_${KUBELOGIN_ARCH}/kubelogin /usr/local/bin && \ + rm -rf kubelogin-linux-${KUBELOGIN_ARCH} && \ + rm kubelogin-linux-${KUBELOGIN_ARCH}.zip + +# Install Terraform - Architecture-specific +# https://computingforgeeks.com/how-to-install-terraform-on-ubuntu-centos-7/ +RUN case "$TARGETPLATFORM" in \ + "linux/amd64") TERRAFORM_ARCH="amd64" ;; \ + "linux/arm64") TERRAFORM_ARCH="arm64" ;; \ + *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ + esac && \ + wget --quiet https://releases.hashicorp.com/terraform/${Terraform_Version}/terraform_${Terraform_Version}_linux_${TERRAFORM_ARCH}.zip && \ + unzip terraform_${Terraform_Version}_linux_${TERRAFORM_ARCH}.zip && \ + mv terraform /usr/local/bin && \ + rm terraform_${Terraform_Version}_linux_${TERRAFORM_ARCH}.zip + +# Install Google Cloud CLI - Architecture-specific recommended install method +# https://docs.cloud.google.com/sdk/docs/install-sdk +RUN case "$TARGETPLATFORM" in \ + "linux/amd64") GCLOUD_ARCH="x86_64" ;; \ + "linux/arm64") GCLOUD_ARCH="arm" ;; \ + *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ + esac && \ + curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-${GCLOUD_ARCH}.tar.gz && \ + tar -xf google-cloud-cli-linux-${GCLOUD_ARCH}.tar.gz && \ + ./google-cloud-sdk/install.sh --quiet --usage-reporting false --path-update true && \ + ln -s /google-cloud-sdk/bin/gcloud /usr/local/bin/gcloud && \ + ln -s /google-cloud-sdk/bin/gsutil /usr/local/bin/gsutil && \ + rm google-cloud-cli-linux-${GCLOUD_ARCH}.tar.gz + +# Install pip & groff +# Ubuntu 24.04 requires --break-system-packages due to PEP 668 +# https://peps.python.org/pep-0668/ +RUN apt-get update && \ + apt-get install -y python3-pip groff && \ + python3 -m pip install pycryptodome --user --break-system-packages && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + + +# # Install AWS CLI +# # https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html +RUN case "$TARGETPLATFORM" in \ + "linux/amd64") AWS_CLI_ARCH="x86_64" ;; \ + "linux/arm64") AWS_CLI_ARCH="aarch64" ;; \ + *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ + esac && \ + curl -L "https://awscli.amazonaws.com/awscli-exe-${AWS_CLI_ARCH}-${Aws_Cli_Version}.zip" -o "awscliv2.zip" && \ + unzip -q awscliv2.zip && \ + ./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli && \ + rm -f awscliv2.zip && \ + rm -rf ./aws + +# Install EKS CLI +# https://github.com/weaveworks/eksctl +RUN case "$TARGETPLATFORM" in \ + "linux/amd64") EKS_CLI_ARCH="amd64" ;; \ + "linux/arm64") EKS_CLI_ARCH="arm64" ;; \ + *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ + esac && \ + curl --silent --location "https://github.com/eksctl-io/eksctl/releases/download/v0.220.0/eksctl_Linux_${EKS_CLI_ARCH}.tar.gz" | tar xz -C /tmp && \ + mv /tmp/eksctl /usr/local/bin + +# Install ECS CLI +## https://github.com/aws/amazon-ecs-cli +RUN case "$TARGETPLATFORM" in \ + "linux/amd64") ECS_CLI_ARCH="amd64" ;; \ + "linux/arm64") ECS_CLI_ARCH="arm64" ;; \ + *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ + esac && \ + curl --silent --location "https://amazon-ecs-cli.s3.amazonaws.com/ecs-cli-linux-${ECS_CLI_ARCH}-v${Ecs_Cli_Version}" -o /usr/local/bin/ecs-cli && \ + chmod +x /usr/local/bin/ecs-cli + +# Install AWS IAM Authenticator +# https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html +RUN case "$TARGETPLATFORM" in \ + "linux/amd64") AWS_IAM_ARCH="amd64" ;; \ + "linux/arm64") AWS_IAM_ARCH="arm64" ;; \ + *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ + esac && \ + curl --silent --location https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v${Aws_Iam_Authenticator_Version}/aws-iam-authenticator_${Aws_Iam_Authenticator_Version}_linux_${AWS_IAM_ARCH} -o /usr/local/bin/aws-iam-authenticator && \ + chmod +x /usr/local/bin/aws-iam-authenticator + +## Install Istio CLI +## https://istio.io/docs/ops/diagnostic-tools/istioctl/ +RUN curl -sL https://istio.io/downloadIstioctl | sh - && \ + mv /root/.istioctl/bin/istioctl /usr/local/bin/istioctl && \ + rm -rf /root/.istioctl + +# Install Linkerd CLI +# https://linkerd.io/2/getting-started/ +RUN curl -sL https://run.linkerd.io/install | sh && \ + cp /root/.linkerd2/bin/linkerd /usr/local/bin && \ + rm -rf /root/.linkerd2 + +# Install Argo CD +RUN case "$TARGETPLATFORM" in \ + "linux/amd64") ARGO_ARCH="amd64" ;; \ + "linux/arm64") AROG_ARCH="arm64" ;; \ + *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ + esac && \ +curl -sSL -o argocd-linux-${ARGO_ARCH} https://github.com/argoproj/argo-cd/releases/download/v${Argocd_Version}/argocd-linux-${ARGO_ARCH} && \ +install -m 555 argocd-linux-${ARGO_ARCH} /usr/local/bin/argocd && \ +rm argocd-linux-${ARGO_ARCH} + +# Get common utilities for scripting +# https://mikefarah.gitbook.io/yq/ +# https://augeas.net/ +# Install yq from GitHub releases (PPA doesn't support Ubuntu 24.04) +RUN apt-get update && apt-get install -y jq openssh-client rsync git augeas-tools xxd && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* && \ + case "$TARGETPLATFORM" in \ + "linux/amd64") YQ_ARCH="amd64" ;; \ + "linux/arm64") YQ_ARCH="arm64" ;; \ + *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ + esac && \ + wget --quiet https://github.com/mikefarah/yq/releases/latest/download/yq_linux_${YQ_ARCH} -O /usr/bin/yq && \ + chmod +x /usr/bin/yq + +RUN rm -rf /usr/share/doc /usr/share/man /usr/share/info /var/cache/* From 57c5f29045b06bcf6e74ca62364a8397a57d223c Mon Sep 17 00:00:00 2001 From: JT Date: Tue, 16 Dec 2025 16:28:13 +1100 Subject: [PATCH 02/37] style: cleanup arg --- ubuntu.24.04/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/ubuntu.24.04/Dockerfile b/ubuntu.24.04/Dockerfile index e3968be..f54d541 100644 --- a/ubuntu.24.04/Dockerfile +++ b/ubuntu.24.04/Dockerfile @@ -23,7 +23,6 @@ ARG Java_Jdk_Version=21 ARG Kubectl_Version=1.32 ARG Kubelogin_Version=v0.1.6 ARG NodeJs_Version=22 -ARG Octopus_Cli_Legacy_Version=9.1.7 ARG Octopus_Cli_Version=2.20.1 ARG Octopus_Client_Version=14.3.1789 ARG Powershell_Version=7.5.4 From aef99dbdf84e58897f8894ce5d27f13495595ed9 Mon Sep 17 00:00:00 2001 From: JT Date: Tue, 16 Dec 2025 16:30:01 +1100 Subject: [PATCH 03/37] Add readme --- ubuntu.24.04/README.md | 67 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 ubuntu.24.04/README.md diff --git a/ubuntu.24.04/README.md b/ubuntu.24.04/README.md new file mode 100644 index 0000000..4e89c33 --- /dev/null +++ b/ubuntu.24.04/README.md @@ -0,0 +1,67 @@ +# Ubuntu WorkerTools - Noble + +> Please note that we update this document periodically to match the latest version on DockerHub which is publicly available. +> This does not necessarily match the content of Dockerfiles in this repository, as they may contain changes that are not released yet. + +## Image Name + +`octopusdeploy/worker-tools` + +## Tags + +- `6.0.0-ubuntu.24.04-arm64` +- `6.0-ubuntu.24.04-arm64` +- `6-ubuntu.24.04-arm64` +- `ubuntu.24.04-arm64` + +- `6.0.0-ubuntu.24.04-amd64` +- `6.0-ubuntu.24.04-amd64` +- `6-ubuntu.24.04-amd64` +- `ubuntu.24.04-amd64` + +## Base Image + +`ubuntu:24.04` + + +## Installed Software + +- Argo CD CLI 2.14.21 +- Aws CLI 2.24.10 +- Aws Iam Authenticator 0.7.9 +- Aws Powershell 4.1.734 +- Azure CLI 2.67.0 +- Azure Powershell 13.0.0 +- Dotnet Sdk 8.0 +- Ecs CLI 1.21.0 +- Eksctl 0.220.0 +- Google Cloud CLI 505.0.0 +- Google Cloud GKE auth plugin 505.0.0 +- Helm v3.16.4 +- Java Jdk 21 +- Kubectl 1.32 +- Kubelogin v0.1.6 +- NodeJS 22 - latest +- Octopus CLI 2.20.1 +- Octopus Client 14.3.1789 +- Powershell 7.5.4 +- Terraform 1.10.4 +- wget - Latest +- unzip - Latest +- apt-utils - Latest +- curl - Latest +- software-properties-common - Latest +- maven - Latest +- gradle - Latest +- Python2 - 2.7.18 +- Python3 - Latest +- groff - Latest +- Istio CLI - Latest +- Linkerd CLI - Latest +- jq - Latest +- yq - Latest +- openssh-client - Latest +- rsync - Latest +- git - Latest +- augeas-tools - Latest +- xxd - Latest From 7146cac647e4e58a2e0460a1b71ac629662b8d43 Mon Sep 17 00:00:00 2001 From: JT Date: Tue, 16 Dec 2025 16:36:53 +1100 Subject: [PATCH 04/37] Add build --- docker-compose.build.yml | 25 +++- ubuntu.24.04/scripts/run-tests.ps1 | 22 ++++ ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 | 143 +++++++++++++++++++++++ 3 files changed, 189 insertions(+), 1 deletion(-) create mode 100644 ubuntu.24.04/scripts/run-tests.ps1 create mode 100644 ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 diff --git a/docker-compose.build.yml b/docker-compose.build.yml index 0ef09a7..4d846f4 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -16,6 +16,29 @@ services: - ./ubuntu.22.04:/app working_dir: /app entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] + ubuntu.24.04-amd64: + build: + context: ubuntu.24.04 + args: + TARGETPLATFORM: linux/amd64 + image: docker.packages.octopushq.com/octopusdeploy/worker-tools:${BUILD_NUMBER?err}-ubuntu.24.04-amd64 + platform: linux/amd64 + volumes: + - ./ubuntu.24.04:/app + working_dir: /app + entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] + + ubuntu.24.04-arm64: + build: + context: ubuntu.24.04 + args: + TARGETPLATFORM: linux/arm64 + image: docker.packages.octopushq.com/octopusdeploy/worker-tools:${BUILD_NUMBER?err}-ubuntu.24.04-arm64 + platform: linux/arm64 + volumes: + - ./ubuntu.24.04:/app + working_dir: /app + entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] windows.ltsc2019: build: windows.ltsc2019 @@ -31,4 +54,4 @@ services: volumes: - "./windows.ltsc2022:c:\\app" working_dir: "c:\\app" - entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] \ No newline at end of file + entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] diff --git a/ubuntu.24.04/scripts/run-tests.ps1 b/ubuntu.24.04/scripts/run-tests.ps1 new file mode 100644 index 0000000..ae30688 --- /dev/null +++ b/ubuntu.24.04/scripts/run-tests.ps1 @@ -0,0 +1,22 @@ +Write-Output "##teamcity[blockOpened name='Pester tests']" + +try { + Install-Module -Name "Pester" -MinimumVersion "5.0.2" -Force + + Import-Module -Name "Pester" + + Set-Location /app/spec + + Write-Output "Running Pester Tests" + $configuration = [PesterConfiguration]::Default + $configuration.TestResult.Enabled = $true + $configuration.TestResult.OutputPath = '/app/spec/PesterTestResults.xml' + $configuration.TestResult.OutputFormat = 'NUnitXml' + $configuration.Run.PassThru = $true + $configuration.Output.Verbosity = "Detailed" + + Invoke-Pester -configuration $configuration +} catch { + exit 1 +} +Write-Output "##teamcity[blockClosed name='Pester tests']" diff --git a/ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 b/ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 new file mode 100644 index 0000000..c259d58 --- /dev/null +++ b/ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 @@ -0,0 +1,143 @@ +$ErrorActionPreference = "Continue" + +$pesterModules = @( Get-Module -Name "Pester"); +Write-Host 'Running tests with Pester v'+$($pesterModules[0].Version) + +Describe 'installed dependencies' { + It 'has Octopus.Client installed ' { + $expectedVersion = "14.3.1789" + [Reflection.AssemblyName]::GetAssemblyName("/Octopus.Client.dll").Version.ToString() | Should -match "$expectedVersion.0" + } + + It 'has dotnet installed' { + dotnet --version | Should -match '8.0.\d+' + $LASTEXITCODE | Should -be 0 + } + + It 'has java installed' { + java --version | Should -beLike "* 21.0.*" + $LASTEXITCODE | Should -be 0 + } + + # It 'has aws powershell module installed' { + # (Get-Module AWSPowerShell.NetCore -ListAvailable).Version.ToString() | should -be '4.1.734' + # } + + # It 'has az installed' { + # $output = (& az version) | convertfrom-json + # $output.'azure-cli' | Should -be '2.67.0' + # $LASTEXITCODE | Should -be 0 + # } + + # It 'has az powershell module installed' { + # (Get-Module Az -ListAvailable).Version.ToString() | should -be '13.0.0' + # } + + # It 'has aws cli installed' { + # aws --version 2>&1 | Should -match '2.24.10' + # } + + # It 'has node installed' { + # node --version | Should -match '22.\d+.\d+' + # $LASTEXITCODE | Should -be 0 + # } + + # It 'has kubectl installed' { + # kubectl version --client | Select-Object -First 1 | Should -match '1.32.\d+' + # $LASTEXITCODE | Should -be 0 + # } + + # It 'has kubelogin installed' { + # kubelogin --version | Select-Object -First 1 -Skip 1 | Should -match 'v0.1.6' + # $LASTEXITCODE | Should -be 0 + # } + + # It 'has helm installed' { + # helm version | Should -match '3.16.4' + # $LASTEXITCODE | Should -be 0 + # } + + # # If the terraform version is not the latest, then `terraform version` returns multiple lines and a non-zero return code + # It 'has terraform installed' { + # terraform version | Select-Object -First 1 | Should -match '1.10.4' + # } + + # It 'has python3 installed' { + # python3 --version | Should -match '3.10.12' + # $LASTEXITCODE | Should -be 0 + # } + + # It 'has python2 installed' { + # # python 2 prints it's version to stderr, for some reason + # python --version 2>&1 | Should -match 'Python 2.7.18' + # $LASTEXITCODE | Should -be 0 + # } + + # It 'has gcloud installed' { + # gcloud --version | Select -First 1 | Should -be 'Google Cloud SDK 505.0.0' + # $LASTEXITCODE | Should -be 0 + # } + + # It 'has gke-gcloud-auth-plugin installed' { + # #We use belike here as the hash after the 'alpha+' changes and isn't that important + # gke-gcloud-auth-plugin --version | Select -First 1 | Should -beLike 'Kubernetes v1.28.2-alpha+*' + # $LASTEXITCODE | Should -be 0 + # } + + # It 'has octopus cli installed' { + # octopus version | Should -match '2.20.1' + # $LASTEXITCODE | Should -be 0 + # } + + # It 'has octo installed' { + # octo --version | Should -match '9.1.7' + # $LASTEXITCODE | Should -be 0 + # } + + # It 'has eksctl installed' { + # eksctl version | Should -match '0.200.0' + # $LASTEXITCODE | Should -be 0 + # } + + # It 'has ecs-cli installed' { + # ecs-cli --version | Should -match '1.21.0' + # $LASTEXITCODE | Should -be 0 + # } + + # It 'has mvn installed' { + # mvn --version | out-null + # $LASTEXITCODE | Should -be 0 + # } + + # It 'has gradle installed' { + # gradle --version | out-null + # $LASTEXITCODE | Should -be 0 + # } + + # It 'has aws-iam-authenticator installed' { + # aws-iam-authenticator version | out-null + # $LASTEXITCODE | Should -be 0 + # } + + # It 'has istioctl installed' { + # istioctl version --remote=false | out-null + # $LASTEXITCODE | Should -be 0 + # } + + # It 'has linkerd installed' { + # linkerd version --client | out-null + # $LASTEXITCODE | Should -be 0 + # } + + # It 'should have installed powershell core' { + # $output = & pwsh --version + # $LASTEXITCODE | Should -be 0 + # $output | Should -match '^PowerShell 7\.4\.6*' + # } + + # It 'should have installed argo cli' { + # $output = (& argocd version --client) -join "`n" + # $LASTEXITCODE | Should -be 0 + # $output | Should -Match '2.13.3' + # } +} From 1b3b65d80f1012ba28b66f0cd8c437cde65fd179 Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 17 Dec 2025 11:22:29 +1100 Subject: [PATCH 05/37] Fix install issues --- ubuntu.24.04/Dockerfile | 39 +++++++++++++++++++++++++-------------- ubuntu.24.04/README.md | 4 ++-- 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/ubuntu.24.04/Dockerfile b/ubuntu.24.04/Dockerfile index f54d541..9cac52f 100644 --- a/ubuntu.24.04/Dockerfile +++ b/ubuntu.24.04/Dockerfile @@ -16,8 +16,8 @@ ARG Azure_Powershell_Version=13.0.0 ARG Dotnet_Sdk_Version=8.0 ARG Ecs_Cli_Version=1.21.0 ARG Eks_Cli_Version=v0.220.0 -ARG Google_Cloud_Cli_Version=505.0.0-0 -ARG Google_Cloud_Gke_Cloud_Auth_Plugin_Version=505.0.0-0 +ARG Google_Cloud_Cli_Version=550.0.0-0 +ARG Google_Cloud_Gke_Cloud_Auth_Plugin_Version=550.0.0-0 ARG Helm_Version=v3.16.4 ARG Java_Jdk_Version=21 ARG Kubectl_Version=1.32 @@ -48,19 +48,26 @@ RUN case "$TARGETPLATFORM" in \ rm powershell-${Powershell_Version}-linux-${PWSH_ARCH}.tar.gz # Install Octopus/Octo CLI +# RUN apt-get update && \ +# curl -fsSL https://apt.octopus.com/public.key | gpg --dearmor -o /etc/apt/keyrings/octopus.gpg && \ +# ARCH=$(dpkg --print-architecture) && \ +# printf "deb [arch=%s signed-by=/etc/apt/keyrings/octopus.gpg] https://apt.octopus.com/ stable main\n" "$ARCH" > /etc/apt/sources.list.d/octopus.list && \ +# apt-get update && \ +# apt-get install -y octopus-cli=${Octopus_Cli_Version} && \ +# apt-get clean && \ +# rm -rf /var/lib/apt/lists/* + +# Install Octopus CLI Direct from GitHub (temporary) +# https://github.com/OctopusDeploy/cli RUN case "$TARGETPLATFORM" in \ - "linux/amd64") OCTO_CLI_ARCH="amd64" ;; \ - "linux/arm64") OCTO_CLI_ARCH="arm64" ;; \ + "linux/amd64") OCTO_ARCH="x64" ;; \ + "linux/arm64") OCTO_ARCH="arm64" ;; \ *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ - esac && \ - apt-get update && \ - curl -fsSL https://apt.octopus.com/public.key | gpg --dearmor -o /etc/apt/keyrings/octopus.gpg && \ - echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/octopus.gpg] https://apt.octopus.com/ stable main" | tee /etc/apt/sources.list.d/octopus.list > /dev/null && \ - apt-get update && \ - apt-get install -y octopus-cli=${Octopus_Cli_Version} && \ - # octopuscli=${Octopus_Cli_Legacy_Version} Not sure if we have an ARM version of this - apt-get clean && \ - rm -rf /var/lib/apt/lists/* + esac && \ + wget --quiet https://github.com/OctopusDeploy/cli/releases/download/v${Octopus_Cli_Version}/octopus_${Octopus_Cli_Version}_Linux_${OCTO_ARCH}.tar.gz && \ + tar -xzf octopus_${Octopus_Cli_Version}_Linux_${OCTO_ARCH}.tar.gz -C /usr/local/bin octopus && \ + rm octopus_${Octopus_Cli_Version}_Linux_${OCTO_ARCH}.tar.gz && \ + ln -s /usr/local/bin/octopus /usr/local/bin/octo # Install Octopus Client # https://octopus.com/docs/octopus-rest-api/octopus.client @@ -156,6 +163,10 @@ RUN case "$TARGETPLATFORM" in \ "linux/arm64") GCLOUD_ARCH="arm" ;; \ *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ esac && \ + curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg && \ + echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ + + curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-${GCLOUD_ARCH}.tar.gz && \ tar -xf google-cloud-cli-linux-${GCLOUD_ARCH}.tar.gz && \ ./google-cloud-sdk/install.sh --quiet --usage-reporting false --path-update true && \ @@ -180,7 +191,7 @@ RUN case "$TARGETPLATFORM" in \ "linux/arm64") AWS_CLI_ARCH="aarch64" ;; \ *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ esac && \ - curl -L "https://awscli.amazonaws.com/awscli-exe-${AWS_CLI_ARCH}-${Aws_Cli_Version}.zip" -o "awscliv2.zip" && \ + curl -L "https://awscli.amazonaws.com/awscli-exe-linux-${AWS_CLI_ARCH}-${Aws_Cli_Version}.zip" -o "awscliv2.zip" && \ unzip -q awscliv2.zip && \ ./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli && \ rm -f awscliv2.zip && \ diff --git a/ubuntu.24.04/README.md b/ubuntu.24.04/README.md index 4e89c33..9d2c49c 100644 --- a/ubuntu.24.04/README.md +++ b/ubuntu.24.04/README.md @@ -35,8 +35,8 @@ - Dotnet Sdk 8.0 - Ecs CLI 1.21.0 - Eksctl 0.220.0 -- Google Cloud CLI 505.0.0 -- Google Cloud GKE auth plugin 505.0.0 +- Google Cloud CLI 550.0.0 +- Google Cloud GKE auth plugin 550.0.0 - Helm v3.16.4 - Java Jdk 21 - Kubectl 1.32 From e6090ef2406231c46e4000ea216a6002904446a1 Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 17 Dec 2025 13:46:02 +1100 Subject: [PATCH 06/37] Populate Test file --- ubuntu.24.04/Tests.Dockerfile | 4 ++++ ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 ubuntu.24.04/Tests.Dockerfile diff --git a/ubuntu.24.04/Tests.Dockerfile b/ubuntu.24.04/Tests.Dockerfile new file mode 100644 index 0000000..94cb776 --- /dev/null +++ b/ubuntu.24.04/Tests.Dockerfile @@ -0,0 +1,4 @@ +ARG ContainerUnderTest=octopusdeploy/worker-tools + +FROM ${ContainerUnderTest} +SHELL ["pwsh", "-Command"] diff --git a/ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 b/ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 index c259d58..d1ad6f1 100644 --- a/ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 +++ b/ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 @@ -4,10 +4,10 @@ $pesterModules = @( Get-Module -Name "Pester"); Write-Host 'Running tests with Pester v'+$($pesterModules[0].Version) Describe 'installed dependencies' { - It 'has Octopus.Client installed ' { - $expectedVersion = "14.3.1789" - [Reflection.AssemblyName]::GetAssemblyName("/Octopus.Client.dll").Version.ToString() | Should -match "$expectedVersion.0" - } + # It 'has Octopus.Client installed ' { + # $expectedVersion = "14.3.1789" + # [Reflection.AssemblyName]::GetAssemblyName("/Octopus.Client.dll").Version.ToString() | Should -match "$expectedVersion.0" + # } It 'has dotnet installed' { dotnet --version | Should -match '8.0.\d+' From 07578eb1847d3d275f3be223fe7ed6fe91df3385 Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 17 Dec 2025 14:12:42 +1100 Subject: [PATCH 07/37] remove redundant version in docker compose --- docker-compose.build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker-compose.build.yml b/docker-compose.build.yml index 4d846f4..68b0c53 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -1,5 +1,3 @@ -version: '3' - services: ubuntu.18.04: build: ubuntu.18.04 From d704555a3ee9971e83ea5cb3aeba291cab08d98e Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 17 Dec 2025 14:41:02 +1100 Subject: [PATCH 08/37] Fix linkerd install --- ubuntu.24.04/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ubuntu.24.04/Dockerfile b/ubuntu.24.04/Dockerfile index 9cac52f..8a7c9dc 100644 --- a/ubuntu.24.04/Dockerfile +++ b/ubuntu.24.04/Dockerfile @@ -234,10 +234,10 @@ RUN curl -sL https://istio.io/downloadIstioctl | sh - && \ rm -rf /root/.istioctl # Install Linkerd CLI -# https://linkerd.io/2/getting-started/ -RUN curl -sL https://run.linkerd.io/install | sh && \ - cp /root/.linkerd2/bin/linkerd /usr/local/bin && \ - rm -rf /root/.linkerd2 +# https://linkerd.io/2-edge/getting-started/ +RUN curl --proto '=https' --tlsv1.2 -sSfL https://run.linkerd.io/install-edge | sh && \ + export PATH=$HOME/.linkerd2/bin:$PATH + # Install Argo CD RUN case "$TARGETPLATFORM" in \ From 6a92bedcdf098908d9455b5e26abaa0900a67a93 Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 17 Dec 2025 17:51:43 +1100 Subject: [PATCH 09/37] Update Dockerfile re-enable apt install of Octopus CLI --- ubuntu.24.04/Dockerfile | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/ubuntu.24.04/Dockerfile b/ubuntu.24.04/Dockerfile index 8a7c9dc..c9b6d5a 100644 --- a/ubuntu.24.04/Dockerfile +++ b/ubuntu.24.04/Dockerfile @@ -48,26 +48,14 @@ RUN case "$TARGETPLATFORM" in \ rm powershell-${Powershell_Version}-linux-${PWSH_ARCH}.tar.gz # Install Octopus/Octo CLI -# RUN apt-get update && \ -# curl -fsSL https://apt.octopus.com/public.key | gpg --dearmor -o /etc/apt/keyrings/octopus.gpg && \ -# ARCH=$(dpkg --print-architecture) && \ -# printf "deb [arch=%s signed-by=/etc/apt/keyrings/octopus.gpg] https://apt.octopus.com/ stable main\n" "$ARCH" > /etc/apt/sources.list.d/octopus.list && \ -# apt-get update && \ -# apt-get install -y octopus-cli=${Octopus_Cli_Version} && \ -# apt-get clean && \ -# rm -rf /var/lib/apt/lists/* - -# Install Octopus CLI Direct from GitHub (temporary) -# https://github.com/OctopusDeploy/cli -RUN case "$TARGETPLATFORM" in \ - "linux/amd64") OCTO_ARCH="x64" ;; \ - "linux/arm64") OCTO_ARCH="arm64" ;; \ - *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ - esac && \ - wget --quiet https://github.com/OctopusDeploy/cli/releases/download/v${Octopus_Cli_Version}/octopus_${Octopus_Cli_Version}_Linux_${OCTO_ARCH}.tar.gz && \ - tar -xzf octopus_${Octopus_Cli_Version}_Linux_${OCTO_ARCH}.tar.gz -C /usr/local/bin octopus && \ - rm octopus_${Octopus_Cli_Version}_Linux_${OCTO_ARCH}.tar.gz && \ - ln -s /usr/local/bin/octopus /usr/local/bin/octo +RUN apt-get update && \ + curl -fsSL https://apt.octopus.com/public.key | gpg --dearmor -o /etc/apt/keyrings/octopus.gpg && \ + ARCH=$(dpkg --print-architecture) && \ + printf "deb [arch=%s signed-by=/etc/apt/keyrings/octopus.gpg] https://apt.octopus.com/ stable main\n" "$ARCH" > /etc/apt/sources.list.d/octopus.list && \ + apt-get update && \ + apt-cache madison apt-get install -y octopus-cli=${Octopus_Cli_Version} && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* # Install Octopus Client # https://octopus.com/docs/octopus-rest-api/octopus.client From 4098fbf95ff01f9e57d1a32e29bc346533533700 Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 17 Dec 2025 07:30:12 +0000 Subject: [PATCH 10/37] Creating of multi arch docker deployment process --- .octopus/ubuntu.multi.arch/deployment_process.ocl | 0 .octopus/ubuntu.multi.arch/deployment_settings.ocl | 7 +++++++ .octopus/ubuntu.multi.arch/schema_version.ocl | 1 + .octopus/ubuntu.multi.arch/variables.ocl | 0 4 files changed, 8 insertions(+) create mode 100644 .octopus/ubuntu.multi.arch/deployment_process.ocl create mode 100644 .octopus/ubuntu.multi.arch/deployment_settings.ocl create mode 100644 .octopus/ubuntu.multi.arch/schema_version.ocl create mode 100644 .octopus/ubuntu.multi.arch/variables.ocl diff --git a/.octopus/ubuntu.multi.arch/deployment_process.ocl b/.octopus/ubuntu.multi.arch/deployment_process.ocl new file mode 100644 index 0000000..e69de29 diff --git a/.octopus/ubuntu.multi.arch/deployment_settings.ocl b/.octopus/ubuntu.multi.arch/deployment_settings.ocl new file mode 100644 index 0000000..562e7dd --- /dev/null +++ b/.octopus/ubuntu.multi.arch/deployment_settings.ocl @@ -0,0 +1,7 @@ +connectivity_policy { + allow_deployments_to_no_targets = true +} + +versioning_strategy { + template = "#{Octopus.Version.LastMajor}.#{Octopus.Version.LastMinor}.#{Octopus.Version.NextPatch}" +} \ No newline at end of file diff --git a/.octopus/ubuntu.multi.arch/schema_version.ocl b/.octopus/ubuntu.multi.arch/schema_version.ocl new file mode 100644 index 0000000..500586e --- /dev/null +++ b/.octopus/ubuntu.multi.arch/schema_version.ocl @@ -0,0 +1 @@ +version = 10 \ No newline at end of file diff --git a/.octopus/ubuntu.multi.arch/variables.ocl b/.octopus/ubuntu.multi.arch/variables.ocl new file mode 100644 index 0000000..e69de29 From 2d5312d196f4c7b213b123c3a11b13bae013f4b3 Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 17 Dec 2025 18:31:22 +1100 Subject: [PATCH 11/37] remove variables --- .octopus/ubuntu.multi.arch/variables.ocl | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .octopus/ubuntu.multi.arch/variables.ocl diff --git a/.octopus/ubuntu.multi.arch/variables.ocl b/.octopus/ubuntu.multi.arch/variables.ocl deleted file mode 100644 index e69de29..0000000 From 15a2cc32ef1cba1c19d5f9f2fe11c928b8538e50 Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 17 Dec 2025 18:32:42 +1100 Subject: [PATCH 12/37] Revert "remove variables" This reverts commit 2d5312d196f4c7b213b123c3a11b13bae013f4b3. --- .octopus/ubuntu.multi.arch/variables.ocl | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .octopus/ubuntu.multi.arch/variables.ocl diff --git a/.octopus/ubuntu.multi.arch/variables.ocl b/.octopus/ubuntu.multi.arch/variables.ocl new file mode 100644 index 0000000..e69de29 From c68eb2d8b50ff3fc276592965119d5f6de4cbf86 Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 17 Dec 2025 18:34:24 +1100 Subject: [PATCH 13/37] Revert to v9 scehma --- .octopus/ubuntu.multi.arch/schema_version.ocl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.octopus/ubuntu.multi.arch/schema_version.ocl b/.octopus/ubuntu.multi.arch/schema_version.ocl index 500586e..1d57dee 100644 --- a/.octopus/ubuntu.multi.arch/schema_version.ocl +++ b/.octopus/ubuntu.multi.arch/schema_version.ocl @@ -1 +1 @@ -version = 10 \ No newline at end of file +version = 9 From 3f5297a9dff81ca09f4f186d318dd5d60641794c Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 17 Dec 2025 18:35:52 +1100 Subject: [PATCH 14/37] Delete variables.ocl --- .octopus/ubuntu.multi.arch/variables.ocl | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .octopus/ubuntu.multi.arch/variables.ocl diff --git a/.octopus/ubuntu.multi.arch/variables.ocl b/.octopus/ubuntu.multi.arch/variables.ocl deleted file mode 100644 index e69de29..0000000 From 7b28577283b5cd5d25524387ec1d3d5b9a4e9a85 Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 17 Dec 2025 18:47:05 +1100 Subject: [PATCH 15/37] Revert "Delete variables.ocl" This reverts commit 3f5297a9dff81ca09f4f186d318dd5d60641794c. --- .octopus/ubuntu.multi.arch/variables.ocl | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .octopus/ubuntu.multi.arch/variables.ocl diff --git a/.octopus/ubuntu.multi.arch/variables.ocl b/.octopus/ubuntu.multi.arch/variables.ocl new file mode 100644 index 0000000..e69de29 From bc64e030af8ffd49f257b1812f0e6e25dd24ef7f Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 17 Dec 2025 07:49:36 +0000 Subject: [PATCH 16/37] Octopus Schema Migration to v10 --- .octopus/ubuntu.multi.arch/schema_version.ocl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.octopus/ubuntu.multi.arch/schema_version.ocl b/.octopus/ubuntu.multi.arch/schema_version.ocl index 1d57dee..500586e 100644 --- a/.octopus/ubuntu.multi.arch/schema_version.ocl +++ b/.octopus/ubuntu.multi.arch/schema_version.ocl @@ -1 +1 @@ -version = 9 +version = 10 \ No newline at end of file From 18a9755621280504016f8aafd5ce37a4c217c3ee Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 17 Dec 2025 07:49:36 +0000 Subject: [PATCH 17/37] Update variables --- .octopus/ubuntu.multi.arch/variables.ocl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.octopus/ubuntu.multi.arch/variables.ocl b/.octopus/ubuntu.multi.arch/variables.ocl index e69de29..d0f7535 100644 --- a/.octopus/ubuntu.multi.arch/variables.ocl +++ b/.octopus/ubuntu.multi.arch/variables.ocl @@ -0,0 +1,10 @@ +variable "Docker.Registry.Target.Hostname" { + value "#{DockerHubDockerRegistry.Hostname}" { + environment = ["production"] + } + + value "#{OctopusDockerRegistry.Hostname}" { + description = "" + environment = ["staging"] + } +} \ No newline at end of file From 7aabcdf5c9e836260a0917948e87693537b8530f Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 17 Dec 2025 07:59:38 +0000 Subject: [PATCH 18/37] Add first pass variables --- .octopus/ubuntu.multi.arch/variables.ocl | 54 ++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/.octopus/ubuntu.multi.arch/variables.ocl b/.octopus/ubuntu.multi.arch/variables.ocl index d0f7535..49d3b9c 100644 --- a/.octopus/ubuntu.multi.arch/variables.ocl +++ b/.octopus/ubuntu.multi.arch/variables.ocl @@ -7,4 +7,58 @@ variable "Docker.Registry.Target.Hostname" { description = "" environment = ["staging"] } +} + +variable "WorkerTools.Version.MajorMinor" { + value "#{Octopus.Release.Number | VersionMajor}.#{Octopus.Release.Number | VersionMinor}" {} +} + +variable "WorkerTools.Version.Major" { + value "#{Octopus.Release.Number | VersionMajor}" {} +} + +variable "WorkerTools.Version.Full" { + value "#{Octopus.Release.Number}" {} +} + +variable "WorkerTools.Tags.Os" { + value "ubuntu.24.04" {} +} + +variable "WorkerTools.Tags.FullyQualified" { + value "#{Octopus.Release.Number}-ubuntu.24.04" {} +} + +variable "Promoter.OsSuffix" { + value "ubuntu.24.04" {} +} + +variable "Docker.Registry.Target.Username" { + value "#{DockerHubDockerRegistry.Username}" { + environment = ["production"] + } + + value "#{OctopusDockerRegistry.Username}" { + environment = ["staging"] + } +} + +variable "Docker.Registry.Target.Repository" { + value "docker.io/octopusdeploy/worker-tools" { + environment = ["production"] + } + + value "docker.packages.octopushq.com/octopusdeploy/worker-tools" { + environment = ["staging"] + } +} + +variable "Docker.Registry.Target.Password" { + value "#{DockerHubDockerRegistry.Password}" { + environment = ["production"] + } + + value "#{OctopusDockerRegistry.Password}" { + environment = ["staging"] + } } \ No newline at end of file From e6968082664ea8441d11c389baf5e667c91271b0 Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 17 Dec 2025 08:35:22 +0000 Subject: [PATCH 19/37] Add multi arch manifest generation --- .../ubuntu.multi.arch/deployment_process.ocl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.octopus/ubuntu.multi.arch/deployment_process.ocl b/.octopus/ubuntu.multi.arch/deployment_process.ocl index e69de29..0ace218 100644 --- a/.octopus/ubuntu.multi.arch/deployment_process.ocl +++ b/.octopus/ubuntu.multi.arch/deployment_process.ocl @@ -0,0 +1,16 @@ +step "create-multi-arch-docker-manifest" { + name = "Create Multi-Arch Docker Manifest" + + action { + environments = ["staging", "production"] + properties = { + DockerPush.Target.Docker.Registry.Hostname = "#{Docker.Registry.Target.Hostname}" + DockerPush.Target.Docker.Registry.Password = "#{DockerHubDockerRegistry.Password}" + DockerPush.Target.Docker.Registry.Username = "#{Docker.Registry.Target.Username}" + DockerPush.Target.Docker.Repository = "#{Docker.Registry.Target.Repository}" + Octopus.Action.Template.Id = "ActionTemplates-3502" + Octopus.Action.Template.Version = "0" + } + worker_pool = "hosted-ubuntu" + } +} \ No newline at end of file From 520c996b42c0841fde8c6e8e58f219ed6be248da Mon Sep 17 00:00:00 2001 From: JT Date: Thu, 18 Dec 2025 11:40:44 +1100 Subject: [PATCH 20/37] fix install script bug --- ubuntu.24.04/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu.24.04/Dockerfile b/ubuntu.24.04/Dockerfile index c9b6d5a..6b43ce8 100644 --- a/ubuntu.24.04/Dockerfile +++ b/ubuntu.24.04/Dockerfile @@ -53,7 +53,7 @@ RUN apt-get update && \ ARCH=$(dpkg --print-architecture) && \ printf "deb [arch=%s signed-by=/etc/apt/keyrings/octopus.gpg] https://apt.octopus.com/ stable main\n" "$ARCH" > /etc/apt/sources.list.d/octopus.list && \ apt-get update && \ - apt-cache madison apt-get install -y octopus-cli=${Octopus_Cli_Version} && \ + apt-get install -y octopus-cli=${Octopus_Cli_Version} && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* From 362566c9b24cb790c9f24749bea083d243b877b2 Mon Sep 17 00:00:00 2001 From: JT Date: Thu, 18 Dec 2025 12:58:10 +1100 Subject: [PATCH 21/37] simplify compose file --- docker-compose.build.yml | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/docker-compose.build.yml b/docker-compose.build.yml index 68b0c53..bde5b80 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -14,29 +14,14 @@ services: - ./ubuntu.22.04:/app working_dir: /app entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] - ubuntu.24.04-amd64: - build: - context: ubuntu.24.04 - args: - TARGETPLATFORM: linux/amd64 - image: docker.packages.octopushq.com/octopusdeploy/worker-tools:${BUILD_NUMBER?err}-ubuntu.24.04-amd64 - platform: linux/amd64 - volumes: - - ./ubuntu.24.04:/app - working_dir: /app - entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] - - ubuntu.24.04-arm64: - build: - context: ubuntu.24.04 - args: - TARGETPLATFORM: linux/arm64 - image: docker.packages.octopushq.com/octopusdeploy/worker-tools:${BUILD_NUMBER?err}-ubuntu.24.04-arm64 - platform: linux/arm64 - volumes: - - ./ubuntu.24.04:/app - working_dir: /app - entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] + + # Use a buildx build for x-plat build unlike the above + ubuntu.24.04: + image: docker.packages.octopushq.com/octopusdeploy/worker-tools:${BUILD_NUMBER?err}-ubuntu.24.04 + volumes: + - ./ubuntu.24.04:/app + working_dir: /app + entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] windows.ltsc2019: build: windows.ltsc2019 From 5953de352391724b5ad6d740227558a5a3358f69 Mon Sep 17 00:00:00 2001 From: JT Date: Thu, 18 Dec 2025 13:21:21 +1100 Subject: [PATCH 22/37] multi-arch compose --- docker-compose.build.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docker-compose.build.yml b/docker-compose.build.yml index bde5b80..a0f5b2a 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -17,11 +17,16 @@ services: # Use a buildx build for x-plat build unlike the above ubuntu.24.04: - image: docker.packages.octopushq.com/octopusdeploy/worker-tools:${BUILD_NUMBER?err}-ubuntu.24.04 - volumes: - - ./ubuntu.24.04:/app - working_dir: /app - entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] + image: docker.packages.octopushq.com/octopusdeploy/worker-tools:${BUILD_NUMBER?err}-ubuntu.24.04 + build: + context: ./ubuntu.24.04 + platforms: + - linux/amd64 + - linux/arm64 + volumes: + - ./ubuntu.24.04:/app + working_dir: /app + entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] windows.ltsc2019: build: windows.ltsc2019 From 0e66576b57c42024014905bc06b07a70f642284f Mon Sep 17 00:00:00 2001 From: JT Date: Thu, 18 Dec 2025 14:06:04 +1100 Subject: [PATCH 23/37] take multiarch out of compose build --- docker-compose.build.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docker-compose.build.yml b/docker-compose.build.yml index a0f5b2a..572937a 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -18,11 +18,6 @@ services: # Use a buildx build for x-plat build unlike the above ubuntu.24.04: image: docker.packages.octopushq.com/octopusdeploy/worker-tools:${BUILD_NUMBER?err}-ubuntu.24.04 - build: - context: ./ubuntu.24.04 - platforms: - - linux/amd64 - - linux/arm64 volumes: - ./ubuntu.24.04:/app working_dir: /app From ab0b753dbe8181a6bb6c1f8c101895b4f6aa57fe Mon Sep 17 00:00:00 2001 From: JT Date: Thu, 18 Dec 2025 15:09:55 +1100 Subject: [PATCH 24/37] re-instate multi image --- docker-compose.build.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/docker-compose.build.yml b/docker-compose.build.yml index 572937a..7a5e887 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -7,17 +7,15 @@ services: working_dir: /app entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] - ubuntu.22.04: - build: ubuntu.22.04 - image: docker.packages.octopushq.com/octopusdeploy/worker-tools:${BUILD_NUMBER?err}-ubuntu.22.04 - volumes: - - ./ubuntu.22.04:/app - working_dir: /app - entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] - - # Use a buildx build for x-plat build unlike the above - ubuntu.24.04: - image: docker.packages.octopushq.com/octopusdeploy/worker-tools:${BUILD_NUMBER?err}-ubuntu.24.04 + ubuntu.24.04-amd64: + image: docker.packages.octopushq.com/octopusdeploy/worker-tools:${BUILD_NUMBER?err}-ubuntu.24.04-amd64 + volumes: + - ./ubuntu.24.04:/app + working_dir: /app + entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] + + ubuntu.24.04-arm64: + image: docker.packages.octopushq.com/octopusdeploy/worker-tools:${BUILD_NUMBER?err}-ubuntu.24.04-arm64 volumes: - ./ubuntu.24.04:/app working_dir: /app From 3c537f6e22710c4bfe2a7aecc91dbc4dae1fe022 Mon Sep 17 00:00:00 2001 From: JT Date: Thu, 18 Dec 2025 15:18:33 +1100 Subject: [PATCH 25/37] fixed broken docker compose --- docker-compose.build.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docker-compose.build.yml b/docker-compose.build.yml index 7a5e887..65ed0fb 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -7,7 +7,20 @@ services: working_dir: /app entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] + ubuntu.22.04: + build: ubuntu.22.04 + image: docker.packages.octopushq.com/octopusdeploy/worker-tools:${BUILD_NUMBER?err}-ubuntu.22.04 + volumes: + - ./ubuntu.22.04:/app + working_dir: /app + entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] + + # Use a buildx build for x-plat build unlike the above ubuntu.24.04-amd64: + build: + context: ./ubuntu.24.04 + args: + TARGETPLATFORM: linux/amd64 image: docker.packages.octopushq.com/octopusdeploy/worker-tools:${BUILD_NUMBER?err}-ubuntu.24.04-amd64 volumes: - ./ubuntu.24.04:/app @@ -15,6 +28,10 @@ services: entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] ubuntu.24.04-arm64: + build: + context: ./ubuntu.24.04 + args: + TARGETPLATFORM: linux/arm64 image: docker.packages.octopushq.com/octopusdeploy/worker-tools:${BUILD_NUMBER?err}-ubuntu.24.04-arm64 volumes: - ./ubuntu.24.04:/app From 891e68fce3af0981d789e7ba656480c9e8d5f1f3 Mon Sep 17 00:00:00 2001 From: JT Date: Thu, 18 Dec 2025 16:28:59 +1100 Subject: [PATCH 26/37] strip deployment process --- .../ubuntu.multi.arch/deployment_process.ocl | 16 ---------------- docker-compose.build.yml | 1 - 2 files changed, 17 deletions(-) diff --git a/.octopus/ubuntu.multi.arch/deployment_process.ocl b/.octopus/ubuntu.multi.arch/deployment_process.ocl index 0ace218..e69de29 100644 --- a/.octopus/ubuntu.multi.arch/deployment_process.ocl +++ b/.octopus/ubuntu.multi.arch/deployment_process.ocl @@ -1,16 +0,0 @@ -step "create-multi-arch-docker-manifest" { - name = "Create Multi-Arch Docker Manifest" - - action { - environments = ["staging", "production"] - properties = { - DockerPush.Target.Docker.Registry.Hostname = "#{Docker.Registry.Target.Hostname}" - DockerPush.Target.Docker.Registry.Password = "#{DockerHubDockerRegistry.Password}" - DockerPush.Target.Docker.Registry.Username = "#{Docker.Registry.Target.Username}" - DockerPush.Target.Docker.Repository = "#{Docker.Registry.Target.Repository}" - Octopus.Action.Template.Id = "ActionTemplates-3502" - Octopus.Action.Template.Version = "0" - } - worker_pool = "hosted-ubuntu" - } -} \ No newline at end of file diff --git a/docker-compose.build.yml b/docker-compose.build.yml index 65ed0fb..e71b772 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -15,7 +15,6 @@ services: working_dir: /app entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"] - # Use a buildx build for x-plat build unlike the above ubuntu.24.04-amd64: build: context: ./ubuntu.24.04 From c02204d535c214a0934032ba513284a4180a3e0e Mon Sep 17 00:00:00 2001 From: JT Date: Thu, 18 Dec 2025 05:32:21 +0000 Subject: [PATCH 27/37] Fake release process --- .../ubuntu.multi.arch/deployment_process.ocl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.octopus/ubuntu.multi.arch/deployment_process.ocl b/.octopus/ubuntu.multi.arch/deployment_process.ocl index e69de29..01cda02 100644 --- a/.octopus/ubuntu.multi.arch/deployment_process.ocl +++ b/.octopus/ubuntu.multi.arch/deployment_process.ocl @@ -0,0 +1,18 @@ +step "run-a-script" { + name = "Run a Script" + + action { + action_type = "Octopus.Script" + properties = { + Octopus.Action.Script.ScriptBody = <<-EOT + #!/bin/sh + + echo "Hello from Release" + EOT + Octopus.Action.Script.ScriptSource = "Inline" + Octopus.Action.Script.Syntax = "Bash" + OctopusUseBundledTooling = "False" + } + worker_pool = "hosted-ubuntu" + } +} \ No newline at end of file From 75e39d8ffaa8770d6cdb4561e60fd405266bfd62 Mon Sep 17 00:00:00 2001 From: JT Date: Thu, 18 Dec 2025 23:38:48 +0000 Subject: [PATCH 28/37] Leverage existing docker tag/push step --- .../ubuntu.multi.arch/deployment_process.ocl | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.octopus/ubuntu.multi.arch/deployment_process.ocl b/.octopus/ubuntu.multi.arch/deployment_process.ocl index 01cda02..c14be41 100644 --- a/.octopus/ubuntu.multi.arch/deployment_process.ocl +++ b/.octopus/ubuntu.multi.arch/deployment_process.ocl @@ -15,4 +15,27 @@ step "run-a-script" { } worker_pool = "hosted-ubuntu" } +} + +step "push-docker-image" { + name = "Push Docker image" + + action { + environments = ["staging", "production"] + properties = { + DockerPush.Target.Docker.Registry.Hostname = "#{Docker.Registry.Target.Hostname}" + DockerPush.Target.Docker.Registry.Password = "#{Docker.Registry.Target.Password}" + DockerPush.Target.Docker.Registry.Username = "#{Docker.Registry.Target.Username}" + DockerPush.Target.Docker.Repository = "#{Docker.Registry.Target.Repository}" + Octopus.Action.Template.Id = "ActionTemplates-2141" + Octopus.Action.Template.Version = "12" + OctopusUseBundledTooling = "False" + } + worker_pool = "hosted-ubuntu" + + container { + feed = "docker-packages-octopushq" + image = "octopusdeploy/tool-containers/tool-skopeo-cli" + } + } } \ No newline at end of file From 674736f920aab8836cd3f5b644f7b5fb3c46aa57 Mon Sep 17 00:00:00 2001 From: JT Date: Fri, 19 Dec 2025 11:07:26 +1100 Subject: [PATCH 29/37] fix: lowercase PR build versioning for valid container names --- GitVersion.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GitVersion.yml b/GitVersion.yml index 2210324..d13acd6 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1 +1,5 @@ mode: ContinuousDeployment + +branches: + pull-request: + tag: pr From 707f03c6d184d65b3f246ba6955e463c80e5cff3 Mon Sep 17 00:00:00 2001 From: JT Date: Fri, 19 Dec 2025 11:09:22 +1100 Subject: [PATCH 30/37] change to pr- for better formatting --- GitVersion.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GitVersion.yml b/GitVersion.yml index d13acd6..cbd71cc 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -2,4 +2,4 @@ mode: ContinuousDeployment branches: pull-request: - tag: pr + tag: pr- From 05ec0c3a158061ed5ec48e1b8be65e503dd9d25b Mon Sep 17 00:00:00 2001 From: JT Date: Fri, 19 Dec 2025 13:00:19 +1100 Subject: [PATCH 31/37] Fix google and tool install + reinstate tests --- ubuntu.24.04/Dockerfile | 26 +-- ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 | 238 +++++++++++------------ 2 files changed, 122 insertions(+), 142 deletions(-) diff --git a/ubuntu.24.04/Dockerfile b/ubuntu.24.04/Dockerfile index 6b43ce8..c9daffe 100644 --- a/ubuntu.24.04/Dockerfile +++ b/ubuntu.24.04/Dockerfile @@ -145,22 +145,12 @@ RUN case "$TARGETPLATFORM" in \ rm terraform_${Terraform_Version}_linux_${TERRAFORM_ARCH}.zip # Install Google Cloud CLI - Architecture-specific recommended install method -# https://docs.cloud.google.com/sdk/docs/install-sdk -RUN case "$TARGETPLATFORM" in \ - "linux/amd64") GCLOUD_ARCH="x86_64" ;; \ - "linux/arm64") GCLOUD_ARCH="arm" ;; \ - *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ - esac && \ - curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg && \ +# https://docs.cloud.google.com/sdk/docs/install-sdk#deb +RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg && \ echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ - - - curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-${GCLOUD_ARCH}.tar.gz && \ - tar -xf google-cloud-cli-linux-${GCLOUD_ARCH}.tar.gz && \ - ./google-cloud-sdk/install.sh --quiet --usage-reporting false --path-update true && \ - ln -s /google-cloud-sdk/bin/gcloud /usr/local/bin/gcloud && \ - ln -s /google-cloud-sdk/bin/gsutil /usr/local/bin/gsutil && \ - rm google-cloud-cli-linux-${GCLOUD_ARCH}.tar.gz + apt-get update && apt-get install -y --no-install-recommends google-cloud-cli=${Google_Cloud_Cli_Version} google-cloud-cli-gke-gcloud-auth-plugin=${Google_Cloud_Gke_Cloud_Auth_Plugin_Version} && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* # Install pip & groff # Ubuntu 24.04 requires --break-system-packages due to PEP 668 @@ -233,9 +223,9 @@ RUN case "$TARGETPLATFORM" in \ "linux/arm64") AROG_ARCH="arm64" ;; \ *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ esac && \ -curl -sSL -o argocd-linux-${ARGO_ARCH} https://github.com/argoproj/argo-cd/releases/download/v${Argocd_Version}/argocd-linux-${ARGO_ARCH} && \ -install -m 555 argocd-linux-${ARGO_ARCH} /usr/local/bin/argocd && \ -rm argocd-linux-${ARGO_ARCH} + curl -sSL -o argocd-linux-${ARGO_ARCH} https://github.com/argoproj/argo-cd/releases/download/v${Argocd_Version}/argocd-linux-${ARGO_ARCH} && \ + install -m 555 argocd-linux-${ARGO_ARCH} /usr/local/bin/argocd && \ + rm argocd-linux-${ARGO_ARCH} # Get common utilities for scripting # https://mikefarah.gitbook.io/yq/ diff --git a/ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 b/ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 index d1ad6f1..9596aad 100644 --- a/ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 +++ b/ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 @@ -4,10 +4,10 @@ $pesterModules = @( Get-Module -Name "Pester"); Write-Host 'Running tests with Pester v'+$($pesterModules[0].Version) Describe 'installed dependencies' { - # It 'has Octopus.Client installed ' { - # $expectedVersion = "14.3.1789" - # [Reflection.AssemblyName]::GetAssemblyName("/Octopus.Client.dll").Version.ToString() | Should -match "$expectedVersion.0" - # } + It 'has Octopus.Client installed ' { + $expectedVersion = "14.3.1789" + [Reflection.AssemblyName]::GetAssemblyName("/Octopus.Client.dll").Version.ToString() | Should -match "$expectedVersion.0" + } It 'has dotnet installed' { dotnet --version | Should -match '8.0.\d+' @@ -19,125 +19,115 @@ Describe 'installed dependencies' { $LASTEXITCODE | Should -be 0 } - # It 'has aws powershell module installed' { - # (Get-Module AWSPowerShell.NetCore -ListAvailable).Version.ToString() | should -be '4.1.734' - # } - - # It 'has az installed' { - # $output = (& az version) | convertfrom-json - # $output.'azure-cli' | Should -be '2.67.0' - # $LASTEXITCODE | Should -be 0 - # } - - # It 'has az powershell module installed' { - # (Get-Module Az -ListAvailable).Version.ToString() | should -be '13.0.0' - # } - - # It 'has aws cli installed' { - # aws --version 2>&1 | Should -match '2.24.10' - # } - - # It 'has node installed' { - # node --version | Should -match '22.\d+.\d+' - # $LASTEXITCODE | Should -be 0 - # } - - # It 'has kubectl installed' { - # kubectl version --client | Select-Object -First 1 | Should -match '1.32.\d+' - # $LASTEXITCODE | Should -be 0 - # } - - # It 'has kubelogin installed' { - # kubelogin --version | Select-Object -First 1 -Skip 1 | Should -match 'v0.1.6' - # $LASTEXITCODE | Should -be 0 - # } - - # It 'has helm installed' { - # helm version | Should -match '3.16.4' - # $LASTEXITCODE | Should -be 0 - # } - - # # If the terraform version is not the latest, then `terraform version` returns multiple lines and a non-zero return code - # It 'has terraform installed' { - # terraform version | Select-Object -First 1 | Should -match '1.10.4' - # } - - # It 'has python3 installed' { - # python3 --version | Should -match '3.10.12' - # $LASTEXITCODE | Should -be 0 - # } - - # It 'has python2 installed' { - # # python 2 prints it's version to stderr, for some reason - # python --version 2>&1 | Should -match 'Python 2.7.18' - # $LASTEXITCODE | Should -be 0 - # } - - # It 'has gcloud installed' { - # gcloud --version | Select -First 1 | Should -be 'Google Cloud SDK 505.0.0' - # $LASTEXITCODE | Should -be 0 - # } + It 'has aws powershell module installed' { + (Get-Module AWSPowerShell.NetCore -ListAvailable).Version.ToString() | should -be '4.1.734' + } + + It 'has az installed' { + $output = (& az version) | convertfrom-json + $output.'azure-cli' | Should -be '2.67.0' + $LASTEXITCODE | Should -be 0 + } + + It 'has az powershell module installed' { + (Get-Module Az -ListAvailable).Version.ToString() | should -be '13.0.0' + } + + It 'has aws cli installed' { + aws --version 2>&1 | Should -match '2.24.10' + } + + It 'has node installed' { + node --version | Should -match '22.\d+.\d+' + $LASTEXITCODE | Should -be 0 + } + + It 'has kubectl installed' { + kubectl version --client | Select-Object -First 1 | Should -match '1.32.\d+' + $LASTEXITCODE | Should -be 0 + } + + It 'has kubelogin installed' { + kubelogin --version | Select-Object -First 1 -Skip 1 | Should -match 'v0.1.6' + $LASTEXITCODE | Should -be 0 + } + + It 'has helm installed' { + helm version | Should -match '3.16.4' + $LASTEXITCODE | Should -be 0 + } + + # If the terraform version is not the latest, then `terraform version` returns multiple lines and a non-zero return code + It 'has terraform installed' { + terraform version | Select-Object -First 1 | Should -match '1.10.4' + } + + It 'has python3 installed' { + python3 --version | Should -match '3.12.3' + $LASTEXITCODE | Should -be 0 + } + + It 'has gcloud installed' { + gcloud --version | Select -First 1 | Should -be 'Google Cloud SDK 550.0.0' + $LASTEXITCODE | Should -be 0 + } - # It 'has gke-gcloud-auth-plugin installed' { - # #We use belike here as the hash after the 'alpha+' changes and isn't that important - # gke-gcloud-auth-plugin --version | Select -First 1 | Should -beLike 'Kubernetes v1.28.2-alpha+*' - # $LASTEXITCODE | Should -be 0 - # } - - # It 'has octopus cli installed' { - # octopus version | Should -match '2.20.1' - # $LASTEXITCODE | Should -be 0 - # } - - # It 'has octo installed' { - # octo --version | Should -match '9.1.7' - # $LASTEXITCODE | Should -be 0 - # } - - # It 'has eksctl installed' { - # eksctl version | Should -match '0.200.0' - # $LASTEXITCODE | Should -be 0 - # } - - # It 'has ecs-cli installed' { - # ecs-cli --version | Should -match '1.21.0' - # $LASTEXITCODE | Should -be 0 - # } - - # It 'has mvn installed' { - # mvn --version | out-null - # $LASTEXITCODE | Should -be 0 - # } - - # It 'has gradle installed' { - # gradle --version | out-null - # $LASTEXITCODE | Should -be 0 - # } - - # It 'has aws-iam-authenticator installed' { - # aws-iam-authenticator version | out-null - # $LASTEXITCODE | Should -be 0 - # } - - # It 'has istioctl installed' { - # istioctl version --remote=false | out-null - # $LASTEXITCODE | Should -be 0 - # } - - # It 'has linkerd installed' { - # linkerd version --client | out-null - # $LASTEXITCODE | Should -be 0 - # } - - # It 'should have installed powershell core' { - # $output = & pwsh --version - # $LASTEXITCODE | Should -be 0 - # $output | Should -match '^PowerShell 7\.4\.6*' - # } - - # It 'should have installed argo cli' { - # $output = (& argocd version --client) -join "`n" - # $LASTEXITCODE | Should -be 0 - # $output | Should -Match '2.13.3' - # } + It 'has gke-gcloud-auth-plugin installed' { + #We use belike here as the hash after the 'alpha+' changes and isn't that important + gke-gcloud-auth-plugin --version | Select -First 1 | Should -beLike 'Kubernetes v1.28.2-alpha+*' + $LASTEXITCODE | Should -be 0 + } + + It 'has octopus cli installed' { + octopus version | Should -match '2.20.1' + $LASTEXITCODE | Should -be 0 + } + + + It 'has eksctl installed' { + eksctl version | Should -match '0.220.0' + $LASTEXITCODE | Should -be 0 + } + + It 'has ecs-cli installed' { + ecs-cli --version | Should -match '1.21.0' + $LASTEXITCODE | Should -be 0 + } + + It 'has mvn installed' { + mvn --version | out-null + $LASTEXITCODE | Should -be 0 + } + + It 'has gradle installed' { + gradle --version | out-null + $LASTEXITCODE | Should -be 0 + } + + It 'has aws-iam-authenticator installed' { + aws-iam-authenticator version | out-null + $LASTEXITCODE | Should -be 0 + } + + It 'has istioctl installed' { + istioctl version --remote=false | out-null + $LASTEXITCODE | Should -be 0 + } + + It 'has linkerd installed' { + linkerd version --client | out-null + $LASTEXITCODE | Should -be 0 + } + + It 'should have installed powershell core' { + $output = & pwsh --version + $LASTEXITCODE | Should -be 0 + $output | Should -match '^PowerShell 7\.5\.4*' + } + + It 'should have installed argo cli' { + $output = (& argocd version --client) -join "`n" + $LASTEXITCODE | Should -be 0 + $output | Should -Match '2.14.21' + } } From 787b1a31a016878456439bc52c4f927825dcc50c Mon Sep 17 00:00:00 2001 From: JT Date: Fri, 19 Dec 2025 13:45:30 +1100 Subject: [PATCH 32/37] Fix argocd in arm64 and Linkerd --- ubuntu.24.04/Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ubuntu.24.04/Dockerfile b/ubuntu.24.04/Dockerfile index c9daffe..91eeb9e 100644 --- a/ubuntu.24.04/Dockerfile +++ b/ubuntu.24.04/Dockerfile @@ -212,15 +212,16 @@ RUN curl -sL https://istio.io/downloadIstioctl | sh - && \ rm -rf /root/.istioctl # Install Linkerd CLI -# https://linkerd.io/2-edge/getting-started/ -RUN curl --proto '=https' --tlsv1.2 -sSfL https://run.linkerd.io/install-edge | sh && \ - export PATH=$HOME/.linkerd2/bin:$PATH +# https://linkerd.io/2/getting-started/ +RUN curl --proto '=https' --tlsv1.2 -sSfL https://run.linkerd.io/install-edge | sh +ENV LINKERD_HOME=/root/.linkerd2 +ENV PATH="${LINKERD_HOME}/bin:${PATH}" # Install Argo CD RUN case "$TARGETPLATFORM" in \ "linux/amd64") ARGO_ARCH="amd64" ;; \ - "linux/arm64") AROG_ARCH="arm64" ;; \ + "linux/arm64") ARGO_ARCH="arm64" ;; \ *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ esac && \ curl -sSL -o argocd-linux-${ARGO_ARCH} https://github.com/argoproj/argo-cd/releases/download/v${Argocd_Version}/argocd-linux-${ARGO_ARCH} && \ From 85d2a8b24863f96a8a5adf0e4cc8be34eabe3e04 Mon Sep 17 00:00:00 2001 From: JT Date: Fri, 19 Dec 2025 13:45:43 +1100 Subject: [PATCH 33/37] test: fix GKE Auth test --- ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 b/ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 index 9596aad..af2a6c8 100644 --- a/ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 +++ b/ubuntu.24.04/spec/ubuntu.24.04.tests.ps1 @@ -74,7 +74,7 @@ Describe 'installed dependencies' { It 'has gke-gcloud-auth-plugin installed' { #We use belike here as the hash after the 'alpha+' changes and isn't that important - gke-gcloud-auth-plugin --version | Select -First 1 | Should -beLike 'Kubernetes v1.28.2-alpha+*' + gke-gcloud-auth-plugin --version | Select -First 1 | Should -beLike 'Kubernetes v1.30.0*' $LASTEXITCODE | Should -be 0 } From c5d2f02bd8636d2216f633e20766d23137835021 Mon Sep 17 00:00:00 2001 From: JT Date: Fri, 19 Dec 2025 14:14:15 +1100 Subject: [PATCH 34/37] Remove 'run a script' placeholder step --- .../ubuntu.multi.arch/deployment_process.ocl | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/.octopus/ubuntu.multi.arch/deployment_process.ocl b/.octopus/ubuntu.multi.arch/deployment_process.ocl index c14be41..7516629 100644 --- a/.octopus/ubuntu.multi.arch/deployment_process.ocl +++ b/.octopus/ubuntu.multi.arch/deployment_process.ocl @@ -1,22 +1,3 @@ -step "run-a-script" { - name = "Run a Script" - - action { - action_type = "Octopus.Script" - properties = { - Octopus.Action.Script.ScriptBody = <<-EOT - #!/bin/sh - - echo "Hello from Release" - EOT - Octopus.Action.Script.ScriptSource = "Inline" - Octopus.Action.Script.Syntax = "Bash" - OctopusUseBundledTooling = "False" - } - worker_pool = "hosted-ubuntu" - } -} - step "push-docker-image" { name = "Push Docker image" @@ -38,4 +19,4 @@ step "push-docker-image" { image = "octopusdeploy/tool-containers/tool-skopeo-cli" } } -} \ No newline at end of file +} From 6c07628a6c5a12364bc5e0b414f458478721d01e Mon Sep 17 00:00:00 2001 From: JT Date: Fri, 19 Dec 2025 03:37:33 +0000 Subject: [PATCH 35/37] Add tag to show pre-release status for prod --- .octopus/ubuntu.multi.arch/variables.ocl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.octopus/ubuntu.multi.arch/variables.ocl b/.octopus/ubuntu.multi.arch/variables.ocl index 49d3b9c..5cdcecc 100644 --- a/.octopus/ubuntu.multi.arch/variables.ocl +++ b/.octopus/ubuntu.multi.arch/variables.ocl @@ -61,4 +61,14 @@ variable "Docker.Registry.Target.Password" { value "#{OctopusDockerRegistry.Password}" { environment = ["staging"] } +} + +variable "WorkerTools.Tags.Prerelease" { + value "-beta" { + environment = ["production"] + } + + value { + environment = ["staging"] + } } \ No newline at end of file From 8cfded614cecd2e3b25b9808f9b3291b9492bfd9 Mon Sep 17 00:00:00 2001 From: JT Date: Fri, 19 Dec 2025 03:47:03 +0000 Subject: [PATCH 36/37] Update deployment process to include pre-release tag --- .../ubuntu.multi.arch/deployment_process.ocl | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/.octopus/ubuntu.multi.arch/deployment_process.ocl b/.octopus/ubuntu.multi.arch/deployment_process.ocl index 7516629..c35c918 100644 --- a/.octopus/ubuntu.multi.arch/deployment_process.ocl +++ b/.octopus/ubuntu.multi.arch/deployment_process.ocl @@ -20,3 +20,77 @@ step "push-docker-image" { } } } + +step "tag-and-re-push-docker-image" { + name = "Tag and Re-push Docker Image" + + action { + action_type = "Octopus.Script" + environments = ["staging", "production"] + properties = { + Octopus.Action.Script.ScriptBody = <<-EOT + #!/bin/bash + echo "##octopus[stderr-progress]" + set -eux + + sourceHostName=$(get_octopusvariable "OctopusDockerRegistry.Hostname") + targetHostName=$(get_octopusvariable "Docker.Registry.Target.Hostname") + + echo "Source Registry Name: $sourceHostName" + echo "Target Registry Name: $targetHostName" + + retry --times=3 --delay=5 -- skopeo login -u $(get_octopusvariable "OctopusDockerRegistry.Username") -p $(get_octopusvariable "OctopusDockerRegistry.Password") $sourceHostName + retry --times=3 --delay=5 -- skopeo login -u $(get_octopusvariable "Docker.Registry.Target.Username") -p $(get_octopusvariable "Docker.Registry.Target.Password") $targetHostName + + repositoryTagsJson=$(retry --times=3 --delay=5 -- skopeo list-tags docker://$(get_octopusvariable "OctopusDockerRegistry.WorkerTools.Repository")) + + # Up to here + osSuffix=$(get_octopusvariable "WorkerTools.Tags.Os") + fullyQualifiedTag=$(get_octopusvariable "WorkerTools.Version.Full")-${osSuffix} + + semVerRegex="[0-9]+\.[0-9]+\.[0-9]+\-.*" + if ! [[ $fullyQualifiedTag =~ $semVerRegex ]]; then + echo "The tag $fullyQualifiedTag should be a fully qualified SemVer tag" + exit 1 + fi + + matchingSourceTag=$(jq -r --arg fullyQualifiedTag "$fullyQualifiedTag" '.Tags[] | select(.==$fullyQualifiedTag)' <<<"$repositoryTagsJson") + + if [ "$fullyQualifiedTag" != "$matchingSourceTag" ]; then + echo "The tag $fullyQualifiedTag could not be found in $sourceHostName" + exit 1 + fi + + # We apply a pre-release tag for now if pushing to public repo + prereleaseTag=$(get_octopusvariable "WorkerTools.Tags.Prerelease") + latestTag=${osSuffix} + latestMajorTag=$(get_octopusvariable "WorkerTools.Version.Major")-${osSuffix} + latestMinorTag=$(get_octopusvariable "WorkerTools.Version.MajorMinor")-${osSuffix} + + echo "Image tag for promotion: $fullyQualifiedTag" + + if [ "$sourceHostName" != "$targetHostName" ]; then + echo "Pushing $fullyQualifiedTag tag to target registry" + retry --times=6 --delay=10 -- skopeo copy --all docker://$(get_octopusvariable "OctopusDockerRegistry.WorkerTools.Repository"):$fullyQualifiedTag docker://$(get_octopusvariable "Docker.Registry.Target.Repository"):$fullyQualifiedTag + fi + + echo "Pushing floating tags to target registry:" + echo $latestMajorTag + echo $latestMinorTag + echo $latestTag + retry --times=6 --delay=10 -- skopeo copy --all docker://$(get_octopusvariable "OctopusDockerRegistry.WorkerTools.Repository"):$fullyQualifiedTag docker://$(get_octopusvariable "Docker.Registry.Target.Repository"):$latestMajorTag + retry --times=6 --delay=10 -- skopeo copy --all docker://$(get_octopusvariable "OctopusDockerRegistry.WorkerTools.Repository"):$fullyQualifiedTag docker://$(get_octopusvariable "Docker.Registry.Target.Repository"):$latestMinorTag + retry --times=6 --delay=10 -- skopeo copy --all docker://$(get_octopusvariable "OctopusDockerRegistry.WorkerTools.Repository"):$fullyQualifiedTag docker://$(get_octopusvariable "Docker.Registry.Target.Repository"):$latestTag + EOT + Octopus.Action.Script.ScriptSource = "Inline" + Octopus.Action.Script.Syntax = "Bash" + OctopusUseBundledTooling = "False" + } + worker_pool = "hosted-ubuntu" + + container { + feed = "docker-packages-octopushq" + image = "octopusdeploy/tool-containers/tool-skopeo-cli" + } + } +} \ No newline at end of file From f9e100a7478f66e3976323ee74f9b205b40615a1 Mon Sep 17 00:00:00 2001 From: JT Date: Fri, 19 Dec 2025 03:47:19 +0000 Subject: [PATCH 37/37] disable step template --- .octopus/ubuntu.multi.arch/deployment_process.ocl | 1 + 1 file changed, 1 insertion(+) diff --git a/.octopus/ubuntu.multi.arch/deployment_process.ocl b/.octopus/ubuntu.multi.arch/deployment_process.ocl index c35c918..6540df5 100644 --- a/.octopus/ubuntu.multi.arch/deployment_process.ocl +++ b/.octopus/ubuntu.multi.arch/deployment_process.ocl @@ -3,6 +3,7 @@ step "push-docker-image" { action { environments = ["staging", "production"] + is_disabled = true properties = { DockerPush.Target.Docker.Registry.Hostname = "#{Docker.Registry.Target.Hostname}" DockerPush.Target.Docker.Registry.Password = "#{Docker.Registry.Target.Password}"