Jenkinsfile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. - '/usr/bin/sleep 999999'
  11. volumeMounts:
  12. - name: docker-config
  13. mountPath: /kaniko/.docker/
  14. dnsPolicy: "None"
  15. dnsConfig:
  16. nameservers:
  17. - 10.42.42.239
  18. - 10.42.42.1
  19. searches:
  20. - default.svc.cluster.local
  21. - svc.cluster.local
  22. - cluster.local
  23. options:
  24. - name: ndots
  25. value: "2"
  26. - name: edns0
  27. - name: trust-ad
  28. volumeMounts:
  29. - name: docker-cfg
  30. mountPath: /kaniko/.docker
  31. volumes:
  32. - name: docker-config
  33. secret:
  34. secretName: docker-regcred
  35. items:
  36. - key: .dockerconfigjson
  37. path: config.json
  38. '''
  39. ) {
  40. node(POD_LABEL) {
  41. stage('Stage 1: Build with Kaniko') {
  42. container('kaniko') {
  43. sh '/kaniko/executor --context="git://git.monkeybox.org/Containers/update-route53#refs/heads/main" \
  44. --destination="fdamstra/update-route53:latest" \
  45. --insecure \
  46. --skip-tls-verify \
  47. -v=debug'
  48. }
  49. }
  50. }
  51. }