feat: add pipeline
Some checks failed
perso/nanobot/pipeline/head There was a failure building this commit

This commit is contained in:
Julien Cabillot
2026-03-14 22:46:15 -04:00
commit 64e4b26c8b

39
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,39 @@
pipeline {
environment {
registry = 'https://registry.hub.docker.com'
registryCredential = 'dockerhub_jcabillot'
dockerImage = 'jcabillot/nanobot'
}
agent any
triggers {
cron('@midnight')
}
stages {
stage('Clone repository') {
steps{
checkout scm
}
}
stage('Build image') {
steps{
sh 'git clone "https://github.com/HKUDS/nanobot.git"'
sh 'docker build --force-rm=true --no-cache=true --pull -t ${dockerImage} -f nanobot/Dockerfile nanobot/'
}
}
stage('Deploy Image') {
steps{
script {
withCredentials([usernamePassword(credentialsId: 'dockerhub_jcabillot', usernameVariable: 'DOCKER_USER', passwordVariable: 'DOCKER_PASS')]) {
sh 'docker login --username ${DOCKER_USER} --password ${DOCKER_PASS}'
sh 'docker push ${dockerImage}'
}
}
}
}
}
}