feat: Fix version log (#1494) #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Modules | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
print-tag: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Extract Tag | |
id: extract_tag | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: Notify Slack Start | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.ODIGOS_RELEASE_STATUS_WEBHOOK_URL }} | |
run: | | |
curl -X POST -H 'Content-type: application/json' --data '{"description":"Detected new git tag. initializing a release", "tag":"${{ steps.extract_tag.outputs.tag }}"}' ${{ env.SLACK_WEBHOOK_URL }} | |
tag-modules: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Fetch all history for all tags and branches | |
- name: Extract Tag | |
id: extract_tag | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: Notify Modules Tagging | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.ODIGOS_RELEASE_STATUS_WEBHOOK_URL }} | |
run: | | |
curl -X POST -H 'Content-type: application/json' --data '{"description":"Tagging odigos modules so they can be consumed as libraries", "tag":"${{ steps.extract_tag.outputs.tag }}"}' ${{ env.SLACK_WEBHOOK_URL }} | |
- name: tag api | |
run: | | |
git tag api/${{ steps.extract_tag.outputs.tag }} | |
- name: tag common | |
run: | | |
git tag common/${{ steps.extract_tag.outputs.tag }} | |
- name: tag k8sutils | |
run: | | |
git tag k8sutils/${{ steps.extract_tag.outputs.tag }} | |
- name: tag procdiscovery | |
run: | | |
git tag procdiscovery/${{ steps.extract_tag.outputs.tag }} | |
- name: tag odiglet | |
run: | | |
git tag odiglet/${{ steps.extract_tag.outputs.tag }} | |
- name: tag opampserver | |
run: | | |
git tag opampserver/${{ steps.extract_tag.outputs.tag }} | |
- name: Push Module Tags | |
run: | | |
git push origin --tags | |
- name: Trigger Release PR in Odigos Enterprise | |
run: | | |
curl -X POST \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-H "Authorization: token ${{ secrets.RELEASE_BOT_TOKEN }}" \ | |
https://api.github.com/repos/odigos-io/odigos-enterprise/dispatches \ | |
-d '{"event_type": "create_release_pr", "client_payload": {"tag": "${{ steps.extract_tag.outputs.tag }}"}}' | |
- name: Notify Slack End | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.ODIGOS_RELEASE_STATUS_WEBHOOK_URL }} | |
run: | | |
curl -X POST -H 'Content-type: application/json' --data '{"description":"Odigos go modules tagged successfully", "tag":"${{ steps.extract_tag.outputs.tag }}"}' ${{ env.SLACK_WEBHOOK_URL }} | |
- name: Notify Slack on Failure | |
if: ${{ failure() || cancelled() }} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.ODIGOS_RELEASE_STATUS_WEBHOOK_URL }} | |
GITHUB_REPOSITORY: ${{ github.repository }} | |
GITHUB_RUN_ID: ${{ github.run_id }} | |
run: | | |
curl -X POST -H 'Content-type: application/json' --data '{"link":"https://github.com/${{ env.GITHUB_REPOSITORY }}/actions/runs/${{ env.GITHUB_RUN_ID }}", "description":"ERROR: Odigos go modules release failed", "tag":"${{ steps.extract_tag.outputs.tag }}"}' ${{ env.SLACK_WEBHOOK_URL }} | |
publish-docker-images: | |
strategy: | |
matrix: | |
include: | |
- service: autoscaler | |
runner: ubuntu-latest | |
- service: scheduler | |
runner: ubuntu-latest | |
- service: instrumentor | |
runner: ubuntu-latest | |
- service: collector | |
runner: large-runner | |
- service: odiglet | |
runner: ubuntu-latest | |
- service: ui | |
runner: ubuntu-latest | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Extract Tag | |
id: extract_tag | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: Notify Modules Tagging | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.ODIGOS_RELEASE_STATUS_WEBHOOK_URL }} | |
run: | | |
curl -X POST -H 'Content-type: application/json' --data '{"description":"Start building docker image for component ${{ matrix.service }}", "tag":"${{ steps.extract_tag.outputs.tag }}"}' ${{ env.SLACK_WEBHOOK_URL }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and Push Docker Image for ${{ matrix.service }} | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
tags: keyval/odigos-${{ matrix.service }}:${{ steps.extract_tag.outputs.tag }} | |
build-args: | | |
SERVICE_NAME=${{ matrix.service }} | |
ODIGOS_VERSION=${{ steps.extract_tag.outputs.tag }} | |
platforms: linux/amd64,linux/arm64 | |
file: >- | |
${{ | |
(matrix.service == 'odiglet' && 'odiglet/Dockerfile') || | |
(matrix.service == 'collector' && 'collector/Dockerfile') || | |
(matrix.service == 'ui' && 'frontend/Dockerfile') || | |
'Dockerfile' | |
}} | |
context: >- | |
${{ | |
(matrix.service == 'collector' && 'collector') || | |
'.' | |
}} | |
- name: Notify Slack End | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.ODIGOS_RELEASE_STATUS_WEBHOOK_URL }} | |
run: | | |
curl -X POST -H 'Content-type: application/json' --data '{"description":"Odigos component ${{ matrix.service }} released successfully", "tag":"${{ steps.extract_tag.outputs.tag }}"}' ${{ env.SLACK_WEBHOOK_URL }} | |
- name: Notify Slack on Failure | |
if: ${{ failure() || cancelled() }} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.ODIGOS_RELEASE_STATUS_WEBHOOK_URL }} | |
GITHUB_REPOSITORY: ${{ github.repository }} | |
GITHUB_RUN_ID: ${{ github.run_id }} | |
run: | | |
curl -X POST -H 'Content-type: application/json' --data '{"link":"https://github.com/${{ env.GITHUB_REPOSITORY }}/actions/runs/${{ env.GITHUB_RUN_ID }}", "description":"ERROR: odigos component ${{ matrix.service }} release failed", "tag":"${{ steps.extract_tag.outputs.tag }}"}' ${{ env.SLACK_WEBHOOK_URL }} | |
publish-collector-linux-packages: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Extract Tag | |
id: extract_tag | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: Notify Slack Start | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.ODIGOS_RELEASE_STATUS_WEBHOOK_URL }} | |
run: | | |
curl -X POST -H 'Content-type: application/json' --data '{"description":"Start releasing odigos collector as linux packages", "tag":"${{ steps.extract_tag.outputs.tag }}"}' ${{ env.SLACK_WEBHOOK_URL }} | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ steps.extract_tag.outputs.tag }} | |
- name: Install GemFury CLI | |
run: | | |
sudo bash -c "echo 'deb [trusted=yes] https://apt.fury.io/cli/ * *' > /etc/apt/sources.list.d/fury-cli.list" | |
sudo apt-get update | |
sudo apt-get install -y fury-cli | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --clean | |
workdir: collector | |
env: | |
FURY_ACCOUNT: ${{ secrets.FURY_ACCOUNT }} | |
FURY_API_TOKEN: ${{ secrets.FURY_API_TOKEN }} | |
- name: Notify Slack End | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.ODIGOS_RELEASE_STATUS_WEBHOOK_URL }} | |
run: | | |
curl -X POST -H 'Content-type: application/json' --data '{"description":"Odigos collector linux packages released successfully", "tag":"${{ steps.extract_tag.outputs.tag }}"}' ${{ env.SLACK_WEBHOOK_URL }} | |
- name: Notify Slack on Failure | |
if: ${{ failure() || cancelled() }} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.ODIGOS_RELEASE_STATUS_WEBHOOK_URL }} | |
GITHUB_REPOSITORY: ${{ github.repository }} | |
GITHUB_RUN_ID: ${{ github.run_id }} | |
run: | | |
curl -X POST -H 'Content-type: application/json' --data '{"link":"https://github.com/${{ env.GITHUB_REPOSITORY }}/actions/runs/${{ env.GITHUB_RUN_ID }}", "description":"ERROR: failed to publish odigos collector linux packages", "tag":"${{ steps.extract_tag.outputs.tag }}"}' ${{ env.SLACK_WEBHOOK_URL }} |