-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support for agent startup parameters (#2)
- Loading branch information
Showing
7 changed files
with
115 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM alpine:3.14 | ||
COPY build/controller / | ||
ENTRYPOINT ["/controller"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.PHONY: build test | ||
|
||
REGISTRY=semaphoreci/controller | ||
LATEST_VERSION=$(shell git tag | sort --version-sort | tail -n 1) | ||
|
||
SECURITY_TOOLBOX_BRANCH ?= master | ||
SECURITY_TOOLBOX_TMP_DIR ?= /tmp/security-toolbox | ||
|
||
check.prepare: | ||
rm -rf $(SECURITY_TOOLBOX_TMP_DIR) | ||
git clone git@github.com:renderedtext/security-toolbox.git $(SECURITY_TOOLBOX_TMP_DIR) && (cd $(SECURITY_TOOLBOX_TMP_DIR) && git checkout $(SECURITY_TOOLBOX_BRANCH) && cd -) | ||
|
||
check.static: check.prepare | ||
docker run -it -v $$(pwd):/app \ | ||
-v $(SECURITY_TOOLBOX_TMP_DIR):$(SECURITY_TOOLBOX_TMP_DIR) \ | ||
registry.semaphoreci.com/ruby:2.7 \ | ||
bash -c 'cd /app && $(SECURITY_TOOLBOX_TMP_DIR)/code --language go -d' | ||
|
||
check.deps: check.prepare | ||
docker run -it -v $$(pwd):/app \ | ||
-v $(SECURITY_TOOLBOX_TMP_DIR):$(SECURITY_TOOLBOX_TMP_DIR) \ | ||
registry.semaphoreci.com/ruby:2.7 \ | ||
bash -c 'cd /app && $(SECURITY_TOOLBOX_TMP_DIR)/dependencies --language go -d' | ||
|
||
build: | ||
rm -rf build | ||
env GOOS=linux go build -o build/controller main.go | ||
|
||
docker.build: build | ||
docker build -t $(REGISTRY):latest . | ||
|
||
docker.push: | ||
@if [ -z "$(LATEST_VERSION)" ]; then \ | ||
docker push $(REGISTRY):latest; \ | ||
else \ | ||
docker tag $(REGISTRY):latest $(REGISTRY):$(LATEST_VERSION); \ | ||
docker push $(REGISTRY):$(LATEST_VERSION); \ | ||
docker push $(REGISTRY):latest; \ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters