-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
45 lines (33 loc) · 996 Bytes
/
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
pipeline {
agent any
tools {nodejs "node16" }
environment {
NODE_ENV='production'
}
stages {
stage('source') {
steps {
git 'https://github.com/sd031/aws_codebuild_codedeploy_nodeJs_demo.git'
sh 'cat index.js'
}
}
stage('build') {
environment{
NODE_ENV='StagingGitTest'
}
steps {
echo NODE_ENV
withCredentials([string(credentialsId: 'e8f8ff88-49e0-433a-928d-36a518cd30d6', variable: 'secver')]) {
// some block
echo secver
}
sh 'npm install'
}
}
stage('saveArtifact') {
steps {
archiveArtifacts artifacts: '**', followSymlinks: false
}
}
}
}