Skip to content

Commit

Permalink
feat(ci): switch to GH action for testing CI build image (#5342)
Browse files Browse the repository at this point in the history
  • Loading branch information
hainenber authored Oct 13, 2023
1 parent 156b1f0 commit e4eed15
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 91 deletions.
53 changes: 1 addition & 52 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,5 @@
---
kind: pipeline
name: Check Linux build image
platform:
arch: amd64
os: linux
steps:
- commands:
- docker buildx build -t grafana/agent-build-image:latest ./build-image
image: docker
name: Build
volumes:
- name: docker
path: /var/run/docker.sock
trigger:
paths:
include:
- build-image/**
ref:
- refs/heads/main
type: docker
volumes:
- host:
path: /var/run/docker.sock
name: docker
---
kind: pipeline
name: Create Linux build image
platform:
arch: amd64
Expand Down Expand Up @@ -59,32 +34,6 @@ volumes:
name: docker
---
kind: pipeline
name: Check Windows build image
platform:
arch: amd64
os: windows
version: "1809"
steps:
- commands:
- docker build -t grafana/agent-build-image:latest ./build-image/windows
image: docker:windowsservercore-1809
name: Build
volumes:
- name: docker
path: //./pipe/docker_engine/
trigger:
paths:
include:
- build-image/**
ref:
- refs/heads/main
type: docker
volumes:
- host:
path: //./pipe/docker_engine/
name: docker
---
kind: pipeline
name: Create Windows build image
platform:
arch: amd64
Expand Down Expand Up @@ -1478,6 +1427,6 @@ kind: secret
name: updater_private_key
---
kind: signature
hmac: d9fd1e02c62a58f2f6ccd7c87108f53d0a701dd5d44e81366ff825edb9401ae6
hmac: 372648213124cf1280ee4f0d402324dcc80b8a3304ae7a8e877bbe766ccb4074

...
38 changes: 0 additions & 38 deletions .drone/pipelines/build_images.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,6 @@ local locals = {
};

[
pipelines.linux('Check Linux build image') {
trigger: locals.on_merge,
steps: [{
name: 'Build',
image: 'docker',
volumes: [{
name: 'docker',
path: '/var/run/docker.sock',
}],
commands: [
'docker buildx build -t grafana/agent-build-image:latest ./build-image',
],
}],
volumes: [{
name: 'docker',
host: { path: '/var/run/docker.sock' },
}],
},

pipelines.linux('Create Linux build image') {
trigger: locals.on_build_image_tag,
steps: [{
Expand All @@ -60,25 +41,6 @@ local locals = {
}],
},

pipelines.windows('Check Windows build image') {
trigger: locals.on_merge,
steps: [{
name: 'Build',
image: 'docker:windowsservercore-1809',
volumes: [{
name: 'docker',
path: '//./pipe/docker_engine/',
}],
commands: [
'docker build -t grafana/agent-build-image:latest ./build-image/windows',
],
}],
volumes: [{
name: 'docker',
host: { path: '//./pipe/docker_engine/' },
}],
},

pipelines.windows('Create Windows build image') {
trigger: locals.on_build_image_tag,
steps: [{
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/check-linux-build-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Check Linux build image

on:
pull_request:
paths:
- 'build-image/*'

jobs:
check-linux-build-image:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Create test Linux build image
uses: docker/build-push-action@v5
with:
context: ./build-image
push: false
tags: grafana/agent-build-image:latest
22 changes: 22 additions & 0 deletions .github/workflows/check-windows-build-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Check Windows build image

on:
pull_request:
paths:
- 'build-image/windows/**'

jobs:
check-windows-build-image:
runs-on: windows-2019
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Create test Windows build image
uses: mr-smithers-excellent/docker-build-push@v6
with:
image: grafana/agent-build-image
tags: latest
registry: docker.io
pushImage: false
dockerfile: ./build-image/windows/Dockerfile
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ v0.37.0 (2023-10-10)

- Update Prometheus dependency to v2.46.0. (@tpaschalis)

- The `client_secret` config argument in the `otelcol.auth.oauth2` component is
- The `client_secret` config argument in the `otelcol.auth.oauth2` component is
now of type `secret` instead of type `string`. (@ptodev)

### Bugfixes
Expand Down

0 comments on commit e4eed15

Please sign in to comment.