-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
46 lines (39 loc) · 1.1 KB
/
Jenkinsfile
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
38
39
40
41
42
43
44
45
46
pipeline {
agent {
label 'jenkins-build-node'
}
triggers {
GenericTrigger(
genericVariables: [
[key: 'ref', value: '$.ref'],
[key: 'html_url', value: '$.repository.html_url'],
],
causeString: 'Triggered on $html_url/$ref',
token: 'jenkins-webhook-jhgdd2wha12kskas43d',
printContributedVariables: true,
printPostContent: true,
silentResponse: false,
regexpFilterText: '$html_url/$ref',
regexpFilterExpression: 'https://github.com/(jijo070)/(bulletin-board)/refs/heads/(master%7Cmain)'
)
}
stages {
stage('Generate Token') {
steps {
sh '''
cd /home/deploy/jenkins/workspace/
token=$(ruby generate-jwt-token.rb)
'''
}
}
stage('Git Clone') {
steps {
sh '''
rm -rf bulletin-board/
git clone https://x-access-token:[email protected]/Jijo070/bulletin-board
ls -ltra && cd bulletin-board/ && ls -ltra
'''
}
}
}
}