Skip to content

Commit

Permalink
Migrate "Test Linux system packages" from Drone to GitHub Actions (#2699
Browse files Browse the repository at this point in the history
)

* Add a GitHub Action for Test Linux system packages

* Remove Drone build for "Test Linux system packages"

* Don't run "Test Linux system packages" on a pull request
  • Loading branch information
ptodev authored Feb 11, 2025
1 parent 3fd1539 commit e7d6b39
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 67 deletions.
1 change: 0 additions & 1 deletion .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ local pipelines = import './pipelines.jsonnet';

(import 'pipelines/check_containers.jsonnet') +
(import 'pipelines/publish.jsonnet') +
(import 'pipelines/test_packages.jsonnet') +
(import 'util/secrets.jsonnet').asList
30 changes: 1 addition & 29 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -391,34 +391,6 @@ volumes:
path: /var/run/docker.sock
name: docker
---
kind: pipeline
name: Test Linux system packages
platform:
arch: amd64
os: linux
steps:
- commands:
- DOCKER_OPTS="" make dist/alloy-linux-amd64
- DOCKER_OPTS="" make test-packages
image: grafana/alloy-build-image:v0.1.8
name: Test Linux system packages
volumes:
- name: docker
path: /var/run/docker.sock
trigger:
paths:
- packaging/**
- internal/tools/packaging_test/**
- Makefile
- tools/make/*.mk
ref:
- refs/heads/main
type: docker
volumes:
- host:
path: /var/run/docker.sock
name: docker
---
get:
name: app-id
path: infra/data/ci/agent/githubapp
Expand Down Expand Up @@ -504,6 +476,6 @@ kind: secret
name: updater_private_key
---
kind: signature
hmac: 5d317332b9c3f6e11b63eff2405c45f7e1c67efe0f31f9577f479707e1a35af5
hmac: 2f4aa94bee9f21df7493482977c746381fba40de71589f506563a60955c59873

...
34 changes: 0 additions & 34 deletions .drone/pipelines/test_packages.jsonnet

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/test_linux_system_packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test Linux system packages
on:
push:
branches:
- main
paths:
- packaging/**
- internal/tools/packaging_test/**
- Makefile
- tools/make/*.mk
jobs:
test_linux_system_packages:
name: Test Linux system packages
runs-on: ubuntu-latest
container:
image: grafana/alloy-build-image:v0.1.8
volumes:
- /var/run/docker.sock
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set ownership
# https://github.com/actions/runner/issues/2033#issuecomment-1204205989
run: |
# this is to fix GIT not liking owner of the checkout dir
chown -R $(id -u):$(id -g) $PWD
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
# TODO: Enable caching later
cache: false
- run: DOCKER_OPTS="" make dist/alloy-linux-amd64
- run: DOCKER_OPTS="" make test-packages
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ require (
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/digitalocean/godo v1.118.0 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/cli v24.0.0+incompatible // indirect
github.com/docker/cli v27.4.0+incompatible // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/drone/envsubst v1.0.3 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1368,8 +1368,8 @@ github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5
github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI=
github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ=
github.com/docker/cli v20.10.11+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/cli v24.0.0+incompatible h1:0+1VshNwBQzQAx9lOl+OYCTCEAD8fKs/qeXMx3O0wqM=
github.com/docker/cli v24.0.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/cli v27.4.0+incompatible h1:/nJzWkcI1MDMN+U+px/YXnQWJqnu4J+QKGTfD6ptiTc=
github.com/docker/cli v27.4.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/distribution v2.6.0-rc.1.0.20170726174610-edc3ab29cdff+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v17.12.0-ce-rc1.0.20200916142827-bd33bbf0497b+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
Expand Down

0 comments on commit e7d6b39

Please sign in to comment.