diff --git a/src/compile/common.rs b/src/compile/common.rs index 90bd00d..dae4c17 100644 --- a/src/compile/common.rs +++ b/src/compile/common.rs @@ -460,6 +460,16 @@ pub const DEFAULT_POOL: &str = "AZS-1ES-L-MMS-ubuntu-22.04"; /// See: https://github.com/github/gh-aw-firewall/releases pub const AWF_VERSION: &str = "0.23.1"; +/// Version of the GitHub Copilot CLI (Microsoft.Copilot.CLI.linux-x64) NuGet package to install. +/// Update this when upgrading to a new Copilot CLI release. +/// See: https://pkgs.dev.azure.com/msazuresphere/_packaging/Guardian1ESPTUpstreamOrgFeed/nuget/v3/index.json +pub const COPILOT_CLI_VERSION: &str = "1.0.6"; + +/// Version of the Agency CLI (agency.linux-x64) NuGet package to install in 1ES pipelines. +/// Update this when upgrading to a new Agency CLI release. +/// See: https://pkgs.dev.azure.com/msazuresphere/_packaging/Guardian1ESPTUpstreamOrgFeed/nuget/v3/index.json +pub const AGENCY_CLI_VERSION: &str = "2026.1.22.4"; + /// Generate source path for the execute command. /// /// Returns a path using `{{ workspace }}` as the base, which gets resolved diff --git a/src/compile/onees.rs b/src/compile/onees.rs index 6d9bd43..14b2023 100644 --- a/src/compile/onees.rs +++ b/src/compile/onees.rs @@ -17,7 +17,7 @@ use std::path::Path; use super::Compiler; use super::common::{ - self, AWF_VERSION, DEFAULT_POOL, compute_effective_workspace, generate_copilot_params, + self, AGENCY_CLI_VERSION, AWF_VERSION, DEFAULT_POOL, compute_effective_workspace, generate_copilot_params, generate_acquire_ado_token, generate_checkout_self, generate_checkout_steps, generate_ci_trigger, generate_copilot_ado_env, generate_executor_ado_env, generate_pipeline_path, generate_pipeline_resources, generate_pr_trigger, @@ -139,6 +139,7 @@ displayName: "Finalize""#, ("{{ compiler_version }}", compiler_version), // No-op for 1ES (template doesn't use AWF), but included for forward-compatibility ("{{ firewall_version }}", AWF_VERSION), + ("{{ agency_version }}", AGENCY_CLI_VERSION), ("{{ pool }}", &pool), ("{{ schedule }}", &schedule), ("{{ pr_trigger }}", &pr_trigger), diff --git a/src/compile/standalone.rs b/src/compile/standalone.rs index 3d46bea..21deed7 100644 --- a/src/compile/standalone.rs +++ b/src/compile/standalone.rs @@ -14,7 +14,7 @@ use std::path::Path; use super::Compiler; use super::common::{ - self, AWF_VERSION, DEFAULT_POOL, compute_effective_workspace, generate_copilot_params, + self, AWF_VERSION, COPILOT_CLI_VERSION, DEFAULT_POOL, compute_effective_workspace, generate_copilot_params, generate_acquire_ado_token, generate_cancel_previous_builds, generate_checkout_self, generate_checkout_steps, generate_ci_trigger, generate_copilot_ado_env, generate_executor_ado_env, generate_pipeline_path, generate_pipeline_resources, @@ -140,6 +140,7 @@ impl Compiler for StandaloneCompiler { let replacements: Vec<(&str, &str)> = vec![ ("{{ compiler_version }}", compiler_version), ("{{ firewall_version }}", AWF_VERSION), + ("{{ copilot_version }}", COPILOT_CLI_VERSION), ("{{ pool }}", &pool), ("{{ setup_job }}", &setup_job), ("{{ teardown_job }}", &teardown_job), diff --git a/templates/1es-base.yml b/templates/1es-base.yml index 4dad52e..1d8543a 100644 --- a/templates/1es-base.yml +++ b/templates/1es-base.yml @@ -162,7 +162,7 @@ extends: displayName: "Install Agency CLI" inputs: command: 'custom' - arguments: 'install agency.linux-x64 -Source "https://pkgs.dev.azure.com/msazuresphere/_packaging/Guardian1ESPTUpstreamOrgFeed/nuget/v3/index.json" -Version 2026.1.22.4 -OutputDirectory $(Agent.TempDirectory)/tools -ExcludeVersion -NonInteractive' + arguments: 'install agency.linux-x64 -Source "https://pkgs.dev.azure.com/msazuresphere/_packaging/Guardian1ESPTUpstreamOrgFeed/nuget/v3/index.json" -Version {{ agency_version }} -OutputDirectory $(Agent.TempDirectory)/tools -ExcludeVersion -NonInteractive' - bash: | ls -la "$(Agent.TempDirectory)/tools" diff --git a/templates/base.yml b/templates/base.yml index 0852b60..42c7dce 100644 --- a/templates/base.yml +++ b/templates/base.yml @@ -34,7 +34,7 @@ jobs: displayName: "Install Copilot CLI" inputs: command: 'custom' - arguments: 'install Microsoft.Copilot.CLI.linux-x64 -Source "https://pkgs.dev.azure.com/msazuresphere/_packaging/Guardian1ESPTUpstreamOrgFeed/nuget/v3/index.json" -Version 0.0.407 -OutputDirectory $(Agent.TempDirectory)/tools -ExcludeVersion -NonInteractive' + arguments: 'install Microsoft.Copilot.CLI.linux-x64 -Source "https://pkgs.dev.azure.com/msazuresphere/_packaging/Guardian1ESPTUpstreamOrgFeed/nuget/v3/index.json" -Version {{ copilot_version }} -OutputDirectory $(Agent.TempDirectory)/tools -ExcludeVersion -NonInteractive' - bash: | ls -la "$(Agent.TempDirectory)/tools" @@ -295,7 +295,7 @@ jobs: displayName: "Install Copilot CLI" inputs: command: 'custom' - arguments: 'install Microsoft.Copilot.CLI.linux-x64 -Source "https://pkgs.dev.azure.com/msazuresphere/_packaging/Guardian1ESPTUpstreamOrgFeed/nuget/v3/index.json" -Version 0.0.407 -OutputDirectory $(Agent.TempDirectory)/tools -ExcludeVersion -NonInteractive' + arguments: 'install Microsoft.Copilot.CLI.linux-x64 -Source "https://pkgs.dev.azure.com/msazuresphere/_packaging/Guardian1ESPTUpstreamOrgFeed/nuget/v3/index.json" -Version {{ copilot_version }} -OutputDirectory $(Agent.TempDirectory)/tools -ExcludeVersion -NonInteractive' - bash: | ls -la "$(Agent.TempDirectory)/tools"