-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
31 lines (30 loc) · 1.17 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
pipeline {
agent {
dockerfile true
}
parameters {
string(name: 'ServerPort', defaultValue: '8080', description: 'The tcp port to listen on')
string(name: 'DBServer', defaultValue: '127.0.0.1', description: 'The name/ip of the DB server')
string(name: 'DBPort', defaultValue: '3306', description: 'The tcp port of the DB server')
string(name: 'DBName', defaultValue: 'dbTest2', description: 'The database name on the DB server')
//string(name: 'DBUser', defaultValue: 'test', description: 'The name of the DB service user')
//password(name: 'DBPassword', description: 'Password of the DB service user')
}
environment {
SERVER_PORT = "${params.ServerPort}"
DB_SERVER = "${params.DBServer}"
DB_PORT = "${params.DBPort}"
DB_NAME = "${params.DBName}"
DB_IDENTITY = credentials('db-identity')
DB_USER = "${DB_IDENTITY_USR}"
DB_PASSWORD = "${DB_IDENTITY_PSW}"
}
stages {
stage('Test') {
steps {
sh 'netstat -ltn | grep -qE "^[^:]*:+8080\\>"'
}
}
}
}
// vim: set ft=groovy sw=4 ts=4 et indk= :