26 lines
689 B
Plaintext
26 lines
689 B
Plaintext
pipeline {
|
|
agent {
|
|
node {
|
|
label 'docker' //Agent needs to have Docker Engine installed
|
|
}
|
|
}
|
|
stages {
|
|
stage('Checkout') {
|
|
steps {
|
|
// Get some code from a GIT repository
|
|
git 'https://git.agile611.com/Agile611/the-example-app-nodejs.git'
|
|
}
|
|
}
|
|
stage('Docker Build') {
|
|
steps {
|
|
sh 'docker build -t the-example-app.nodejs .'
|
|
}
|
|
}
|
|
stage('Docker Run') {
|
|
steps {
|
|
// Run Docker image on port 3000
|
|
sh 'docker run -p 3000:3000 -d the-example-app.nodejs'
|
|
}
|
|
}
|
|
}
|
|
} |