-
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.
- Loading branch information
Alexey Yakubov
authored and
Alexey Yakubov
committed
Jan 10, 2025
1 parent
b58fd1b
commit f9aecb4
Showing
6 changed files
with
119 additions
and
53 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,54 @@ | ||
# Required for external analytics. Do not remove! | ||
--- | ||
image: {{ $.ImageName }}-golang-artifact | ||
from: {{ $.Root.BASE_GOLANG_1_23 }} | ||
image: {{ $.ImageName }}-src-artifact | ||
from: {{ $.Root.BASE_ALT }} | ||
final: false | ||
|
||
git: | ||
- add: /images/webhooks/src | ||
to: /src | ||
- add: /images/{{ $.ImageName }}/src | ||
to: /src/images/{{ $.ImageName }}/src | ||
stageDependencies: | ||
install: | ||
- "**/*" | ||
- add: /api | ||
to: /src/api | ||
stageDependencies: | ||
setup: | ||
install: | ||
- "**/*" | ||
|
||
shell: | ||
install: | ||
- echo "src artifact" | ||
|
||
--- | ||
image: {{ $.ImageName }}-golang-artifact | ||
from: {{ $.Root.BASE_GOLANG_1_23 }} | ||
final: false | ||
|
||
import: | ||
- image: {{ $.ImageName }}-src-artifact | ||
add: / | ||
to: / | ||
before: setup | ||
|
||
mount: | ||
- fromPath: ~/go-pkg-cache | ||
to: /go/pkg | ||
shell: | ||
setup: | ||
- cd /src | ||
- GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o webhooks | ||
- mv webhooks /webhooks | ||
- chmod +x /webhooks | ||
- cd /src/images/{{ $.ImageName }}/src | ||
- GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o /{{ $.ImageName }} | ||
# - mv webhooks /webhooks | ||
- chmod +x /{{ $.ImageName }} | ||
--- | ||
image: {{ $.ImageName }} | ||
from: {{ $.Root.BASE_SCRATCH }} | ||
|
||
import: | ||
- image: {{ $.ImageName }}-golang-artifact | ||
add: /webhooks | ||
to: /webhooks | ||
add: /{{ $.ImageName }} | ||
to: /{{ $.ImageName }} | ||
before: setup | ||
|
||
docker: | ||
ENTRYPOINT: ["/webhooks"] | ||
ENTRYPOINT: ["/{{ $.ImageName }}"] |