Update Jenkinsfile
This commit is contained in:
24
Jenkinsfile
vendored
24
Jenkinsfile
vendored
@@ -1,20 +1,30 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
|
||||||
|
environment {
|
||||||
|
registry = "trance0/notenextra"
|
||||||
|
version = "1.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
agent { dockerfile true }
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
|
||||||
steps {
|
|
||||||
echo 'Building..'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Test') {
|
stage('Test') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Testing..'
|
echo 'Testing..'
|
||||||
|
sh 'npm install'
|
||||||
|
sh 'npm run build'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
echo "Building docker image ${registry}:${version}.${env.BUILD_ID}"
|
||||||
|
customImage = docker.build("${registry}:${version}.${env.BUILD_ID}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Deploying....'
|
echo "Deploying docker image ${registry}:${version}.${env.BUILD_ID}"
|
||||||
|
customImage.push()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user