Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions images/ubuntu/scripts/build/install-copilot-cli.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash -e
################################################################################
## File: install-copilot-cli.sh
## Desc: Install the GitHub Copilot CLI
## Supply chain security: GitHub Copilot CLI - checksum validation (implemented inside installation script)
################################################################################

# Install GitHub Copilot CLI (Instruction taken from https://github.com/github/copilot-cli)
curl -fsSL https://gh.io/copilot-install | bash

invoke_tests "CLI.Tools" "Github Copilot CLI"
1 change: 1 addition & 0 deletions images/ubuntu/scripts/docs-gen/Generate-SoftwareReport.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ if (Test-IsUbuntu22) {
$cliTools.AddToolVersion("ORAS CLI", $(Get-ORASCliVersion))
$cliTools.AddToolVersion("Vercel CLI", $(Get-VerselCliversion))
}
$cliTools.AddToolVersion("Github Copilot CLI", $(Get-GithubCopilotCliVersion))

# Java
$installedSoftware.AddHeader("Java").AddTable($(Get-JavaVersionsTable))
Expand Down
5 changes: 5 additions & 0 deletions images/ubuntu/scripts/docs-gen/SoftwareReport.Tools.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,8 @@ function Get-YqVersion {
$yqVersion = $(yq -V) | Get-StringPart -Part 3
return $yqVersion.TrimStart("v").Trim()
}

function Get-GithubCopilotCliVersion {
$copilotVersion = copilot --version | Get-StringPart -Part 3
return "$copilotVersion".TrimEnd(".")
}
6 changes: 6 additions & 0 deletions images/ubuntu/scripts/tests/CLI.Tools.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,9 @@ Describe "Oras CLI" -Skip:((-not (Test-IsUbuntu22))) {
"oras version" | Should -ReturnZeroExitCode
}
}

Describe "Github Copilot CLI" {
It "Github Copilot CLI" {
"copilot --version" | Should -ReturnZeroExitCode
}
}
3 changes: 2 additions & 1 deletion images/ubuntu/templates/build.ubuntu-22_04.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ build {
"${path.root}/../scripts/build/install-pypy.sh",
"${path.root}/../scripts/build/install-python.sh",
"${path.root}/../scripts/build/install-zstd.sh",
"${path.root}/../scripts/build/install-ninja.sh"
"${path.root}/../scripts/build/install-ninja.sh",
"${path.root}/../scripts/build/install-copilot-cli.sh"
]
}

Expand Down
3 changes: 2 additions & 1 deletion images/ubuntu/templates/build.ubuntu-24_04.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ provisioner "shell" {
"${path.root}/../scripts/build/install-pypy.sh",
"${path.root}/../scripts/build/install-python.sh",
"${path.root}/../scripts/build/install-zstd.sh",
"${path.root}/../scripts/build/install-ninja.sh"
"${path.root}/../scripts/build/install-ninja.sh",
"${path.root}/../scripts/build/install-copilot-cli.sh"
]
}

Expand Down