forked from jstrachan/cloud-environments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
55 lines (51 loc) · 1.77 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
pipeline {
agent any
environment {
GKE_SA = credentials('gke-sa')
GH_CREDS = credentials('jx-pipeline-git-github-github')
GHE_CREDS = credentials('jx-pipeline-git-github-ghe')
JENKINS_CREDS = credentials('test-jenkins-user')
GIT_PROVIDER_URL = "https://github.beescloud.com"
}
stages {
stage('CI Build') {
when {
branch 'PR-*'
}
environment {
CLUSTER_NAME = "JXCE-$BRANCH_NAME-$BUILD_NUMBER"
ZONE = "europe-west1-c"
PROJECT_ID = "jenkinsx-dev"
SERVICE_ACCOUNT_FILE = "$GKE_SA"
GHE_TOKEN = "$GHE_CREDS_PSW"
JENKINS_PASSWORD="$JENKINS_CREDS_PSW"
JX_DISABLE_DELETE_APP = "true"
JX_DISABLE_DELETE_REPO = "true"
}
steps {
sh "jx step git credentials"
dir ('/home/jenkins/go/src/github.com/jenkins-x/godog-jx'){
git "https://github.com/jenkins-x/godog-jx"
sh "make configure-ghe"
}
sh "./jx/scripts/ci-gke.sh"
sh "jx version -b"
// lets test we have the jenkins token setup
sh "jx get pipeline"
dir ('/home/jenkins/go/src/github.com/jenkins-x/godog-jx'){
git "https://github.com/jenkins-x/godog-jx"
sh "make bdd-tests"
}
}
}
stage('Build and Push Release') {
when {
branch 'master'
}
steps {
// auto upgrade demo env
echo 'auto upgrades not yet implemented'
}
}
}
}