##---
# Source: spinnaker/templates/hooks/upload-build-image.yaml
apiVersion: batch/v1
kind: Job
metadata:
  name: "RELEASE-NAME-upload-build-image"
  labels:
    app: RELEASE-NAME-spinnaker
    component: jenkins
  annotations:
    "helm.sh/hook": post-install
spec:
  template:
    metadata:
      labels:
        app: RELEASE-NAME-spinnaker
        component: jenkins
    spec:
      restartPolicy: OnFailure
      volumes:
      - name: jenkins-jobs
        configMap:
          name: RELEASE-NAME-jenkins-jobs
      containers:
      - name: post-install-job
        image: "viglesiasce/minio-client:v0.4.0"
        command:
        - curl
        - -X
        - POST
        - -H
        - "Content-Type: application/xml"
        - --retry
        - "20"
        - --retry-delay
        - "10"
        - --max-time
        - "3"
        - --data-binary
        - "@/jobs/build-image.xml"
        - "http://RELEASE-NAME-jenkins:8080/createItem?name=build-image"
        volumeMounts:
        - name: jenkins-jobs
          mountPath: /jobs
