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
90 changes: 90 additions & 0 deletions .github/workflows/agentApmTests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Agent APM Tests
on:
workflow_call:
workflow_dispatch:

jobs:
Agent-APM-Tests:
name: agent-apm ${{ matrix.os.name }}
strategy:
fail-fast: false
matrix:
os:
- name: ubuntu
version: 24.04
- name: windows
version: 2022
- name: macos
version: 14
runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }}
steps:
- name: Skip macOS - JGC-413
if: matrix.os.name == 'macos'
run: |
echo "::warning::JGC-413 - Skip until artifactory bootstrap in osx is fixed"
exit 0

- name: Checkout code
if: matrix.os.name != 'macos'
uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
allow-unsafe-pr-checkout: true

- name: Setup FastCI
if: matrix.os.name != 'macos'
uses: jfrog-fastci/fastci@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fastci_otel_token: ${{ secrets.FASTCI_TOKEN }}

- name: Setup Go with cache
if: matrix.os.name != 'macos'
uses: jfrog/.github/actions/install-go-with-cache@main

# install.sh only supports Darwin and Linux, so Windows uses install.ps1.
- name: Install APM CLI
if: matrix.os.name != 'macos' && matrix.os.name != 'windows'
shell: bash
run: |
set -euo pipefail
# Install Microsoft APM CLI (>= 0.1.0) required by jf agent apm.
if ! command -v apm >/dev/null 2>&1; then
curl -fsSL https://raw.githubusercontent.com/microsoft/apm/main/install.sh | bash
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "$HOME/bin" >> "$GITHUB_PATH"
fi

- name: Install APM CLI on Windows
if: matrix.os.name == 'windows'
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$installRoot = Join-Path $env:LOCALAPPDATA 'Programs\apm'
$binDir = Join-Path $installRoot 'bin'
$env:APM_INSTALL_DIR = $binDir
Invoke-RestMethod https://raw.githubusercontent.com/microsoft/apm/main/install.ps1 | Invoke-Expression
# The shim lives in bin; apm.exe lives in current. Expose both so
# lookups succeed with and without PATHEXT resolution.
$binDir | Out-File -FilePath $env:GITHUB_PATH -Append -Encoding utf8
Join-Path $installRoot 'current' | Out-File -FilePath $env:GITHUB_PATH -Append -Encoding utf8

# PATH additions only apply to later steps, so verify here.
- name: Verify APM CLI
if: matrix.os.name != 'macos'
shell: bash
run: apm --version

- name: Install local Artifactory
if: matrix.os.name != 'macos'
uses: jfrog/.github/actions/install-local-artifactory@main
with:
RTLIC: ${{ secrets.RTLIC }}
# No VERSION pin: releases.jfrog.io keeps only a subset of patch
# releases, so pinning breaks once that version is pruned. Latest
# supports agentpackages repositories.
RT_CONNECTION_TIMEOUT_SECONDS: ${{ env.RT_CONNECTION_TIMEOUT_SECONDS || '1200' }}

- name: Run agent APM tests
if: matrix.os.name != 'macos'
run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.agentApm
5 changes: 5 additions & 0 deletions .github/workflows/build-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ jobs:
needs: gate
uses: ./.github/workflows/agentPluginsTests.yml
secrets: inherit
agent-apm:
needs: gate
uses: ./.github/workflows/agentApmTests.yml
secrets: inherit
access:
needs: gate
# OIDC suite: caller must grant id-token so the reusable workflow can request it.
Expand Down Expand Up @@ -173,6 +177,7 @@ jobs:
- gate
- frogbot
- agent-plugins
- agent-apm
- access
- artifactory
- conan
Expand Down
Loading
Loading