-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathJenkinsfile
More file actions
32 lines (30 loc) · 944 Bytes
/
Jenkinsfile
File metadata and controls
32 lines (30 loc) · 944 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
29
30
31
32
pipeline {
agent { label 'docker' }
options {
buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '3')
}
stages {
stage("Prune Docker Data") {
steps {
sh 'docker system prune -a --volumes -f'
}
}
stage("Start containers") {
steps {
sh 'docker compose up --no-color -d'
sh 'docker compose ps'
}
}
stage("Run tests against wordpress container") {
steps {
sh 'docker compose exec wordpress sh -c "curl -sL https://raw.githubusercontent.com/richardforth/wp_version_scanner/staging/wpscan.pl | perl - --nocolor --verbose"'
}
}
}
post {
always {
sh 'docker compose down --remove-orphans -v'
sh 'docker compose ps'
}
}
}