Skip to content

Commit 12245a8

Browse files
Merge pull request #33 from devdattakulkarni/cicd
cicd steps updated to include following:
2 parents 98e9ad5 + a4f9b09 commit 12245a8

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

CICD/cicd-steps.txt

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,32 @@ B] Setup your Jenkins Server/Machine 2:
113113
The pasting operation will unevenly break the key into multiple lines. Find such lines
114114
and remove any extra spaces by hitting the Backspace key.
115115

116+
2) Configure authentication for gcloud CLI
117+
- gcloud auth login --> Follow the prompts (you will have to open browser window and paste the generated link,
118+
then paste the generated code in the verification field in your console.)
119+
- Create Project in Google Cloud Console --> Note down the Project ID. Remember that Project ID is different than the Project's Name.
120+
You will need Project ID in subsequent steps.
121+
- export PROJECT_ID=<Project-ID-from-previous-step>
122+
- export CLOUDSDK_COMPUTE_ZONE=us-central1-b
123+
- gcloud config set project ${PROJECT_ID}
116124

125+
3) Disable Host key verification:
126+
- create .ssh/config file
127+
- Include following lines in it:
128+
Host *
129+
StrictHostKeyChecking no
117130

118-
2) Download and Start Jenkins Server:
131+
4) Download and Start Jenkins Server:
119132
- wget http://mirrors.jenkins.io/war-stable/latest/jenkins.war
120-
- java -jar jenkins.war --httpPort=8080
133+
- nohup java -jar jenkins.war --httpPort=8080 &
121134

122-
3) Configure Jenkins Server
135+
5) Configure Jenkins Server
123136
- Point your browser to the DNS name of the Jenkins Server at port 8080
124137
https://<DNS-of-Jenkins-Server>:8080/
125138
- Enter admin password from $HOME/.jenkins/secrets/initialAdminPassword
126139
- Choose Install suggested plugins option
127140

128-
4) Once Jenkins starts up do following:
141+
6) Once Jenkins starts up do following:
129142
4.1) Login as admin user
130143
- Password is stored in: $HOME/.jenkins/secrets/initialAdminPassword
131144
4.2) Set the path in Jenkins for Git
@@ -144,7 +157,7 @@ B] Setup your Jenkins Server/Machine 2:
144157
- Choose Install without restarting option
145158

146159

147-
5) Add a WebHook to your Bitbucket repository
160+
7) Add a WebHook to your Bitbucket repository
148161
5.1) Go to your Bitbucket repository -> Settings -> Webhooks -> Add webhook
149162
- http://<DNS-of-Jenkins-server>:8080/bitbucket-hook/
150163
(Note: The trailing slash '/' is important. Don't forget that!!)
@@ -155,7 +168,7 @@ B] Setup your Jenkins Server/Machine 2:
155168
- Repository->Push, Pull Request->Created, Updated, Comment created, Comment updated, Comment deleted
156169
Issue->Created, Issue->Updated, Issue->Comment Created
157170

158-
6) Set up a Jenkins Job
171+
8) Set up a Jenkins Job
159172
6.1) Make sure your Bitbucket repository ("assignment6") is Public
160173
- This will make it possible to be cloned by Jenkins.
161174
6.2) Jenkins -> New Item -> Give name -> Select Freestyle project

0 commit comments

Comments
 (0)