-
Notifications
You must be signed in to change notification settings - Fork 25
/
Jenkinsfile
60 lines (57 loc) · 1.63 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/env groovy
def githubApiTokenCredentialsId = 'docs-robot-api-key'
def githubApiTokenCredentials = string(credentialsId: githubApiTokenCredentialsId, variable: 'GITHUB_API_TOKEN')
// Jenkins job configuration
// -------------------------
// Category: Multibranch Pipeline
// Pipeline name: release-docs-ui-bundle
// Branch Sources: Single repository & branch
// Name: master
// Source Code Management: Git
// Repository URL: https://github.com/couchbase/docs-ui
// Credentials: - none -
// Refspec: +refs/heads/master:refs/remotes/origin/master
// Branch specifier: refs/heads/master
// Advanced clone behaviors: [ ] Fetch tags, [x] Honor refspec on initial clone, [x] Shallow clone (depth: 3)
// Polling ignores commits with certain messages: (?s)(?:Release v\d+|.*\[skip .+?\]).*
// Build Configuration:
// Mode: by Jenkinsfile
// Script Path: Jenkinsfile
// [x] Discard old items: Days to keep old items: 60
pipeline {
agent any
options {
disableConcurrentBuilds()
}
stages {
stage('Configure') {
steps {
script {
properties([
[$class: 'GithubProjectProperty', projectUrlStr: env.GIT_URL],
pipelineTriggers([githubPush()]),
])
}
}
}
stage('Install') {
steps {
nodejs('node10') {
sh 'npm install --quiet --no-progress --cache=.cache/npm --no-audit'
}
}
}
stage('Release') {
steps {
dir('public') {
deleteDir()
}
withCredentials([githubApiTokenCredentials]) {
nodejs('node10') {
sh '$(npm bin)/gulp release'
}
}
}
}
}
}