This commit is contained in:
12
Jenkinsfile
vendored
12
Jenkinsfile
vendored
@@ -1,9 +1,14 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
|
parameters {
|
||||||
|
choice(name: 'USER_NAME', choices: ['lucas', 'cyrus'], description: 'Quelle instance déployer ?')
|
||||||
|
}
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
GITEA_REPO_PATH = "lucas/uptime-kuma"
|
GITEA_REPO_PATH = "lucas/uptime-kuma"
|
||||||
GITEA_API_URL = "https://gitea.lucasroyer.fr/api/v1"
|
GITEA_API_URL = "https://gitea.lucasroyer.fr/api/v1"
|
||||||
|
DOCKER_HOST = "unix:///run/user/1001/docker.sock"
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
@@ -14,8 +19,11 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
steps {
|
steps {
|
||||||
echo "Deploy new kuma..."
|
echo "Deploy new kuma for ${params.USER_NAME}..."
|
||||||
sh "docker compose up -d --remove-orphans"
|
sh """
|
||||||
|
USER_NAME=${params.USER_NAME} \
|
||||||
|
docker compose -p ${params.USER_NAME} up -d --force-recreate --remove-orphans
|
||||||
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
services:
|
services:
|
||||||
uptime-kuma:
|
uptime-kuma:
|
||||||
image: louislam/uptime-kuma:2.0.2-slim
|
image: louislam/uptime-kuma:2.0.2-slim
|
||||||
container_name: uptime-kuma
|
container_name: uptime-kuma-${USER_NAME}
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- uptime_kuma_data:/app/data
|
- data:/app/data
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
networks:
|
networks:
|
||||||
- reverse-proxy
|
- reverse-proxy
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
uptime_kuma_data:
|
data:
|
||||||
external: true
|
external: true
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
Reference in New Issue
Block a user