Skip to content

Commit f5d175b

Browse files
Add SPM build to CI (jaegertracing#5663)
## Which problem is this PR solving? - Part of jaegertracing#5608 - SPM Makefile was calling a target that was removed in previous refactoring ## Description of the changes - Build the image directly instead of calling much more expensive target - Use workflow added in jaegertracing#5640 to run the build - Change crossdock target to not build debug image with devle, which is expensive ## How was this change tested? - `make build && make dev` --------- Signed-off-by: mehul gautam <[email protected]> Signed-off-by: Yuri Shkuro <[email protected]> Co-authored-by: mehul gautam <[email protected]>
1 parent 3f6f5fe commit f5d175b

File tree

4 files changed

+60
-6
lines changed

4 files changed

+60
-6
lines changed

.github/workflows/ci-build-spm.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Test SPM
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
pull_request:
8+
branches: [main]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }}
12+
cancel-in-progress: true
13+
14+
# See https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
spm:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Harden Runner
23+
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
24+
with:
25+
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
26+
27+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
28+
with:
29+
submodules: true
30+
31+
- name: Fetch git tags
32+
run: |
33+
git fetch --prune --unshallow --tags
34+
35+
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
36+
with:
37+
go-version: 1.22.x
38+
39+
- name: Setup Node.js version
40+
uses: ./.github/actions/setup-node.js
41+
42+
- name: Temporary - only run the build
43+
run:
44+
cd docker-compose/monitor && make build

Makefile.Crossdock.mk

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ build-crossdock-fresh: build-crossdock-linux
3232
make crossdock-fresh
3333

3434
.PHONY: crossdock-docker-images-jaeger-backend
35-
crossdock-docker-images-jaeger-backend: PLATFORMS=linux/amd64
36-
crossdock-docker-images-jaeger-backend: create-baseimg create-debugimg
35+
crossdock-docker-images-jaeger-backend: PLATFORMS=linux/$(shell go env GOARCH)
36+
crossdock-docker-images-jaeger-backend: create-baseimg create-fake-debugimg
3737
for component in "jaeger-agent" "jaeger-collector" "jaeger-query" "jaeger-ingester" "all-in-one" ; do \
3838
regex="jaeger-(.*)"; \
3939
component_suffix=$$component; \

docker-compose/monitor/Makefile

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
.PHONY: build
2-
build: export DOCKER_TAG = dev
32
build: clean-jaeger
4-
cd ../../ && \
5-
make build-all-in-one-linux && \
6-
make docker-images-jaeger-backend
3+
cd ../../ && make build-all-in-one-linux
4+
cd ../../ && make create-baseimg PLATFORMS=linux/$(shell go env GOARCH)
5+
cd ../../ && docker buildx build --target release \
6+
--tag jaegertracing/all-in-one:dev \
7+
--build-arg base_image=localhost:5000/baseimg_alpine:latest \
8+
--build-arg debug_image=not-used \
9+
--build-arg TARGETARCH=$(shell go env GOARCH) \
10+
--load \
11+
cmd/all-in-one
712

813
# starts up the system required for SPM using the latest otel image and a development jaeger image.
914
# Note: the jaeger "dev" image can be built with "make build".

docker/Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ create-debugimg: prepare-docker-buildx
1717
--platform=$(PLATFORMS) \
1818
docker/debug
1919

20+
create-fake-debugimg: prepare-docker-buildx
21+
docker buildx build -t $(DEBUG_IMAGE) --push \
22+
--platform=$(PLATFORMS) \
23+
docker/base
24+
2025
.PHONY: prepare-docker-buildx
2126
prepare-docker-buildx:
2227
docker buildx inspect jaeger-build > /dev/null || docker buildx create --use --name=jaeger-build --buildkitd-flags="--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host" --driver-opt="network=host"

0 commit comments

Comments
 (0)