jenkins(logging): split streaming harbor credentials
This commit is contained in:
parent
bd85143aa0
commit
c8f7cd6ec2
@ -45,6 +45,12 @@ data:
|
|||||||
username: "${HARBOR_ROBOT_USERNAME}"
|
username: "${HARBOR_ROBOT_USERNAME}"
|
||||||
password: "${HARBOR_ROBOT_PASSWORD}"
|
password: "${HARBOR_ROBOT_PASSWORD}"
|
||||||
description: "Harbor robot for pipelines"
|
description: "Harbor robot for pipelines"
|
||||||
|
- usernamePassword:
|
||||||
|
scope: GLOBAL
|
||||||
|
id: harbor-robot-streaming
|
||||||
|
username: "${HARBOR_STREAMING_ROBOT_USERNAME}"
|
||||||
|
password: "${HARBOR_STREAMING_ROBOT_PASSWORD}"
|
||||||
|
description: "Harbor robot for streaming pushes"
|
||||||
jobs.yaml: |
|
jobs.yaml: |
|
||||||
jobs:
|
jobs:
|
||||||
- script: |
|
- script: |
|
||||||
|
|||||||
@ -33,6 +33,14 @@ spec:
|
|||||||
{{ with secret "kv/data/atlas/jenkins/harbor-robot-creds" }}
|
{{ with secret "kv/data/atlas/jenkins/harbor-robot-creds" }}
|
||||||
HARBOR_ROBOT_USERNAME={{ .Data.data.username }}
|
HARBOR_ROBOT_USERNAME={{ .Data.data.username }}
|
||||||
HARBOR_ROBOT_PASSWORD={{ .Data.data.password }}
|
HARBOR_ROBOT_PASSWORD={{ .Data.data.password }}
|
||||||
|
HARBOR_STREAMING_ROBOT_USERNAME={{ .Data.data.username }}
|
||||||
|
HARBOR_STREAMING_ROBOT_PASSWORD={{ .Data.data.password }}
|
||||||
|
{{ end }}
|
||||||
|
{{ with secret "kv/data/atlas/jenkins/harbor-streaming-robot-creds" }}
|
||||||
|
{{- if and .Data.data.username .Data.data.password }}
|
||||||
|
HARBOR_STREAMING_ROBOT_USERNAME={{ .Data.data.username }}
|
||||||
|
HARBOR_STREAMING_ROBOT_PASSWORD={{ .Data.data.password }}
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with secret "kv/data/atlas/shared/harbor-pull" }}
|
{{ with secret "kv/data/atlas/shared/harbor-pull" }}
|
||||||
{{- if and .Data.data.username .Data.data.password }}
|
{{- if and .Data.data.username .Data.data.password }}
|
||||||
|
|||||||
@ -193,7 +193,7 @@ EOF
|
|||||||
stage('Build & Push') {
|
stage('Build & Push') {
|
||||||
steps {
|
steps {
|
||||||
container('kaniko') {
|
container('kaniko') {
|
||||||
withCredentials([usernamePassword(credentialsId: 'harbor-robot', usernameVariable: 'HARBOR_USERNAME', passwordVariable: 'HARBOR_PASSWORD')]) {
|
withCredentials([usernamePassword(credentialsId: 'harbor-robot-streaming', usernameVariable: 'HARBOR_USERNAME', passwordVariable: 'HARBOR_PASSWORD')]) {
|
||||||
sh '''
|
sh '''
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
IMAGE_TAG="${IMAGE_TAG:-2.8.0}"
|
IMAGE_TAG="${IMAGE_TAG:-2.8.0}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user