forked from VeerMuchandi/bluegreen
-
Notifications
You must be signed in to change notification settings - Fork 11
/
pipeline-setup.sh
executable file
·37 lines (26 loc) · 1.23 KB
/
pipeline-setup.sh
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
#!/bin/bash
echo "Please enter your OpenShift hostname:port (https://<hostname>:<port>). The default used is the CDK @ https://10.1.2.2:8443: "
read hostname
jenkins_image="jenkins-ephemeral"
if [ -z "$hostname" ]; then
hostname="https://10.1.2.2:8443"
jenkins_image="jenkins"
fi
echo "Enter your username (default is openshift-dev): "
read username
if [ -z "$username" ]; then
username="openshift-dev"
fi
echo "Enter the url for your repository. If it's a specific branch you'd like to use, please append the branch to the url with '#<branch_name>' [default: https://github.com/tariq-islam/bluegreen]: "
read repository_path
if [ -z "$repository_path" ]; then
repository_path="https://github.com/tariq-islam/bluegreen"
echo "Using default repository at : " $repository_path
fi
oc login "$hostname" --insecure-skip-tls-verify -u "$username"
oc new-project app-dev --display-name="Application Development Environment"
oc new-app "$jenkins_image"
oc new-app php~https://github.com/tariq-islam/bluegreen
oc create -f https://raw.githubusercontent.com/tariq-islam/bluegreen/master/bluegreen-pipeline.yml
oc new-project app-qa --display-name="Application QA Environment"
oc new-project app-prod --display-name="Application Production Environment"