-
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.
Merge pull request #8 from catenasys/feature/update-build
update to most recent build patterns
- Loading branch information
Showing
6 changed files
with
251 additions
and
198 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
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 |
---|---|---|
@@ -1,14 +1,5 @@ | ||
FROM golang:1.16-alpine as builder | ||
RUN apk update && \ | ||
apk upgrade && \ | ||
apk add \ | ||
bash \ | ||
gcc | ||
COPY . /tmp/catenasys/sxtctl | ||
WORKDIR /tmp/catenasys/sxtctl | ||
RUN bash ./scripts/build | ||
|
||
FROM scratch | ||
WORKDIR / | ||
COPY --from=builder /tmp/catenasys/sxtctl/target /target | ||
|
||
COPY ./target /target | ||
ENTRYPOINT ["/target/sxtctl-linux-amd64"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST))) | ||
include $(MAKEFILE_DIR)/standard_defs.mk | ||
|
||
clean: clean_go | ||
clean: clean_build_go | ||
|
||
distclean: clean_docker | ||
|
||
build: $(MARKERS)/build_docker | ||
build: $(MARKERS)/build_go $(MARKERS)/build_docker | ||
|
||
analyze: analyze_fossa | ||
test: $(MARKERS)/test_go | ||
|
||
.PHONY: build_dev | ||
build_dev: | ||
(cd ./cmd/sxtctl && go build .) | ||
analyze: analyze_go analyze_fossa | ||
|
||
$(MARKERS)/build_go: $(MARKERS)/build_toolchain_docker | ||
$(TOOL) -w /project/cmd/sxtctl $(TOOLCHAIN_IMAGE) go build | ||
publish: gh-create-draft-release | ||
if [ "$(RELEASABLE)" = "yes" ]; then \ | ||
$(GH_RELEASE) upload $(VERSION) target/* ; \ | ||
fi | ||
|
||
.PHONY: clean_go | ||
clean_go: $(MARKERS)/build_toolchain_docker | ||
$(TOOL) $(TOOLCHAIN_IMAGE) go clean | ||
.PHONY: clean_docker | ||
clean_docker: clean_toolchain_docker | ||
docker rmi -f sxtctl:$(ISOLATION_ID) | ||
|
||
$(MARKERS)/build_docker: | ||
$(MARKERS)/build_docker: $(MARKERS)/build_go | ||
docker build -t sxtctl:$(ISOLATION_ID) . | ||
touch $@ | ||
|
||
.PHONY: clean_docker | ||
clean_docker: clean_toolchain_docker | ||
docker rmi -f sxtctl:$(ISOLATION_ID) | ||
.PHONY: analyze_dive | ||
analyze_dive: | ||
$(DIVE_ANALYZE) sxtctl:$(ISOLATION_ID) |
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
Oops, something went wrong.