Jenkinsfile.withyaml.notworking 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. def label = "update-route53.$BUILD_NUMBER-pipeline"
  2. podTemplate(yaml: '''
  3. kind: Pod
  4. spec:
  5. containers:
  6. - name: kaniko
  7. image: gcr.io/kaniko-project/executor:v1.9.1-debug
  8. imagePullPolicy: Always
  9. command:
  10. - sleep
  11. args:
  12. - 99d
  13. volumeMounts:
  14. - name: docker-config
  15. mountPath: /kaniko/.docker/
  16. dnsPolicy: "None"
  17. dnsConfig:
  18. nameservers:
  19. - 10.42.42.239
  20. - 10.42.42.1
  21. searches:
  22. - default.svc.cluster.local
  23. - svc.cluster.local
  24. - cluster.local
  25. options:
  26. - name: ndots
  27. value: "2"
  28. - name: edns0
  29. - name: trust-ad
  30. volumeMounts:
  31. - name: docker-cfg
  32. mountPath: /kaniko/.docker
  33. volumes:
  34. - name: docker-config
  35. secret:
  36. secretName: docker-regcred
  37. items:
  38. - key: .dockerconfigjson
  39. path: config.json
  40. '''
  41. ) {
  42. node(POD_LABEL) {
  43. stage('Stage 1: Build with Kaniko') {
  44. container('kaniko') {
  45. sh '/kaniko/executor --context="git://git.monkeybox.org/Containers/update-route53#refs/heads/main" \
  46. --destination="fdamstra/update-route53:latest" \
  47. --insecure \
  48. --skip-tls-verify \
  49. -v=debug'
  50. }
  51. }
  52. }
  53. }