@@ -163,6 +163,86 @@ Email will be sent with log
163163*****************************************
164164TRIGGERS
165165
166+ TRIGGERS
167+
168+ If we want to automatically trigger a Job
169+
170+ Build triggers for any job:
171+
172+ 1. Trigger builds remotely (e.g., from scripts)
173+
174+ Select the above very first option
175+ give Authentication token as : token1
176+ any unique token number
177+
178+ And then copy the path provided below in this format:
179+ JENKINS_URL/job/job4/build?token=TOKEN_NAME
180+
181+
182+ update the above url in this way:
183+ Jenkins_URL: Curent url :http://3.140.252.165:8080
184+ Token_NAME: token number/name provided above
185+
186+ Take this path and execute on anyother browser.
187+
188+ http://3.140.252.165:8080//job/job4/build?token=token1
189+
190+ Login as admin admin
191+ you can run that job.
192+
193+ 2. GitHub hook trigger for GITScm polling
194+
195+ > Select the above option
196+
197+ Save the job and now go to git hub
198+
199+ Always save the job and then only go to git hub, perform these steps
200+
201+ go to the repository setting
202+ select webhooks on left side
203+ delete if any exisitng webhook
204+
205+ click on createwebhook on right side
206+
207+ provide following information:
208+
209+ Payload URL : jenkinsurl/github-webhook/ ===> http://3.140.252.165:8080/github-webhook/
210+
211+ Content type : select application/json
212+
213+ Secret: no need of any value
214+
215+ Which events would you like to trigger this webhook?
216+
217+ select first option -- Just the push event.
218+
219+ Select Active
220+ click on add webhook.
221+
222+ now make some changes in repo,
223+ go to jenkins--> you will see a new build has been created
224+
225+ 3. Trigger prieodically
226+
227+ Create anew Job--> build trigger--> build preodically --> give */2 * * * * --> Save and build now
228+ All build will be genrated automatically every 2 mins
229+
230+ 4. Trigger by POLL SCM
231+
232+ Create a new Job-->Source code management--> Add git path
233+
234+ https://github.com/Sonal0409/GITHUBJENKINSDEMO
235+
236+ Build Triggers--> Poll SCM --> * * * * *
237+
238+ Build will be generated each time there is a chnage in the repository only.
239+
240+ *********************************
241+
242+
243+
244+ *********************
245+
166246If we want to automatically trigger a Job
167247
1682481. Trigger prieodically
0 commit comments