-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
28 lines (26 loc) · 903 Bytes
/
Jenkinsfile
File metadata and controls
28 lines (26 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
def deploy = {
sh 'mkdir -p /home/sr/semantickernel'
sh 'cp presentation/docker-compose.yml /home/sr/semantickernel/docker-compose.yml'
withCredentials([string(credentialsId: 'cf94de35-0bd9-4cda-898c-b2ea4c72a4c0', variable: 'dockerKey')]) {
sh 'echo ${dockerKey} | docker login ghcr.io -u joshendriks --password-stdin'
dir("/home/sr/semantickernel") {
sh 'docker compose pull'
sh 'docker compose up -d'
}
sh 'docker logout'
}
withCredentials([string(credentialsId: 'ntfy-basic-auth', variable: 'authString')]) {
sh 'curl -H "Authorization: basic ${authString}" -d "semantic kernel deployed" https://notify.netwatwezoeken.nl/deploy'
}
}
pipeline {
agent none
stages {
stage('Deploy') {
agent { label 'soyo' }
steps {
script {deploy ()}
}
}
}
}