-
Notifications
You must be signed in to change notification settings - Fork 31
/
jenkinsfile_dev
47 lines (39 loc) · 1.28 KB
/
jenkinsfile_dev
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
/*
* This pipeline script was created manually based on scripts created by jenkins-build-creator.
*
*/
@Library('integration-pipeline-library@master')
import com.synopsys.integration.pipeline.SimplePipeline
import com.synopsys.integration.Constants
properties(
[
limitBuildsToKeep(),
disableConcurrentBuilds(),
parameters(
[
selectBranch('origin/main')
]
),
defaultPipelineTriggers()
]
)
String emailRecipients = Constants.CENTRAL_INTEGRATIONS_TEAM_EMAIL
String gitUrl = 'https://github.com/synopsys-sig/detect-action.git'
String archivePattern = 'dist/*.js*'
node('integrations') {
SimplePipeline pipeline = new SimplePipeline(this)
pipeline.addCleanupStep('.')
String gitBranch = pipeline.determineGitBranch(params.BRANCH)
pipeline.setDirectoryFromBranch(gitBranch)
def gitStage = pipeline.addGitStage(gitUrl, gitBranch, false)
gitStage.setChangelog(true)
pipeline.addApiTokenStage()
pipeline.setUrl(gitUrl)
pipeline.setGithubCredentialsId(gitStage.getCredentialsId())
pipeline.addEmailPipelineWrapper(emailRecipients)
def buildStage = pipeline.addStage('Build'){
sh 'npm ci && npm run all'
}
pipeline.addArchiveStage(archivePattern)
pipeline.run()
}