Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
e4edb2d
RTECO-1564 - Add apt command support for JFrog Artifactory
fluxxBot Jul 9, 2026
cde607e
RTECO-1564 - Update aptTests.yml and dependency versions for JFrog Ar…
fluxxBot Jul 9, 2026
f6088e9
RTECO-1564 - Add polling step to wait for Artifactory readiness in ap…
fluxxBot Jul 9, 2026
7cab244
RTECO-1564 - Update jfrog-cli-artifactory dependency to v0.8.1-0.2026…
fluxxBot Jul 9, 2026
246aae8
RTECO-1564 - Enhance apt tests by ensuring preference files are remov…
fluxxBot Jul 9, 2026
0c695d0
RTECO-1564 - Improve Artifactory readiness check in apt tests by requ…
fluxxBot Jul 9, 2026
c968a9d
RTECO-1564 - Add Debian remote repository configuration and update ap…
fluxxBot Jul 9, 2026
8e9765a
RTECO-1564 - Update jfrog-cli-artifactory dependency to v0.8.1-0.2026…
fluxxBot Jul 9, 2026
0aa6746
RTECO-1564 - Increase apt test concurrency limit to 4 and add dynamic…
fluxxBot Jul 10, 2026
646ad42
RTECO-1564 - Increase apt test concurrency to 5 and add support for D…
fluxxBot Jul 10, 2026
a043c01
RTECO-1564 - Refactor apt tests to install bzip2 instead of curl and …
fluxxBot Jul 10, 2026
a3d6b43
RTECO-1564 - Reduce apt test concurrency limit from 5 to 4 to prevent…
fluxxBot Jul 10, 2026
7731c7b
RTECO-1564 - Refactor apt test workflow to improve user mode handling…
fluxxBot Jul 10, 2026
cb73af5
RTECO-1564 - Enhance apt install command with --allow-downgrades opti…
fluxxBot Jul 10, 2026
bb4f627
RTECO-1564 - Refactor apt import key test to ensure end-to-end signat…
fluxxBot Jul 10, 2026
bb3314d
RTECO-1564 - Enhance apt command descriptions to include detailed usa…
fluxxBot Jul 10, 2026
54e8131
RTECO-1564 - Trigger Debian reindex in apt import-key test
fluxxBot Jul 10, 2026
2eb4793
RTECO-1564 - Refactor apt import key test to use remote Debian repo a…
fluxxBot Jul 10, 2026
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
102 changes: 102 additions & 0 deletions .github/workflows/aptTests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: apt Tests

on:
push:
branches: [RTECO-1564]
workflow_call:
workflow_dispatch:

jobs:
apt-Tests:
name: apt tests (${{ matrix.distro.name }}, ${{ matrix.user_mode }})
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
distro:
- image: ubuntu:20.04
name: ubuntu-focal
dist: focal
- image: ubuntu:22.04
name: ubuntu-jammy
dist: jammy
- image: ubuntu:24.04
name: ubuntu-noble
dist: noble
- image: debian:11
name: debian-bullseye
dist: bullseye
- image: debian:12
name: debian-bookworm
dist: bookworm
- image: debian:13
name: debian-trixie
dist: trixie
user_mode:
- root
- nonroot

steps:
- name: Checkout code
uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Setup FastCI
uses: jfrog-fastci/fastci@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fastci_otel_token: ${{ secrets.FASTCI_TOKEN }}

- name: Setup Go with cache
uses: jfrog/.github/actions/install-go-with-cache@main

# Runs on the host runner, not inside a distro container - stable, no OOM.
- name: Install local Artifactory
uses: jfrog/.github/actions/install-local-artifactory@main
with:
RTLIC: ${{ secrets.RTLIC }}
RT_CONNECTION_TIMEOUT_SECONDS: '1200'

# Compiled once on the host, then bind-mounted into every distro container below.
# CGO_ENABLED=0 keeps the binary statically linked so it runs unchanged across
# glibc versions from Ubuntu 20.04 through Debian 13.
- name: Compile apt test binary
run: go test -c -o apt.test .
env:
CGO_ENABLED: "0"

# --network host puts the container on the runner's network namespace, so
# localhost:8081 inside the container reaches the Artifactory started above.
# exec.Command("apt-get", ...) and /etc/apt/, /var/log/apt/ inside apt.test
# all hit this container's native environment, not the host's.
- name: Run apt tests (${{ matrix.distro.image }}, ${{ matrix.user_mode }})
run: |
docker run --rm --network host \
-v "$GITHUB_WORKSPACE:/workspace" \
-w /workspace \
-e JFROG_TESTS_LOCAL_ACCESS_TOKEN \
-e APT_TEST_DIST="${{ matrix.distro.dist }}" \
-e USER_MODE="${{ matrix.user_mode }}" \
-e CI_RUN_ID="${{ matrix.distro.name }}-${{ matrix.user_mode }}" \
"${{ matrix.distro.image }}" \
bash -c '
set -eu
apt-get update -y
apt-get install -y --no-install-recommends gnupg sudo

if [ "$USER_MODE" = "nonroot" ]; then
useradd -m -u 1001 -s /bin/bash testuser
echo "testuser ALL=(root) NOPASSWD: /usr/bin/apt-get, /usr/bin/apt" > /etc/sudoers.d/testuser-apt
chmod 0440 /etc/sudoers.d/testuser-apt
mkdir -p /etc/apt/keyrings
chown -R testuser:testuser \
/etc/apt/sources.list.d /etc/apt/preferences.d /etc/apt/keyrings /workspace

su -c "/workspace/apt.test -test.v -test.timeout=0 -test.run=TestApt \
--test.apt --ci.runId=$CI_RUN_ID" testuser
else
/workspace/apt.test -test.v -test.timeout=0 -test.run=TestApt \
--test.apt --ci.runId="$CI_RUN_ID"
fi
'
Loading
Loading