From 101d879d714ca97c33a4ea639693160cd9a07ad7 Mon Sep 17 00:00:00 2001 From: Carlos Konstanski Date: Fri, 6 Oct 2017 15:06:53 -0600 Subject: building pipeline jobs --- jjb/yaml/test-pipeline.yaml | 78 +++++++++++++++++++++++++++++++++++++++++++++ jjb/yaml/upload-jar.yaml | 26 +++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 jjb/yaml/test-pipeline.yaml create mode 100644 jjb/yaml/upload-jar.yaml (limited to 'jjb') diff --git a/jjb/yaml/test-pipeline.yaml b/jjb/yaml/test-pipeline.yaml new file mode 100644 index 0000000..74967c8 --- /dev/null +++ b/jjb/yaml/test-pipeline.yaml @@ -0,0 +1,78 @@ +--- +- job: + name: workflow-server-pipeline + project-type: pipeline + dsl: | + pipeline { + agent { + label "openbook_v4" + } + stages { + stage("gradle") { + steps { + checkout([ + scm: [ + $class: 'GitSCM', + branches: [ + [name: "master"] + ], + userRemoteConfigs: [ + [url: "git@github.com:Talligent/workflow-server.git"] + ] + ] + ]) + sh(script: "gradle -PbuildNumber=4.1.${BUILD_NUMBER} -PbuildMode=buildProd -Dorg.gradle.daemon=false clean shadowJar") + stash(includes: 'build/libs/*.jar', name: "jar") + } + } + stage("upload_jar") { + steps { + checkout([ + scm: [ + $class: 'GitSCM', + branches: [ + [name: "master"] + ], + userRemoteConfigs: [ + [url: "git@github.com:Talligent/deployment-scripts.git"] + ] + ] + ]) + unstash(name: "jar") + sh(script: "ruby openbook/ruby/upload_jar.rb --webdav-url=${WEBDAV_URL} --webdav-username=${WEBDAV_USERNAME} --webdav-password=${WEBDAV_PASSWORD} --artifact=workflow-server --version=4.1.${BUILD_NUMBER} --filepath=build/libs/workflow-server.4.1.${BUILD_NUMBER}.jar") + } + } + stage("build_docker_containers") { + steps { + checkout([ + scm: [ + $class: 'GitSCM', + branches: [ + [name: "master"] + ], + userRemoteConfigs: [ + [url: "git@github.com:Talligent/openbook-v4-ci.git"] + ] + ] + ]) + sh(script: "./build-docker-containers.sh") + } + } + stage("deploy_dev_env") { + steps { + checkout([ + scm: [ + $class: 'GitSCM', + branches: [ + [name: "master"] + ], + userRemoteConfigs: [ + [url: "git@github.com:Talligent/openbook-v4-installer.git"] + ] + ] + ]) + sh(script: "./deploy-dev-env.sh") + } + } + } + } diff --git a/jjb/yaml/upload-jar.yaml b/jjb/yaml/upload-jar.yaml new file mode 100644 index 0000000..25f134f --- /dev/null +++ b/jjb/yaml/upload-jar.yaml @@ -0,0 +1,26 @@ +--- +- scm: + name: deployment-scripts + scm: + - git: + url: git@github.com:Talligent/deployment-scripts.git + branches: + - master + +- job: + name: uoload-jar + display-name: "upload-jar" + project-type: freestyle + description: "Uploads the microservice JAR to webdav." + node: openbook_v4 + properties: + - build-discarder: + days-to-keep: 0 + num-to-keep: 1 + artifact-days-to-keep: 0 + artifact-num-to-keep: 0 + scm: + - deployment-scripts + builders: + - shell: | + ruby openbook/ruby/upload_jar.rb --webdav-url=$WEBDAV_URL --webdav-username=$WEBDAV_USERNAME --webdav-password=$WEBDAV_PASSWORD --artifact=workflow-server --version=4.1.$BUILD_NUMBER --filepath=workflow-server.4.1.$BUILD_NUMBER.jar -- cgit v1.3