Skip to content

Commit

Permalink
[patch] fix shared-certificates not found in pipeline run (#982)
Browse files Browse the repository at this point in the history
  • Loading branch information
conradkao authored May 21, 2024
1 parent b3a48c2 commit 134e88b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function install_pipelinerun_prepare() {
oc -n $PIPELINES_NS delete secret pipeline-additional-configs --ignore-not-found=true &>> $LOGFILE
oc -n $PIPELINES_NS delete secret pipeline-sls-entitlement --ignore-not-found=true &>> $LOGFILE
oc -n $PIPELINES_NS delete secret pipeline-pod-templates --ignore-not-found=true &>> $LOGFILE
oc -n $PIPELINES_NS delete secret pipeline-certificates --ignore-not-found=true &>> $LOGFILE

# Create new secrets
if [ "$LOCAL_MAS_CONFIG_DIR" != "" ]; then
Expand All @@ -62,6 +63,9 @@ function install_pipelinerun_prepare() {

oc -n $PIPELINES_NS create secret generic pipeline-sls-entitlement --from-file=$SLS_LICENSE_FILE_LOCAL &>> $LOGFILE

# pipeline-certificates must exist. It could be an empty secret at the first place before customer configure it
oc -n $PIPELINES_NS create secret generic pipeline-certificates &>> $LOGFILE

if [ "MAS_POD_TEMPLATES_DIR" != "" ]; then
oc -n $PIPELINES_NS create secret generic pipeline-pod-templates \
--from-file=${MAS_POD_TEMPLATES_DIR:+$MAS_POD_TEMPLATES_DIR/ibm-mas-bascfg.yml} \
Expand Down
6 changes: 6 additions & 0 deletions image/cli/mascli/templates/pipelinerun-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -524,3 +524,9 @@ spec:
- name: shared-pod-templates
secret:
secretName: pipeline-pod-templates

# Certificates configurations
# -------------------------------------------------------------------------
- name: shared-certificates
secret:
secretName: pipeline-certificates

0 comments on commit 134e88b

Please sign in to comment.