-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
55 lines (49 loc) · 1.62 KB
/
Jenkinsfile
File metadata and controls
55 lines (49 loc) · 1.62 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
pipeline {
environment {
registryCredential = 'xe66gydo-gitlab'
}
agent any
stages {
stage('Build image') {
steps {
echo 'Starting to build docker image'
script {
docker.withRegistry('https://cs6-gitlab.cs6.fau.de:4567/xe66gydo/asssqlquestion', registryCredential ) {
def customImage = docker.build("cs6-gitlab.cs6.fau.de:4567/xe66gydo/asssqlquestion:${env.BUILD_ID}")
customImage.push()
customImage.push('latest')
}
}
}
}
stage('Deploy image') {
steps {
sshagent(['jenkins']) {
sh '''
ssh -o StrictHostKeyChecking=no xe66gydo@ilias.cs6.fau.de docker compose -f /opt/containers/ilias/docker-compose.yml up -d --pull always
'''
}
}
}
stage('Build phpdocs') {
agent {
docker {
image 'phpdoc/phpdoc:3'
args '--entrypoint ""'
}
}
steps {
sh 'phpdoc run -t public'
stash includes: 'public/**', name: 'docs'
}
}
stage('Deploy phpdocs') {
steps {
sshagent(['jenkins']) {
unstash 'docs'
sh 'rsync -av --delete -e "ssh -o StrictHostKeyChecking=no" public/ xe66gydo@ilias.cs6.fau.de:/opt/containers/phpdocs/src'
}
}
}
}
}