From 0ccfe22967e5fcbfcebede67ac4b6f3e0b76f7e5 Mon Sep 17 00:00:00 2001 From: King'ori Maina Date: Tue, 19 Nov 2024 10:05:04 +0200 Subject: [PATCH 1/5] Add test workflow --- .github/workflows/test.yml | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1d2c021 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,46 @@ +name: Test + +on: + push: + branches: + - main + pull_request: + branches: + - main + +env: + # Update this to the exact version that you want to test i.e. the packaging + # into a Docker image. + VERSION: 0.10.14 + +jobs: + docker-build: + runs-on: ubuntu-latest + env: + IMAGE: zappi/celery-exporter + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + repository: danihodovic/celery-exporter + ref: v${{ env.VERSION }} + - name: Prepare Image Metadata + id: metadata + uses: docker/metadata-action@v5 + with: + images: ${{ env.IMAGE }} + - name: Set Up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set Up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Test Multi-Arch Building Of Image + uses: docker/build-push-action@v6 + with: + cache-from: type=gha + cache-to: type=gha,mode=max + context: . + platforms: linux/amd64,linux/arm64 + push: false + annotations: ${{ steps.metadata.outputs.annotations }} + labels: ${{ steps.metadata.outputs.labels }} + tags: ${{ steps.metadata.outputs.tags }} From 786455d797ed9ec362f8638f435fce001a10b0ed Mon Sep 17 00:00:00 2001 From: King'ori Maina Date: Tue, 19 Nov 2024 10:30:05 +0200 Subject: [PATCH 2/5] Add release workflow --- .github/workflows/release.yml | 66 +++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4e751cd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,66 @@ +name: Release + +on: + push: + tags: + - '[0-9]+.[0-9]+.[0-9]+' + +jobs: + github: + runs-on: ubuntu-latest + steps: + - name: Create Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref_name }} + release_name: Version ${{ github.ref_name }} + draft: false + prerelease: false + + docker-hub: + needs: github + runs-on: ubuntu-latest + env: + IMAGE: zappi/celery-exporter + permissions: + contents: write + packages: write + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + repository: danihodovic/celery-exporter + ref: "v${{ github.ref_name }}" + - name: Prepare Image Metadata + id: metadata + uses: docker/metadata-action@v5 + with: + images: ${{ env.IMAGE }} + - name: Set Up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set Up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login To Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + - name: Build, tag, and push image to Docker Hub + uses: docker/build-push-action@v6 + with: + cache-from: type=gha + cache-to: type=gha,mode=max + context: . + platforms: linux/amd64,linux/arm64 + push: true + annotations: ${{ steps.metadata.outputs.annotations }} + labels: ${{ steps.metadata.outputs.labels }} + tags: ${{ steps.metadata.outputs.tags }} + - name: Update Description On Docker Hub Description + uses: peter-evans/dockerhub-description@v4 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + repository: ${{ env.IMAGE }} From 663c1df0af6b7eaf8de03ddad48c474259ae8c7e Mon Sep 17 00:00:00 2001 From: King'ori Maina Date: Tue, 19 Nov 2024 10:28:03 +0200 Subject: [PATCH 3/5] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 38ecc98..dc23df6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 Intellection +Copyright (c) 2024 Zappi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 924874ac72a37a92c181ed77aadf9a7def9a5fe0 Mon Sep 17 00:00:00 2001 From: King'ori Maina Date: Tue, 19 Nov 2024 10:28:11 +0200 Subject: [PATCH 4/5] Update README --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 14bc114..2e8d6e8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,17 @@ # docker-celery-exporter -Docker image for celery-exporter, a Prometheus exporter for Celery metrics + +Docker image for [`danihodovic/celery-exporter`](https://github.com/danihodovic/celery-exporter), a Prometheus exporter for Celery metrics. + +## Motivations + +### How does this differ from upstream? + +The current Docker image doesn't support ARM and we needed one that does. And [the review to add support](https://github.com/danihodovic/celery-exporter/pull/329) took longer than we could wait. + +## Usage + +``` +docker run --name celery-exporter zappi/celery-exporter:latest +``` + +For more detailed usage documentation [see upstream](https://github.com/danihodovic/celery-exporter). From 8ba01c2e44943f6bee17968d3d20d48452898c3a Mon Sep 17 00:00:00 2001 From: King'ori Maina Date: Tue, 19 Nov 2024 11:02:48 +0200 Subject: [PATCH 5/5] Add CODEOWNERS --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..f83760b --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @Intellection/SRE