Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SPM build to CI #5663

Merged
merged 12 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/ci-build-spm.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions Makefile.Crossdock.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
13 changes: 9 additions & 4 deletions docker-compose/monitor/Makefile
Original file line number Diff line number Diff line change
@@ -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".
Expand Down
5 changes: 5 additions & 0 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading