Created
April 8, 2021 22:53
-
-
Save mingyuchoo/f8b43c2b446eefff9c34883fb7524f6f to your computer and use it in GitHub Desktop.
Jenkinsfile for sample project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent any | |
stages { | |
stage ('clone-project-from-git - Checkout') { | |
steps { | |
checkout( | |
[$class: 'GitSCM', branches: [[name: '*/develop']], | |
doGenerateSubmoduleConfigurations: false, | |
extensions: [], | |
submoduleCfg: [], | |
userRemoteConfigs: [[credentialsId: '', url: 'https://github.com/mingyuchoo/sample']]] | |
) | |
} | |
} | |
stage('Build') { | |
steps { | |
echo 'Building..' | |
sh "npm install" | |
} | |
} | |
stage('Unit Test') { | |
steps { | |
echo 'Testing..' | |
sh "npm run test:unit" | |
} | |
} | |
stage('Module Test') { | |
steps { | |
echo 'Testing..' | |
sh "npm run test:module" | |
} | |
} | |
stage('Deploy') { | |
steps { | |
echo 'Deploying....' | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment