Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ pipeline {

stage('source') {
steps {
git credentialsId: '296b18ab-4260-44bd-ba13-0c8b6f6208a5', url: 'https://github.com/sd031/aws_codebuild_codedeploy_nodeJs_demo'
sh 'cat index.js'
checkout scm
sh 'ls -la'
}

}
Expand Down
Empty file added sample_file.txt
Empty file.
61 changes: 61 additions & 0 deletions singlebranh.Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
pipeline {
agent { label 'ec2Agent' }
tools {nodejs "node16" }
environment {
NODE_ENV='production'
}


stages {

stage('source') {
steps {
git credentialsId: '296b18ab-4260-44bd-ba13-0c8b6f6208a5', url: 'https://github.com/sd031/aws_codebuild_codedeploy_nodeJs_demo'
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
// }

// }



}

post {
always {
echo 'This will always run'
}
success {
echo 'This will run only if successful'
}
failure {
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]";
}
unstable {
echo 'This will run only if the run was marked as unstable'
}
}
}