summaryrefslogtreecommitdiffci
path: root/Jenkinsfile
diff options
from:
to:
context:
space:
mode:
authorGravatar Saya Andy <saya.andy@posteo.com> 2026-06-22 21:55:11 +0700
committerGravatar Saya Andy <saya.andy@posteo.com> 2026-06-22 21:55:11 +0700
commit9f40b572cd96e44aa08814628b06f446fcf559ce (patch)
tree32ec6382bd659430b8a09a136fd004f7e23eb55e /Jenkinsfile
parent2cd4d07ae677bb79aaca144c87c4ee021fac8078 (diff)
downloadweb-9f40b572cd96e44aa08814628b06f446fcf559ce.tar.gz
web-9f40b572cd96e44aa08814628b06f446fcf559ce.zip
fix: specify resource constraints for kaniko container
fix: explicitly set goos/goarch for dockerfile
Diffstat (limited to 'Jenkinsfile')
-rw-r--r--Jenkinsfile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 2eb561b..c9103e8 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -48,6 +48,14 @@ spec:
imagePullPolicy: Always
command: [ /busybox/cat ]
tty: true
+ resources:
+ requests:
+ cpu: "1"
+ memory: 2Gi
+ ephemeral-storage: 4Gi
+ limits:
+ memory: 4Gi
+ ephemeral-storage: 8Gi
"""
}
}
@@ -69,7 +77,11 @@ spec:
if [ "$TAG_NAME" != "" ]; then
pushToTags="$pushToTags $IMAGE_PUSH_DESTINATION:stable $IMAGE_PUSH_DESTINATION:$TAG_NAME"
fi
- /kaniko/executor --context `pwd` --custom-platform=${GOOS}/${GOARCH} --destination $pushToTags
+ /kaniko/executor --context `pwd` \
+ --custom-platform=${GOOS}/${GOARCH} \
+ --build-arg TARGETOS=${GOOS}
+ --build-arg TARGETARCH=${GOARCH}
+ --destination $pushToTags
'''
} catch (Exception e) {
echo "Caught exception: ${e.getMessage()}"