diff --git a/.github/workflows/ci-build-spm.yml b/.github/workflows/ci-build-spm.yml new file mode 100644 index 00000000000..30a1644dfc1 --- /dev/null +++ b/.github/workflows/ci-build-spm.yml @@ -0,0 +1,44 @@ +name: Test SPM + +on: + push: + branches: [main] + + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} + cancel-in-progress: true + +# See https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions +permissions: + contents: read + +jobs: + spm: + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + submodules: true + + - name: Fetch git tags + run: | + git fetch --prune --unshallow --tags + + - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + with: + go-version: 1.22.x + + - name: Setup Node.js version + uses: ./.github/actions/setup-node.js + + - name: Temporary - only run the build + run: + cd docker-compose/monitor && make build diff --git a/Makefile.Crossdock.mk b/Makefile.Crossdock.mk index 2e702310e2b..56d6f595767 100644 --- a/Makefile.Crossdock.mk +++ b/Makefile.Crossdock.mk @@ -32,8 +32,8 @@ build-crossdock-fresh: build-crossdock-linux make crossdock-fresh .PHONY: crossdock-docker-images-jaeger-backend -crossdock-docker-images-jaeger-backend: PLATFORMS=linux/amd64 -crossdock-docker-images-jaeger-backend: create-baseimg create-debugimg +crossdock-docker-images-jaeger-backend: PLATFORMS=linux/$(shell go env GOARCH) +crossdock-docker-images-jaeger-backend: create-baseimg create-fake-debugimg for component in "jaeger-agent" "jaeger-collector" "jaeger-query" "jaeger-ingester" "all-in-one" ; do \ regex="jaeger-(.*)"; \ component_suffix=$$component; \ diff --git a/docker-compose/monitor/Makefile b/docker-compose/monitor/Makefile index caa2934fc1f..1d325829f4a 100644 --- a/docker-compose/monitor/Makefile +++ b/docker-compose/monitor/Makefile @@ -1,9 +1,14 @@ .PHONY: build -build: export DOCKER_TAG = dev build: clean-jaeger - cd ../../ && \ - make build-all-in-one-linux && \ - make docker-images-jaeger-backend + cd ../../ && make build-all-in-one-linux + cd ../../ && make create-baseimg PLATFORMS=linux/$(shell go env GOARCH) + cd ../../ && docker buildx build --target release \ + --tag jaegertracing/all-in-one:dev \ + --build-arg base_image=localhost:5000/baseimg_alpine:latest \ + --build-arg debug_image=not-used \ + --build-arg TARGETARCH=$(shell go env GOARCH) \ + --load \ + cmd/all-in-one # starts up the system required for SPM using the latest otel image and a development jaeger image. # Note: the jaeger "dev" image can be built with "make build". diff --git a/docker/Makefile b/docker/Makefile index dfb72662a7d..3edf6d8803e 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -17,6 +17,11 @@ create-debugimg: prepare-docker-buildx --platform=$(PLATFORMS) \ docker/debug +create-fake-debugimg: prepare-docker-buildx + docker buildx build -t $(DEBUG_IMAGE) --push \ + --platform=$(PLATFORMS) \ + docker/base + .PHONY: prepare-docker-buildx prepare-docker-buildx: 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"