Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

chore(build): include missing LDFLAGS in the community/enterprise builds (#7571)

Prashant Shahia5b52431b72a
diff --git a/.github/workflows/build-community.yaml b/.github/workflows/build-community.yaml
index bb832e50a8..a6723c53c6 100644
--- a/.github/workflows/build-community.yaml
+++ b/.github/workflows/build-community.yaml
@@ -7,12 +7,46 @@ on:
tags:
- v*
+defaults:
+ run:
+ shell: bash
+
+env:
+ PRIMUS_HOME: .primus
+ MAKE: make --no-print-directory --makefile=.primus/src/make/main.mk
+
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
docker_providers: ${{ steps.set-docker-providers.outputs.providers }}
+ version: ${{ steps.build-info.outputs.version }}
+ hash: ${{ steps.build-info.outputs.hash }}
+ time: ${{ steps.build-info.outputs.time }}
+ branch: ${{ steps.build-info.outputs.branch }}
steps:
+ - name: self-checkout
+ uses: actions/checkout@v4
+ - id: token
+ name: github-token-gen
+ uses: actions/create-github-app-token@v1
+ with:
+ app-id: ${{ secrets.PRIMUS_APP_ID }}
+ private-key: ${{ secrets.PRIMUS_PRIVATE_KEY }}
+ owner: ${{ github.repository_owner }}
+ - name: primus-checkout
+ uses: actions/checkout@v4
+ with:
+ repository: signoz/primus
+ ref: ${{ inputs.PRIMUS_REF }}
+ path: .primus
+ token: ${{ steps.token.outputs.token }}
+ - name: build-info
+ run: |
+ echo "version=$($MAKE info-version)" >> $GITHUB_OUTPUT
+ echo "hash=$($MAKE info-commit-short)" >> $GITHUB_OUTPUT
+ echo "time=$($MAKE info-timestamp)" >> $GITHUB_OUTPUT
+ echo "branch=$($MAKE info-branch)" >> $GITHUB_OUTPUT
- name: set-docker-providers
id: set-docker-providers
run: |
@@ -45,11 +79,11 @@ jobs:
GO_BUILD_FLAGS: >-
-tags timetzdata
-ldflags='-linkmode external -extldflags \"-static\" -s -w
- -X github.com/signoz/zeus/pkg/version.Version=\$($MAKE info-version)
- -X github.com/signoz/zeus/pkg/version.variant=community
- -X github.com/signoz/zeus/pkg/version.hash=\$($MAKE info-commit-short)
- -X github.com/signoz/zeus/pkg/version.time=\$($MAKE info-timestamp)
- -X github.com/signoz/zeus/pkg/version.branch=\$($MAKE info-branch)'
+ -X github.com/SigNoz/signoz/pkg/version.version=${{ needs.prepare.outputs.version }}
+ -X github.com/SigNoz/signoz/pkg/version.variant=community
+ -X github.com/SigNoz/signoz/pkg/version.hash=${{ needs.prepare.outputs.hash }}
+ -X github.com/SigNoz/signoz/pkg/version.time=${{ needs.prepare.outputs.time }}
+ -X github.com/SigNoz/signoz/pkg/version.branch=${{ needs.prepare.outputs.branch }}'
GO_CGO_ENABLED: 1
DOCKER_BASE_IMAGES: '{"alpine": "alpine:3.20.3"}'
DOCKER_DOCKERFILE_PATH: ./pkg/query-service/Dockerfile.multi-arch
diff --git a/.github/workflows/build-enterprise.yaml b/.github/workflows/build-enterprise.yaml
index 0ca721fa0c..5a5786e43a 100644
--- a/.github/workflows/build-enterprise.yaml
+++ b/.github/workflows/build-enterprise.yaml
@@ -7,12 +7,47 @@ on:
tags:
- v*
+defaults:
+ run:
+ shell: bash
+
+env:
+ PRIMUS_HOME: .primus
+ MAKE: make --no-print-directory --makefile=.primus/src/make/main.mk
+
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
docker_providers: ${{ steps.set-docker-providers.outputs.providers }}
+ version: ${{ steps.build-info.outputs.version }}
+ hash: ${{ steps.build-info.outputs.hash }}
+ time: ${{ steps.build-info.outputs.time }}
+ branch: ${{ steps.build-info.outputs.branch }}
steps:
+ - name: self-checkout
+ uses: actions/checkout@v4
+ - id: token
+ name: github-token-gen
+ uses: actions/create-github-app-token@v1
+ with:
+ app-id: ${{ secrets.PRIMUS_APP_ID }}
+ private-key: ${{ secrets.PRIMUS_PRIVATE_KEY }}
+ owner: ${{ github.repository_owner }}
+ - name: primus-checkout
+ uses: actions/checkout@v4
+ with:
+ repository: signoz/primus
+ ref: ${{ inputs.PRIMUS_REF }}
+ path: .primus
+ token: ${{ steps.token.outputs.token }}
+ - name: build-info
+ id: build-info
+ run: |
+ echo "version=$($MAKE info-version)" >> $GITHUB_OUTPUT
+ echo "hash=$($MAKE info-commit-short)" >> $GITHUB_OUTPUT
+ echo "time=$($MAKE info-timestamp)" >> $GITHUB_OUTPUT
+ echo "branch=$($MAKE info-branch)" >> $GITHUB_OUTPUT
- name: set-docker-providers
id: set-docker-providers
run: |
@@ -66,13 +101,13 @@ jobs:
GO_BUILD_FLAGS: >-
-tags timetzdata
-ldflags='-linkmode external -extldflags \"-static\" -s -w
- -X github.com/signoz/zeus/pkg/version.Version=\$($MAKE info-version)
- -X github.com/signoz/zeus/pkg/version.variant=enterprise
- -X github.com/signoz/zeus/pkg/version.hash=\$($MAKE info-commit-short)
- -X github.com/signoz/zeus/pkg/version.time=\$($MAKE info-timestamp)
- -X github.com/signoz/zeus/pkg/version.branch=\$($MAKE info-branch)
- -X github.com/signoz/zeus/ee/query-service/constants.ZeusURL=https://api.signoz.cloud
- -X github.com/signoz/zeus/ee/query-service/constants.LicenseSignozIo=https://license.signoz.io/api/v1'
+ -X github.com/SigNoz/signoz/pkg/version.version=${{ needs.prepare.outputs.version }}
+ -X github.com/SigNoz/signoz/pkg/version.variant=enterprise
+ -X github.com/SigNoz/signoz/pkg/version.hash=${{ needs.prepare.outputs.hash }}
+ -X github.com/SigNoz/signoz/pkg/version.time=${{ needs.prepare.outputs.time }}
+ -X github.com/SigNoz/signoz/pkg/version.branch=${{ needs.prepare.outputs.branch }}
+ -X github.com/SigNoz/signoz/ee/query-service/constants.ZeusURL=https://api.signoz.cloud
+ -X github.com/SigNoz/signoz/ee/query-service/constants.LicenseSignozIo=https://license.signoz.io/api/v1'
GO_CGO_ENABLED: 1
DOCKER_BASE_IMAGES: '{"alpine": "alpine:3.20.3"}'
DOCKER_DOCKERFILE_PATH: ./ee/query-service/Dockerfile.multi-arch