diff options
Diffstat (limited to 'aai-resources/src/main/jenkins')
-rw-r--r-- | aai-resources/src/main/jenkins/Jenkinsfile | 31 | ||||
-rw-r--r-- | aai-resources/src/main/jenkins/build.groovy | 14 | ||||
-rw-r--r-- | aai-resources/src/main/jenkins/checkout.groovy | 14 | ||||
-rw-r--r-- | aai-resources/src/main/jenkins/deploy.groovy | 15 |
4 files changed, 0 insertions, 74 deletions
diff --git a/aai-resources/src/main/jenkins/Jenkinsfile b/aai-resources/src/main/jenkins/Jenkinsfile deleted file mode 100644 index c74d439..0000000 --- a/aai-resources/src/main/jenkins/Jenkinsfile +++ /dev/null @@ -1,31 +0,0 @@ -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() - -}
\ No newline at end of file diff --git a/aai-resources/src/main/jenkins/build.groovy b/aai-resources/src/main/jenkins/build.groovy deleted file mode 100644 index 3170510..0000000 --- a/aai-resources/src/main/jenkins/build.groovy +++ /dev/null @@ -1,14 +0,0 @@ - - -def buildProject() { - stage 'Build Git Project' - wrap([$class: 'ConfigFileBuildWrapper', managedFiles: [[fileId: 'eb0c7cc1-e851-4bc2-9401-2680c225f88c', targetLocation: '', variable: 'MAVEN_SETTINGS']]]) { - mvn '-s $MAVEN_SETTINGS -f pom.xml' -} -} - -def mvn(args) { - sh "${tool 'maven3'}/bin/mvn ${args} ${MAVEN_GOALS}" -} - -return this
\ No newline at end of file diff --git a/aai-resources/src/main/jenkins/checkout.groovy b/aai-resources/src/main/jenkins/checkout.groovy deleted file mode 100644 index ed439ec..0000000 --- a/aai-resources/src/main/jenkins/checkout.groovy +++ /dev/null @@ -1,14 +0,0 @@ - -def gitCheckout() { - stage 'Checkout GIT' - //different ways to checkout - //checkout from master - //git "url: ${GIT_URL}, branch: ${GIT_BRANCH}" - //checkout from branch hardcoding" - //git branch: 'jenkins_deploy_test', credentialsId: 'b9bbafe5-53ce-4d2c-8b84-09137f75c592', url: 'https://codecloud.web.att.com/scm/st_ocnp/sdk-java-starter.git' - //checkout from branch parameters with credentials - //git branch: "${GIT_BRANCH}", credentialsId: 'b9bbafe5-53ce-4d2c-8b84-09137f75c592', url: "${GIT_URL}" - //checkout from branch parameters with no credentials - git branch: "${GIT_BRANCH}", url: "${GIT_URL}" -} -return this
\ No newline at end of file diff --git a/aai-resources/src/main/jenkins/deploy.groovy b/aai-resources/src/main/jenkins/deploy.groovy deleted file mode 100644 index 1a000e3..0000000 --- a/aai-resources/src/main/jenkins/deploy.groovy +++ /dev/null @@ -1,15 +0,0 @@ -def deployService(){ - stage 'Deploying Service' - - // get the jenkinsfile root directory - def ROOT_DIR = pwd() - ROOT_DIR = "${ROOT_DIR}"+'/src/main/kubernetes' - echo "ROOTDIR : ${ROOT_DIR}" - sh "/opt/app/kubernetes/v1.3.4/bin/kubectl --kubeconfig=${ROOT_DIR}/kubectl.conf replace --force --cascade -f ${ROOT_DIR}/${artifactId}-svc.yaml" - sh "/opt/app/kubernetes/v1.3.4/bin/kubectl --kubeconfig=${ROOT_DIR}/kubectl.conf replace --force --cascade -f ${ROOT_DIR}/${artifactId}-rc.yaml" -} -return this - - - - |