Skip to content

Commit 76ec9e8

Browse files
committed
chore: move e2e to k8s-tests, restore docker build command in agent
1 parent 5934d7d commit 76ec9e8

File tree

78 files changed

+14
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+14
-18
lines changed

.github/workflows/agent-ci.yaml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,7 @@ jobs:
1717
contents: write
1818
steps:
1919
- uses: actions/checkout@v4
20-
21-
- name: Install everything, run the tests, produce the .coverage file
20+
- name: Install everything, run the tests, produce the .coverage file and coverage.xml report
2221
run: |
2322
cd agent
24-
make test
25-
- name: Coverage comment
26-
id: coverage_comment
27-
uses: py-cov-action/python-coverage-comment-action@v3
28-
with:
29-
COVERAGE_PATH: agent/
30-
GITHUB_TOKEN: ${{ github.token }}
31-
- name: Store Pull Request comment to be posted
32-
uses: actions/upload-artifact@v4
33-
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
34-
with:
35-
# If you use a different name, update COMMENT_ARTIFACT_NAME accordingly
36-
name: python-coverage-comment-action
37-
# If you use a different name, update COMMENT_FILENAME accordingly
38-
path: python-coverage-comment-action.txt
23+
make test

agent/Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@ build: ## Builds using hatch to `dist`
5050
$(VENV)hatch -p skyhook-agent version $(build_version)
5151
$(VENV)hatch -p skyhook-agent build -c
5252

53+
docker-setup:
54+
test ! $($(DOCKER_CMD) context ls | grep builder) || $(DOCKER_CMD) context create builder;
55+
$(DOCKER_CMD) buildx create --platform linux/amd64,linux/arm64 --use builder
56+
$(DOCKER_CMD) run --privileged --rm tonistiigi/binfmt --install amd64,arm64
57+
58+
ACTUAL_TAGS=$(shell echo "-t $(REGISTRY)/$(AGENT_IMAGE):$(shell date +%y.%m.%d-%H%M%S)-$(COMMIT_SHORT_SHA) $(TAGS)" | tr A-Z a-z)
59+
.PHONY: docker-build-only
60+
docker-build-only:
61+
@echo "Building skyhook-agent $(DOCKER_CMD) image with tags: $(ACTUAL_TAGS)"
62+
$(DOCKER_CMD) buildx build $(BUILD_ARGS) --build-arg AGENT_VERSION=$(AGENT_VERSION) --platform linux/amd64,linux/arm64 $(ACTUAL_TAGS) --metadata-file=metadata.json -f ../containers/agent.Dockerfile .
63+
5364
##@ Vendor
5465
.PHONY: vendor
5566
vendor: ## Uses Unearth to vendor all dependencies locally.

0 commit comments

Comments
 (0)