Skip to content
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

feat(ci): switch to GH action for testing CI build image #5342

Merged
Merged
Show file tree
Hide file tree
Changes from 7 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
56 changes: 0 additions & 56 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 @@ -1476,8 +1425,3 @@ get:
path: infra/data/ci/github/updater-app
kind: secret
name: updater_private_key
---
kind: signature
hmac: d9fd1e02c62a58f2f6ccd7c87108f53d0a701dd5d44e81366ff825edb9401ae6

...
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,13 @@ v0.37.0-rc.0 (2023-10-05)

- `prometheus.operator.probes` no longer ignores relabeling `rule` blocks. (@sberz)

- Migrate `Check Linux/Windows build image` to GitHub Actions. (@hainenber)
hainenber marked this conversation as resolved.
Show resolved Hide resolved

- Documentation updated to correct default path from `prometheus.exporter.windows` `text_file` block (@timo1707)

- Bump `redis_exporter` to v1.54.0 (@spartan0x117)


v0.36.2 (2023-09-22)
--------------------

Expand Down
1 change: 1 addition & 0 deletions build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ FROM rfratto/viceroy:v0.4.0
# This must be done before installing other dependencies, otherwise nodesource
# will fail on installing NodeJS for all platforms instead of just our host
# platform.
# Test change
RUN <<EOF
apt-get update && apt-get install -qy curl
curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
Expand Down
1 change: 1 addition & 0 deletions build-image/windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ RUN Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointMa
# make - building with a Makefile
# docker - building images
# git - bash for windows
# test commit

RUN choco install 7zip --version 22.1 -y

Expand Down