diff options
Diffstat (limited to 'jjb/yaml/openbook-pipeline.yaml')
| -rw-r--r-- | jjb/yaml/openbook-pipeline.yaml | 88 |
1 files changed, 61 insertions, 27 deletions
diff --git a/jjb/yaml/openbook-pipeline.yaml b/jjb/yaml/openbook-pipeline.yaml index c07f14c..3dd632d 100644 --- a/jjb/yaml/openbook-pipeline.yaml +++ b/jjb/yaml/openbook-pipeline.yaml @@ -9,7 +9,13 @@ - "job-scheduler-server" - "workflow-server" jobs: + - "{artifact}-group" + +- job-group: + name: "{artifact}-group" + jobs: - "{artifact}-pipeline" + - "{artifact}-deploy-dev-env" - job-template: name: "{artifact}-pipeline" @@ -21,51 +27,79 @@ label "openbook_v4" }} }} + triggers {{ + pollSCM 'H/5 * * * *' + }} stages {{ stage("gradle") {{ steps {{ - git( - changelog: true, - poll: true, - branch: master, - url: "git@github.com:Talligent/{artifact}.git" - ) + checkout([ + scm: [ + $class: "GitSCM", + branches: [ + [name: "master"] + ], + userRemoteConfigs: [ + [url: "git@github.com:Talligent/{artifact}.git"] + ], + poll: true, + changelog: true + ] + ]) 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") {{ + stage("upload-jar") {{ steps {{ - git( - changelog: true, - poll: false, - branch: master, - url: "git@github.com:Talligent/deployment-scripts.git" - ) + 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={artifact} --version=4.1.${{BUILD_NUMBER}} --filepath=build/libs/{artifact}.4.1.${{BUILD_NUMBER}}.jar") }} }} - stage("build_docker_containers") {{ + stage("docker-containers") {{ steps {{ - git( - changelog: true, - poll: false, - branch: master, - url: "git@github.com:Talligent/openbook-v4-ci.git" - ) + checkout([ + scm: [ + $class: "GitSCM", + branches: [ + [name: "master"] + ], + userRemoteConfigs: [ + [url: "git@github.com:Talligent/openbook-v4-ci.git"] + ] + ] + ]) sh(script: "./build-docker-containers.sh {artifact}") }} }} + }} + }} + +- job-template: + name: "{artifact}-deploy-dev-env" + project-type: pipeline + dsl: | + pipeline {{ + agent {{ + node {{ + label "openbook_v4" + }} + }} + stages {{ stage("deploy_dev_env") {{ steps {{ - git( - changelog: true, - poll: false, - branch: master, - url: "git@github.com:Talligent/openbook-v4-installer.git" - ) - sh(script: "./deploy-dev-env.sh") + build(job: "deploy-dev-env") }} }} }} |
