-
Notifications
You must be signed in to change notification settings - Fork 3
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 #10 from y-eight/ci/gitlab
Ci/gitlab
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 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,10 @@ | ||
stages: | ||
- test | ||
- build | ||
- scan | ||
- push | ||
- sign | ||
|
||
include: | ||
- project: caas/cicd_templates | ||
file: ci_general.yml |
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,11 @@ | ||
FROM cgr.dev/chainguard/go:latest as gobuild | ||
WORKDIR /app | ||
ADD . . | ||
RUN go mod download | ||
RUN CGO_ENABLED=0 go build -ldflags "-s -w" -o canary . | ||
|
||
FROM scratch | ||
COPY --from=gobuild /app/canary /canary | ||
COPY --from=gobuild /etc/passwd /etc/passwd | ||
USER 65532 | ||
ENTRYPOINT ["/canary"] |