Skip to content

Instantly share code, notes, and snippets.

@mingyuchoo
Created April 8, 2021 22:53
Show Gist options
  • Save mingyuchoo/f8b43c2b446eefff9c34883fb7524f6f to your computer and use it in GitHub Desktop.
Save mingyuchoo/f8b43c2b446eefff9c34883fb7524f6f to your computer and use it in GitHub Desktop.
Jenkinsfile for sample project
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