Parameters in Jenkinsfile

https://www.notion.so/Parameters-in-Jenkinsfile-c42a2207b65f43df9ff6f78b2c4e17cb

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
node {
	stage('Start') {
		echo 'Testing..'
		print params
		if (params.b) {
			echo 'has b'
		}
		if (b == 'true') {
			echo 'b == true'
		}
		print 's:' + s
		echo 's: ' + s
      
		if (params.nn) {
			echo 'has nn'
		} else {
			echo 'nn undefined'
		}
	}

	stage('Build') {
		echo 'Building..'
	}

	stage('Test') {
		echo 'Testing..'
	}

	stage('Deploy') {
		echo 'Deploying....'
	}
}
This post is licensed under CC BY 4.0 by the author.