-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstage.yaml
71 lines (71 loc) · 3.16 KB
/
stage.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
job:
preconfigured:
kubernetes:
- label: CopyDockerImage
type: copyDockerImage
description: Copy/promote a docker image from one registry to the other
cloudProvider: kubernetes
account: kubernetes
credentials: kubernetes
waitForCompletion: true
application: k8s2
parameters:
- name: SOURCE
label: Source docker image uri
description: Source uri to copy the image from (see https://github.com/containers/skopeo#copying-images).
mapping: manifest.spec.template.spec.containers[0].env[0].value
defaultValue: "docker://docker.io/nginx:1.17"
- name: DESTINATION
label: Destination docker image uri
description: Destination uri to copy the image to (see https://github.com/containers/skopeo#copying-images).
mapping: manifest.spec.template.spec.containers[0].env[1].value
defaultValue: "docker://devopsdemospinnaker.azurecr.io/nginx:v1.17"
- name: SOURCE_SECRET_NAME
label: Source secret name
description: The secret that contains the source secret
mapping: manifest.spec.template.spec.containers[0].env[2].valueFrom.secretKeyRef.name
defaultValue: "copy-image-secrets"
- name: SOURCE_SECRET_KEY
label: Source secret key
description: The key that contains the source secret (format: "user:password")
mapping: manifest.spec.template.spec.containers[0].env[2].valueFrom.secretKeyRef.key
defaultValue: "dev"
- name: DESTINATION_SECRET_NAME
label: Destination secret name
description: The secret that contains the destination secret
mapping: manifest.spec.template.spec.containers[0].env[3].valueFrom.secretKeyRef.name
defaultValue: "copy-image-secrets"
- name: DESTINATION_SECRET_KEY
label: Destination secret key
description: The key that contains the destination secret (format: "user:password")
mapping: manifest.spec.template.spec.containers[0].env[3].valueFrom.secretKeyRef.key
defaultValue: "prod"
manifest:
apiVersion: batch/v1
kind: Job
metadata:
name: copy-docker-image
namespace: spinnaker
spec:
backoffLimit: 0
template:
spec:
restartPolicy: Never
containers:
- name: copy-docker-image
image: butzist/copy-docker-image:latest
env:
- name: SOURCE
value: invalid
- name: DESTINATION
value: invalid
- name: SOURCE_CREDENTIALS
valueFrom:
secretKeyRef:
name: invalid
key: invalid
- name: DESTINATION_CREDENTIALS
valueFrom:
secretKeyRef:
name: invalid
key: invalid