add demo app
This commit is contained in:
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Proves HOOK_IMAGE_TAG is actually populated post-build (empty during
|
||||
# pre_build, since buildDocker hasn't set env.TAG yet at that point).
|
||||
set -e
|
||||
echo "post_build hook: ${HOOK_REPO} built and pushed as tag ${HOOK_IMAGE_TAG}"
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
# Runs in the docker-cli container (Alpine, no Go toolchain — the actual
|
||||
# Go build happens inside the Dockerfile's golang:1.22-alpine builder
|
||||
# stage, not on the agent itself). Kept simple on purpose: this exists to
|
||||
# prove the hooks mechanism runs, not to be a real lint step.
|
||||
set -e
|
||||
echo "pre_build hook running for ${HOOK_REPO} (phase=${HOOK_PHASE})"
|
||||
test -f go.mod || { echo "go.mod missing"; exit 1; }
|
||||
test -f Dockerfile || { echo "Dockerfile missing"; exit 1; }
|
||||
echo "go.mod and Dockerfile both present — looks buildable."
|
||||
Reference in New Issue
Block a user