Pārlūkot izejas kodu

Automated builds

Fred Damstra (k8s1) 2 gadi atpakaļ
vecāks
revīzija
beef0934be
2 mainītis faili ar 21 papildinājumiem un 0 dzēšanām
  1. 1 0
      Dockerfile
  2. 20 0
      Jenkinsfile

+ 1 - 0
Dockerfile

@@ -3,6 +3,7 @@ LABEL maintainer="fred.damstra@gmail.com"
 LABEL version="0.1"
 LABEL description="Docker image that sorts my midjourney albums"
 
+RUN echo -e "search default.svc.cluster.local svc.cluster.local cluster.local\nnameserver 10.152.183.10\noptions ndots:2" > /etc/resolv.conf
 RUN apk add --no-cache bash bash-completion
 
 COPY . /opt/midjourney/

+ 20 - 0
Jenkinsfile

@@ -0,0 +1,20 @@
+def label = "$JOB_NAME.$BUILD_NUMBER-pipeline"
+ 
+podTemplate(label: label, containers: [
+ containerTemplate(name: 'kaniko', image: 'gcr.io/kaniko-project/executor:debug', command: '/busybox/cat', ttyEnabled: true)
+],
+volumes: [
+   secretVolume(mountPath: '/kaniko/.docker/', secretName: 'kaniko-secret')
+]) {
+ node(label) {
+   stage('Stage 1: Build with Kaniko') {
+     container('kaniko') {
+       sh '/kaniko/executor --context="git://git.monkeybox.org/Containers/$JOB_NAME#refs/heads/main" \
+               --destination="fdamstra/$JOB_NAME:latest" \
+               --insecure \
+               --skip-tls-verify  \
+               -v=debug'
+     }
+   }
+ }
+}