Skip to content

Commit

Permalink
fix: fix file paths for odigos-otelcol package (#1176)
Browse files Browse the repository at this point in the history
Co-authored-by: Amir Blum <amirgiraffe@gmail.com>
  • Loading branch information
rauno56 and blumamir authored May 7, 2024
1 parent 23a7be8 commit 0e40ad6
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/publish-modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: tag common
run: |
git tag common/${{ steps.extract_tag.outputs.tag }}
- name: tag procdiscovery
run: |
git tag procdiscovery/${{ steps.extract_tag.outputs.tag }}
Expand Down Expand Up @@ -130,17 +130,17 @@ jobs:
build-args: SERVICE_NAME=${{ matrix.service }}
platforms: linux/amd64,linux/arm64
file: >-
${{
(matrix.service == 'odiglet' && 'odiglet/Dockerfile') ||
(matrix.service == 'collector' && 'collector/Dockerfile') ||
'Dockerfile'
${{
(matrix.service == 'odiglet' && 'odiglet/Dockerfile') ||
(matrix.service == 'collector' && 'collector/Dockerfile') ||
'Dockerfile'
}}
context: >-
${{
(matrix.service == 'collector' && 'collector') ||
'.'
${{
(matrix.service == 'collector' && 'collector') ||
'.'
}}
- name: Notify Slack End
env:
SLACK_WEBHOOK_URL: ${{ secrets.ODIGOS_RELEASE_STATUS_WEBHOOK_URL }}
Expand Down Expand Up @@ -168,10 +168,10 @@ jobs:
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:
with:
fetch-depth: 0
ref: ${{ steps.extract_tag.outputs.tag }}

Expand All @@ -185,7 +185,7 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: "1.22"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand All @@ -202,7 +202,7 @@ jobs:
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()
env:
Expand All @@ -211,4 +211,3 @@ jobs:
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 }}
1 change: 1 addition & 0 deletions collector/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ nfpms:
type: config|noreplace
scripts:
preinstall: distribution/odigos-otelcol/preinstall.sh
postinstall: distribution/odigos-otelcol/postinstall.sh
preremove: distribution/odigos-otelcol/preremove.sh
vendor: Keyval Inc.
homepage: https://odigos.io
Expand Down
4 changes: 2 additions & 2 deletions collector/distribution/odigos-otelcol/odigos-otelcol.service
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Description=Odigos Distribution of the OpenTelemetry Collector
After=network.target

[Service]
EnvironmentFile=/etc/otelcol-contrib/otelcol-contrib.conf
ExecStart=/usr/bin/otelcol-contrib $OTELCOL_OPTIONS
EnvironmentFile=/etc/odigos-otelcol/odigos-otelcol.conf
ExecStart=/usr/bin/odigos-otelcol $OTELCOL_OPTIONS
KillMode=mixed
Restart=on-failure
Type=simple
Expand Down
4 changes: 4 additions & 0 deletions collector/distribution/odigos-otelcol/postinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
if command -v systemctl >/dev/null 2>&1; then
systemctl enable odigos-otelcol.service
systemctl start odigos-otelcol.service
fi
1 change: 0 additions & 1 deletion collector/distribution/odigos-otelcol/preinstall.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

getent passwd odigos >/dev/null || useradd --system --user-group --no-create-home --shell /sbin/nologin odigos

0 comments on commit 0e40ad6

Please sign in to comment.