aboutsummaryrefslogtreecommitdiffstats
path: root/aai-resources/src/main/jenkins/Jenkinsfile
blob: c74d4393b1bede5059ac6f132e1e334f4ed33576 (plain)
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
node ("${BUILD_SLAVE}") {
  // get the jenkinsfile root directory
  def rootDir = pwd()
  
  def JAVA_HOME = tool 'jdk180' 
  env.PATH = "${JAVA_HOME}/bin:${env.PATH}" 
  sh 'which java' 
  sh 'java -version'
  
  env.DOCKER_HOST="tcp://localhost:4243"
  
  // load external groovy scripts
  def build
  def checkout
  def deploy
  dir('tmp') {
		git url: "${GIT_URL}", branch: "${GIT_BRANCH}"
		checkout = load 'src/main/jenkins/checkout.groovy'
		build = load 'src/main/jenkins/build.groovy'
		deploy = load 'src/main/jenkins/deploy.groovy'
    }
  
  // check out code from git
  checkout.gitCheckout()
  
  // build the git project 
  build.buildProject()
  
  deploy.deployService()
 
}