Files
homepage/Jenkinsfile
T
Georgios Jason Efstathiou dbeef8b3ee
Gitea/homepage/pipeline/head There was a failure building this commit
add a build setup that probably won't work but let's see
2024-12-22 19:53:49 +01:00

35 lines
568 B
Groovy

pipeline {
agent any
environment {
REGISTRY = "docker-registry.service.consul"
IMAGE_NAME = "homepage"
}
stages {
stage('Build') {
steps {
sh 'npm ci'
sh 'npm run build'
}
}
stage('Docker Build') {
steps {
script {
dockerImage = docker.build("$REGISTRY/$IMAGE_NAME")
}
}
}
stage('Docker Publish') {
steps {
script {
docker.withRegistry("http://$REGISTRY") {
dockerImage.push("latest")
}
}
}
}
}
}