-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Jenkinsfile
33 lines (33 loc) · 996 Bytes
/
.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
pipeline {
agent {
label 'master'
}
stages {
stage('Tests') {
agent {
docker {
image 'alexwijn/docker-git-php-composer'
reuseNode true
}
}
environment {
HOME = '.'
}
options {
skipDefaultCheckout()
}
steps {
withCredentials([string(credentialsId: 'jenkins_github_token', variable: 'GIT_TOKEN')]) {
sh(
label: 'Install/Update sources from Composer',
script: "COMPOSER_AUTH='{\"github-oauth\": {\"github.com\": \"$GIT_TOKEN\"}}\' composer install --no-interaction --no-ansi --no-progress"
)
}
sh(
label: 'Run backend tests',
script: './vendor/bin/phpunit'
)
}
}
}
}