File tree Expand file tree Collapse file tree 1 file changed +41
-29
lines changed Expand file tree Collapse file tree 1 file changed +41
-29
lines changed Original file line number Diff line number Diff line change 11pipeline {
2- agent any
3-
4- tools {nodejs " node" }
2+ agent any
3+ tools {nodejs " node16" }
4+ environment {
5+ NODE_ENV = ' production'
6+ }
57
6- stages {
8+
9+ stages {
10+ stage(' source' ) {
11+ steps {
12+ git ' https://github.com/sd031/aws_codebuild_codedeploy_nodeJs_demo.git'
13+
14+ }
15+
16+ }
717
8- stage(' Source:Git' ) {
9- steps {
10- git ' https://github.com/sd031/aws_codebuild_codedeploy_nodeJs_demo.git'
11- }
12- }
13-
14- stage(' Build:Node' ) {
15- steps {
16- sh ' npm install'
17- // sh '<<Build Command>>' run any commands as needed
18- }
19- }
18+ stage(' build' ) {
19+ environment{
20+ NODE_ENV = ' StagingGitTest'
21+ }
22+
23+
24+ steps {
25+ echo NODE_ENV
26+ withCredentials([string(credentialsId : ' e8f8ff88-49e0-433a-928d-36a518cd30d6' , variable : ' secver' )]) {
27+ // some block
28+ echo secver
29+ }
30+ sh ' npm install'
31+ }
2032
21- // stage('Test') {
22- // steps {
23- // sh 'node test'
24- // }
25- // }
26-
27- stage( ' Save:Artifact ' ) {
28- steps {
29- archiveArtifacts artifacts : . /
30- }
31- }
32- }
33- }
33+ }
34+
35+ stage( ' saveArtifact ' ) {
36+ steps {
37+ archiveArtifacts artifacts : ' ** ' , followSymlinks : false
38+ }
39+
40+ }
41+
42+
43+
44+ }
45+ }
You can’t perform that action at this time.
0 commit comments