Files
trianta.dev/Jenkinsfile
T

48 lines
1.3 KiB
Groovy
Raw Normal View History

2024-09-17 02:31:19 -05:00
pipeline {
agent { label 'agent-12' }
2024-09-17 02:31:19 -05:00
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Build') {
steps {
script {
docker.build('trianta.dev:latest')
2024-09-17 02:31:19 -05:00
}
}
}
stage('Deploy') {
2024-09-17 02:46:51 -05:00
steps {
sh 'docker stop trianta.dev && docker rm trianta.dev || exit 0'
sh 'docker run -d -e USER=scv -e USER_UID=1001-e USER_GID=1001 --restart=unless-stopped -p 3466:80 --name trianta.dev trianta.dev:latest'
}
}
}
}
pipeline {
agent { label 'agent-13' }
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Build') {
steps {
script {
docker.build('trianta.dev:latest')
}
}
}
stage('Deploy') {
steps {
sh 'docker stop test.trianta.dev && docker rm test.trianta.dev || exit 0'
sh 'docker run -d -e USER=scv -e USER_UID=1001-e USER_GID=1001 --restart=unless-stopped -p 3466:80 --name test.trianta.dev test.trianta.dev:latest'
2024-09-17 02:46:51 -05:00
}
2024-09-17 02:31:19 -05:00
}
}
}