forked from candlepin/subscription-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
60 lines (60 loc) · 1.9 KB
/
Jenkinsfile
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
56
57
58
59
60
pipeline {
agent { label 'subman' }
options {
timeout(time: 15, unit: 'MINUTES')
}
environment {
REGISTRY_URL = 'quay.io/candlepin'
GIT_HASH = sh(returnStdout: true, script: "git rev-parse HEAD").trim()
PODMAN_USERNS = 'keep-id'
}
stages {
stage('Build Container') {
environment {
QUAY_CREDS = credentials('candlepin-quay-bot')
}
steps {
sh('./scripts/build_and_push.sh')
}
}
stage('Test') {
parallel {
stage('tito') {
steps {
sh('./jenkins/run.sh tito jenkins/tito.sh')
}
}
stage('unit') {
steps {
sh('./jenkins/run.sh unit jenkins/unit.sh')
}
post {
always {
archiveArtifacts allowEmptyArchive: true, artifacts: 'coverage.xml', fingerprint: true
// https://www.jenkins.io/doc/pipeline/steps/cobertura/
step([$class: 'CoberturaPublisher',
autoUpdateHealth: false,
autoUpdateStability: false,
coberturaReportFile: 'coverage.xml',
failNoReports: false,
failUnhealthy: false,
failUnstable: false,
maxNumberOfBuilds: 10,
onlyStable: false,
sourceEncoding: 'ASCII',
zoomCoverageChart: false])
// https://www.jenkins.io/doc/pipeline/steps/junit/
junit allowEmptyResults: true, keepLongStdio: true, skipMarkingBuildUnstable: true, skipPublishingChecks: true, testResults: 'coverage.xml'
}
}
}
// Unit tests of libdnf plugins
stage('libdnf') {
steps {
sh('./jenkins/run.sh libdnf jenkins/libdnf.sh')
}
}
}
}
}
}