-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathJenkinsfile
More file actions
46 lines (38 loc) · 1.27 KB
/
Copy pathJenkinsfile
File metadata and controls
46 lines (38 loc) · 1.27 KB
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
#!groovy
node {
def GITHUB_USER = "madoos"
def GITHUB_REPO = "sequelize-pg-stream"
def GITHUB_BRANCH = env.BRANCH_NAME
def GITHUB_TOKEN = env.GITHUB_TOKEN
def NPM_TOKEN = env.NPM_TOKEN
def DOCKER_USER = env.DOCKER_USER
def DOCKER_TOKEN = env.DOCKER_TOKEN
stage("checkout SCM"){
checkout scm
}
stage("Make Tests"){
sh "./bin/CI/test-builder ${GITHUB_USER} ${GITHUB_REPO} ${GITHUB_BRANCH} ${GITHUB_TOKEN}"
}
stage("publish Reports"){
publishHTML([
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: false, reportDir: "./report/coverage/lcov-report",
reportFiles: "index.html",
reportName: "Coverage Report"
])
publishHTML([
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: false, reportDir: "./report/linter/",
reportFiles: "index.html",
reportName: "Linter Report"
])
}
if( env.BRANCH_NAME ==~ /.*release.*/ ){
def PACKAGE_VERSION = sh (script: "./bin/CI/get-release ${GITHUB_BRANCH}", returnStdout: true)
stage("Publish package"){
sh "./bin/CI/npm-publisher ${GITHUB_USER} ${GITHUB_REPO} ${GITHUB_BRANCH} ${GITHUB_TOKEN} ${NPM_TOKEN} ${PACKAGE_VERSION}"
}
}
}