diff --git a/basic-nginx/.applier/group_vars/seed-hosts.yml b/basic-nginx/.applier/group_vars/seed-hosts.yml index d2f0597c..0f293412 100644 --- a/basic-nginx/.applier/group_vars/seed-hosts.yml +++ b/basic-nginx/.applier/group_vars/seed-hosts.yml @@ -1,5 +1,6 @@ source_code_url: https://github.com/redhat-cop/container-pipelines.git source_code_ref: master +skip_manual_promotion: false openshift_cluster_content: - object: projectrequest @@ -28,4 +29,5 @@ openshift_cluster_content: params: "{{ inventory_dir }}/../.openshift/builds/params" params_from_vars: SOURCE_REPOSITORY_URL: "{{ source_code_url }}" - SOURCE_REPOSITORY_REF: "{{ source_code_ref }}" \ No newline at end of file + SOURCE_REPOSITORY_REF: "{{ source_code_ref }}" + SKIP_MANUAL_PROMOTION: "{{ skip_manual_promotion }}" diff --git a/basic-nginx/.openshift/builds/template.yml b/basic-nginx/.openshift/builds/template.yml index 8e43d567..dabd89cc 100644 --- a/basic-nginx/.openshift/builds/template.yml +++ b/basic-nginx/.openshift/builds/template.yml @@ -40,6 +40,8 @@ objects: value: "${SOURCE_REPOSITORY_REF}" - name: "CONTEXT_DIR" value: "${CONTEXT_DIR}" + - name: "SKIP_MANUAL_PROMOTION" + value: "${SKIP_MANUAL_PROMOTION}" - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: @@ -84,6 +86,8 @@ parameters: required: true - description: Git branch/tag reference name: SOURCE_REPOSITORY_REF +- description: skip promotion flag so manual process is waived + name: SKIP_MANUAL_PROMOTION - description: Path within Git project to build; empty for root project directory. name: CONTEXT_DIR value: "basic-nginx" @@ -110,4 +114,4 @@ parameters: - description: Image stream tag for the image you'd like to use to build the application name: IMAGE_STREAM_TAG_NAME required: true - value: nginx:1.12 \ No newline at end of file + value: nginx:1.12 diff --git a/basic-nginx/Jenkinsfile b/basic-nginx/Jenkinsfile index 29d7fcaf..57d2bdf3 100644 --- a/basic-nginx/Jenkinsfile +++ b/basic-nginx/Jenkinsfile @@ -1,4 +1,4 @@ -library identifier: "pipeline-library@v1.5", +library identifier: "pipeline-library@1.6", retriever: modernSCM( [ $class: "GitSCMSource", @@ -64,7 +64,9 @@ pipeline { stage('Promotion gate (Stage)') { steps { script { - input message: 'Promote Application to Stage?' + if(!("${SKIP_MANUAL_PROMOTION}")) { + input message: 'Promote Application to Stage?' + } } } } @@ -84,7 +86,9 @@ pipeline { stage('Promotion gate (Prod)') { steps { script { - input message: 'Promote Application to Prod?' + if(!("${SKIP_MANUAL_PROMOTION}")) { + input message: 'Promote Application to Prod?' + } } } } diff --git a/basic-nginx/index.html b/basic-nginx/index.html index f5fce07b..9a992297 100644 --- a/basic-nginx/index.html +++ b/basic-nginx/index.html @@ -241,4 +241,4 @@

For more information and help

- \ No newline at end of file +