Skip to content

Commit

Permalink
Basic-Nginx Removal of Input and Verify Gates (#143)
Browse files Browse the repository at this point in the history
* Removing Verify Gates and Manual Promotion Gate

* Added variable to skip promotion gate

* Adjusted Spacing

* Update index.html
  • Loading branch information
kenwilli committed Jun 10, 2020
1 parent 2ba8d5b commit d5959a2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
4 changes: 3 additions & 1 deletion basic-nginx/.applier/group_vars/seed-hosts.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 }}"
SOURCE_REPOSITORY_REF: "{{ source_code_ref }}"
SKIP_MANUAL_PROMOTION: "{{ skip_manual_promotion }}"
6 changes: 5 additions & 1 deletion basic-nginx/.openshift/builds/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand All @@ -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
value: nginx:1.12
10 changes: 7 additions & 3 deletions basic-nginx/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library identifier: "pipeline-library@v1.5",
library identifier: "pipeline-library@1.6",
retriever: modernSCM(
[
$class: "GitSCMSource",
Expand Down Expand Up @@ -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?'
}
}
}
}
Expand All @@ -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?'
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion basic-nginx/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,4 @@ <h3>For more information and help</h3>


</body>
</html>
</html>

0 comments on commit d5959a2

Please sign in to comment.