Skip to content

Commit 2001f96

Browse files
committed
changes
1 parent 3015238 commit 2001f96

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

sample_file.txt

Whitespace-only changes.

singlebranh.Jenkinsfile

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
pipeline {
2+
agent { label 'ec2Agent' }
3+
tools {nodejs "node16" }
4+
environment {
5+
NODE_ENV='production'
6+
}
7+
8+
9+
stages {
10+
11+
stage('source') {
12+
steps {
13+
git credentialsId: '296b18ab-4260-44bd-ba13-0c8b6f6208a5', url: 'https://github.com/sd031/aws_codebuild_codedeploy_nodeJs_demo'
14+
sh 'cat index.js'
15+
}
16+
17+
}
18+
19+
stage('build') {
20+
environment{
21+
NODE_ENV='StagingGitTest'
22+
}
23+
24+
25+
steps {
26+
echo NODE_ENV
27+
// withCredentials([string(credentialsId: 'e8f8ff88-49e0-433a-928d-36a518cd30d6', variable: 'secver')]) {
28+
// // some block
29+
// echo secver
30+
// }
31+
sh 'npm install'
32+
}
33+
34+
}
35+
36+
// stage('saveArtifact') {
37+
// steps {
38+
// archiveArtifacts artifacts: '**', followSymlinks: false
39+
// }
40+
41+
// }
42+
43+
44+
45+
}
46+
47+
post {
48+
always {
49+
echo 'This will always run'
50+
}
51+
success {
52+
echo 'This will run only if successful'
53+
}
54+
failure {
55+
mail bcc: '', body: "<b>Example</b><br>Project: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> URL de build: ${env.BUILD_URL}", cc: '', charset: 'UTF-8', from: '', mimeType: 'text/html', replyTo: '', subject: "ERROR CI: Project name -> ${env.JOB_NAME}", to: "[email protected]";
56+
}
57+
unstable {
58+
echo 'This will run only if the run was marked as unstable'
59+
}
60+
}
61+
}

0 commit comments

Comments
 (0)