-
Notifications
You must be signed in to change notification settings - Fork 18
ci: enable Copilot cloud agent on 1ES #791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Brian Telfer (Britel)
wants to merge
16
commits into
main
Choose a base branch
from
user/britel/cloud-agent-runner-smoke
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+117
−0
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
a4efa4a
ci: add cloud agent runner smoke probe
Britel 3766567
ci: target Trident cloud agent runner pool
Britel 1266b3f
ci: retrigger runner smoke after pool onboarding
Britel 56ed413
ci: use complete 1ES runner job identifier
Britel fe5aad6
ci: use 1ES scale-set runner integration
Britel 19f0448
ci: bootstrap Copilot cloud agent
Britel 00542f1
ci: make cloud agent setup executable
Britel d28ed4b
ci: keep runner validation manual
Britel 16580ab
ci: harden cloud agent validation
Britel 084e14f
ci: complete cloud agent prerequisites
Britel 4096aad
ci: validate runner access without sudo
Britel f475b3a
ci: preserve primary smoke failures
Britel abe5be8
ci: make host validation diagnostic
Britel 08ddc6b
ci: validate runner libvirt access
Britel 97f3fc7
ci: preserve Trident build paths
Britel d73e08a
ci: remove temporary runner smoke harness
Britel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| scripts/cloud-agent/*.sh text eol=lf | ||
| .github/workflows/copilot-setup-steps.yml text eol=lf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: Copilot Setup Steps | ||
|
|
||
| permissions: {} | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - .github/workflows/copilot-setup-steps.yml | ||
| - scripts/cloud-agent/setup.sh | ||
|
|
||
| jobs: | ||
| # This job name is required by GitHub Copilot coding agent. | ||
| copilot-setup-steps: | ||
| runs-on: trident-github-runner-ubuntu2204-amd64 | ||
| timeout-minutes: 59 | ||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | ||
| with: | ||
| go-version: "1.25.x" | ||
| cache: false | ||
|
|
||
| - name: Set up Trident dependencies | ||
| run: scripts/cloud-agent/setup.sh | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -euxo pipefail | ||
|
|
||
| readonly RUST_TOOLCHAIN="1.93.0" | ||
| readonly PROTOC_VERSION="33.2" | ||
| readonly PROTOC_SHA256="b24b53f87c151bfd48b112fe4c3a6e6574e5198874f38036aff41df3456b8caf" | ||
| readonly PROTOC_GEN_GO_VERSION="v1.36.11" | ||
| readonly PROTOC_GEN_GO_GRPC_VERSION="v1.6.2" | ||
| readonly DATA_DISK_MOUNT="/mnt/storage" | ||
| readonly CARGO_TARGET_PATH="$DATA_DISK_MOUNT/trident-cloud-agent/cargo-target" | ||
|
|
||
| sudo mkdir -p /etc/apt/apt.conf.d | ||
| echo 'DPkg::Lock::Timeout "600";' | sudo tee /etc/apt/apt.conf.d/99lock-timeout | ||
|
|
||
| sudo apt-get update | ||
| sudo apt-get install -y --no-install-recommends \ | ||
| build-essential \ | ||
| ca-certificates \ | ||
| clang \ | ||
| curl \ | ||
| libclang-dev \ | ||
| libssl-dev \ | ||
| pkg-config \ | ||
| unzip | ||
|
|
||
| protoc_archive="protoc-${PROTOC_VERSION}-linux-x86_64.zip" | ||
| curl --fail --location --retry 3 \ | ||
| --output "$RUNNER_TEMP/$protoc_archive" \ | ||
| "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/${protoc_archive}" | ||
| echo "$PROTOC_SHA256 $RUNNER_TEMP/$protoc_archive" | sha256sum --check | ||
| sudo unzip -o "$RUNNER_TEMP/$protoc_archive" -d /usr/local | ||
| rm -f "$RUNNER_TEMP/$protoc_archive" | ||
|
|
||
| go_bin_dir="$(go env GOPATH)/bin" | ||
| export PATH="$go_bin_dir:$PATH" | ||
| echo "$go_bin_dir" >> "$GITHUB_PATH" | ||
| go install "google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOC_GEN_GO_VERSION}" | ||
| go install "google.golang.org/grpc/cmd/protoc-gen-go-grpc@${PROTOC_GEN_GO_GRPC_VERSION}" | ||
|
|
||
| if ! command -v rustup >/dev/null 2>&1; then | ||
| echo "The Trident runner image must provide rustup" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| export PATH="$HOME/.cargo/bin:$PATH" | ||
| echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" | ||
|
|
||
| rustup toolchain install "$RUST_TOOLCHAIN" \ | ||
| --profile minimal \ | ||
| --component clippy,rustfmt | ||
| rustup default "$RUST_TOOLCHAIN" | ||
|
|
||
| if ! mountpoint --quiet "$DATA_DISK_MOUNT"; then | ||
| echo "Expected runner data disk is not mounted at $DATA_DISK_MOUNT" >&2 | ||
| exit 1 | ||
| fi | ||
| findmnt --mountpoint "$DATA_DISK_MOUNT" | ||
|
|
||
| sudo install -d -o "$(id -u)" -g "$(id -g)" "$CARGO_TARGET_PATH" | ||
|
|
||
| make .cargo/config | ||
| if [[ -e target && ! -L target ]]; then | ||
| if [[ ! -d target || -n "$(find target -mindepth 1 -maxdepth 1 -print -quit)" ]]; then | ||
| echo "Refusing to replace existing non-empty target path" >&2 | ||
| exit 1 | ||
| fi | ||
| rmdir target | ||
| fi | ||
| ln -sfn "$CARGO_TARGET_PATH" target | ||
| test "$(readlink -f target)" = "$CARGO_TARGET_PATH" | ||
|
|
||
| cargo fetch --locked | ||
|
|
||
| rustc --version | ||
| cargo --version | ||
| go version | ||
| protoc --version | ||
| protoc-gen-go --version | ||
| protoc-gen-go-grpc --version |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.