diff options
| author | ckonstanski <ckonstanski@pippiandcarlos.com> | 2017-10-24 18:27:27 -0600 |
|---|---|---|
| committer | ckonstanski <ckonstanski@pippiandcarlos.com> | 2017-10-24 18:27:27 -0600 |
| commit | 0493747f5d1b30008b4170b3d48080abfa224700 (patch) | |
| tree | 4ee87ddb639f30a47e95861409a1b9d71d183e07 /jjb | |
| parent | dd48453e079d5c93f7cf0af59843bd7d4180e186 (diff) | |
make it work for all 4 git branches
Diffstat (limited to 'jjb')
| -rw-r--r-- | jjb/yaml/deploy-branch.yaml (renamed from jjb/yaml/deploy-dev-env.yaml) | 28 | ||||
| -rw-r--r-- | jjb/yaml/openbook-all-pipeline.yaml | 116 | ||||
| -rw-r--r-- | jjb/yaml/openbook-core-pipeline.yaml | 88 | ||||
| -rw-r--r-- | jjb/yaml/openbook-pipeline.yaml | 114 |
4 files changed, 232 insertions, 114 deletions
diff --git a/jjb/yaml/deploy-dev-env.yaml b/jjb/yaml/deploy-branch.yaml index 8172369..a8a3746 100644 --- a/jjb/yaml/deploy-dev-env.yaml +++ b/jjb/yaml/deploy-branch.yaml @@ -1,6 +1,16 @@ --- -- job: - name: deploy-dev-env +- project: + name: "deploy-branch" + branch: + - "unstable" + - "develop" + - "stage" + - "master" + jobs: + - "deploy-branch-{branch}" + +- job-template: + name: "deploy-branch-{branch}" project-type: freestyle node: openbook_v4 properties: @@ -17,12 +27,12 @@ triggers: - reverse: jobs: - - "admin-api-server-pipeline" - - "admin-web-ui-pipeline" - - "customer-api-server-pipeline" - - "customer-web-ui-pipeline" - - "job-scheduler-server-pipeline" - - "workflow-server-pipeline" + - "admin-api-server-{branch}-pipeline" + - "admin-web-ui-{branch}-pipeline" + - "customer-api-server-{branch}-pipeline" + - "customer-web-ui-{branch}-pipeline" + - "job-scheduler-server-{branch}-pipeline" + - "workflow-server-{branch}-pipeline" scm: - git: url: git@github.com:Talligent/openbook-v4-installer.git @@ -30,4 +40,4 @@ - master builders: - shell: | - ./deploy-dev-env.sh + ./deploy-branch.sh {branch} diff --git a/jjb/yaml/openbook-all-pipeline.yaml b/jjb/yaml/openbook-all-pipeline.yaml index 1c5fbca..42ed780 100644 --- a/jjb/yaml/openbook-all-pipeline.yaml +++ b/jjb/yaml/openbook-all-pipeline.yaml @@ -1,60 +1,70 @@ --- -- job: - name: openbook-all-pipeline +- project: + name: "openbook-all-pipeline" + branch: + - "unstable" + - "develop" + - "stage" + - "master" + jobs: + - "openbook-all-{branch}-pipeline" + +- job-template: + name: "openbook-all-{branch}-pipeline" project-type: pipeline dsl: | - pipeline { - agent { - node { + pipeline {{ + agent {{ + node {{ label "master" - } - } - stages { - stage("checkout") { - agent { - node { + }} + }} + stages {{ + stage("checkout") {{ + agent {{ + node {{ label "openbook_v4" customWorkspace "workspace/openbook-all" - } - } - steps { - git(poll: false, branch: "unstable", url: "git@github.com:Talligent/openbook-core.git") - } - } - stage("database") { - steps { + }} + }} + steps {{ + git(poll: false, branch: "{branch}", url: "git@github.com:Talligent/openbook-core.git") + }} + }} + stage("database") {{ + steps {{ build(job: "openbook-database") - } - } - stage("admin-api-server") { - steps { - build(job: "admin-api-server-pipeline") - } - } - stage("customer-api-server") { - steps { - build(job: "customer-api-server-pipeline") - } - } - stage("admin-web-ui") { - steps { - build(job: "admin-web-ui-pipeline") - } - } - stage("customer-web-ui") { - steps { - build(job: "customer-web-ui-pipeline") - } - } - stage("job-scheduler-server") { - steps { - build(job: "job-scheduler-server-pipeline") - } - } - stage("workflow-server") { - steps { - build(job: "workflow-server-pipeline") - } - } - } - } + }} + }} + stage("admin-api-server") {{ + steps {{ + build(job: "admin-api-server-{branch}-pipeline") + }} + }} + stage("customer-api-server") {{ + steps {{ + build(job: "customer-api-server-{branch}-pipeline") + }} + }} + stage("admin-web-ui") {{ + steps {{ + build(job: "admin-web-ui-{branch}-pipeline") + }} + }} + stage("customer-web-ui") {{ + steps {{ + build(job: "customer-web-ui-{branch}-pipeline") + }} + }} + stage("job-scheduler-server") {{ + steps {{ + build(job: "job-scheduler-server-{branch}-pipeline") + }} + }} + stage("workflow-server") {{ + steps {{ + build(job: "workflow-server-{branch}-pipeline") + }} + }} + }} + }} diff --git a/jjb/yaml/openbook-core-pipeline.yaml b/jjb/yaml/openbook-core-pipeline.yaml index 7a4da87..d92b605 100644 --- a/jjb/yaml/openbook-core-pipeline.yaml +++ b/jjb/yaml/openbook-core-pipeline.yaml @@ -1,45 +1,55 @@ --- -- job: - name: openbook-core-pipeline +- project: + name: "openbook-core-pipeline" + branch: + - "unstable" + - "develop" + - "stage" + - "master" + jobs: + - "openbook-core-{branch}-pipeline" + +- job-template: + name: "openbook-core-{branch}-pipeline" project-type: pipeline dsl: | - pipeline { - agent { - node { + pipeline {{ + agent {{ + node {{ label "master" - } - } - stages { - stage("checkout") { - agent { - node { + }} + }} + stages {{ + stage("checkout") {{ + agent {{ + node {{ label "openbook_v4" customWorkspace "workspace/openbook-core" - } - } - steps { - git(branch: "unstable", url: "git@github.com:Talligent/openbook-core.git") - } - } - stage("admin-api-server") { - steps { - build(job: "admin-api-server-pipeline") - } - } - stage("customer-api-server") { - steps { - build(job: "customer-api-server-pipeline") - } - } - stage("job-scheduler-server") { - steps { - build(job: "job-scheduler-server-pipeline") - } - } - stage("workflow-server") { - steps { - build(job: "workflow-server-pipeline") - } - } - } - } + }} + }} + steps {{ + git(branch: "{branch}", url: "git@github.com:Talligent/openbook-core.git") + }} + }} + stage("admin-api-server") {{ + steps {{ + build(job: "admin-api-server-{branch}-pipeline") + }} + }} + stage("customer-api-server") {{ + steps {{ + build(job: "customer-api-server-{branch}-pipeline") + }} + }} + stage("job-scheduler-server") {{ + steps {{ + build(job: "job-scheduler-server-{branch}-pipeline") + }} + }} + stage("workflow-server") {{ + steps {{ + build(job: "workflow-server-{branch}-pipeline") + }} + }} + }} + }} diff --git a/jjb/yaml/openbook-pipeline.yaml b/jjb/yaml/openbook-pipeline.yaml index 5fcfbbe..c379af5 100644 --- a/jjb/yaml/openbook-pipeline.yaml +++ b/jjb/yaml/openbook-pipeline.yaml @@ -1,18 +1,106 @@ --- - project: name: "openbook-pipeline" - artifact: - - "admin-api-server" - - "admin-web-ui" - - "customer-api-server" - - "customer-web-ui" - - "job-scheduler-server" - - "workflow-server" jobs: - - "{artifact}-pipeline" + - "{artifact}-{branch}-pipeline": + artifact: "admin-api-server" + branch: "unstable" + tag: "4.1" + - "{artifact}-{branch}-pipeline": + artifact: "admin-api-server" + branch: "develop" + tag: "4.0" + - "{artifact}-{branch}-pipeline": + artifact: "admin-api-server" + branch: "stage" + tag: "4.0" + - "{artifact}-{branch}-pipeline": + artifact: "admin-api-server" + branch: "master" + tag: "4.0" + - "{artifact}-{branch}-pipeline": + artifact: "admin-web-ui" + branch: "unstable" + tag: "4.1" + - "{artifact}-{branch}-pipeline": + artifact: "admin-web-ui" + branch: "develop" + tag: "4.0" + - "{artifact}-{branch}-pipeline": + artifact: "admin-web-ui" + branch: "stage" + tag: "4.0" + - "{artifact}-{branch}-pipeline": + artifact: "admin-web-ui" + branch: "master" + tag: "4.0" + - "{artifact}-{branch}-pipeline": + artifact: "customer-api-server" + branch: "unstable" + tag: "4.1" + - "{artifact}-{branch}-pipeline": + artifact: "customer-api-server" + branch: "develop" + tag: "4.0" + - "{artifact}-{branch}-pipeline": + artifact: "customer-api-server" + branch: "stage" + tag: "4.0" + - "{artifact}-{branch}-pipeline": + artifact: "customer-api-server" + branch: "master" + tag: "4.0" + - "{artifact}-{branch}-pipeline": + artifact: "customer-web-ui" + branch: "unstable" + tag: "4.1" + - "{artifact}-{branch}-pipeline": + artifact: "customer-web-ui" + branch: "develop" + tag: "4.0" + - "{artifact}-{branch}-pipeline": + artifact: "customer-web-ui" + branch: "stage" + tag: "4.0" + - "{artifact}-{branch}-pipeline": + artifact: "customer-web-ui" + branch: "master" + tag: "4.0" + - "{artifact}-{branch}-pipeline": + artifact: "job-scheduler-server" + branch: "unstable" + tag: "4.1" + - "{artifact}-{branch}-pipeline": + artifact: "job-scheduler-server" + branch: "develop" + tag: "4.0" + - "{artifact}-{branch}-pipeline": + artifact: "job-scheduler-server" + branch: "stage" + tag: "4.0" + - "{artifact}-{branch}-pipeline": + artifact: "job-scheduler-server" + branch: "master" + tag: "4.0" + - "{artifact}-{branch}-pipeline": + artifact: "workflow-server" + branch: "unstable" + tag: "4.1" + - "{artifact}-{branch}-pipeline": + artifact: "workflow-server" + branch: "develop" + tag: "4.0" + - "{artifact}-{branch}-pipeline": + artifact: "workflow-server" + branch: "stage" + tag: "4.0" + - "{artifact}-{branch}-pipeline": + artifact: "workflow-server" + branch: "master" + tag: "4.0" - job-template: - name: "{artifact}-pipeline" + name: "{artifact}-{branch}-pipeline" project-type: pipeline dsl: | pipeline {{ @@ -25,8 +113,8 @@ stages {{ stage("gradle") {{ steps {{ - git(branch: "unstable", url: "git@github.com:Talligent/{artifact}.git") - sh(script: "/var/lib/jenkins/find_next_tag.sh \$(pwd) {artifact} 4.1") + git(branch: "{branch}", url: "git@github.com:Talligent/{artifact}.git") + sh(script: "/var/lib/jenkins/find_next_tag.sh \$(pwd) {artifact} {tag}") sh(script: "./gradlew -PbuildNumber=\$(cat /tmp/newtag_{artifact}) -PbuildMode=buildProd -Dorg.gradle.daemon=false clean shadowJar") stash(includes: "build/libs/*.jar", name: "jar") }} @@ -35,13 +123,13 @@ steps {{ git(poll: false, branch: "master", 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=\$(cat /tmp/newtag_{artifact}) --filepath=build/libs/{artifact}.\$(cat /tmp/newtag_{artifact}).jar") + sh(script: "ruby openbook/ruby/upload_jar.rb --webdav-url=${{WEBDAV_URL}} --webdav-username=${{WEBDAV_USERNAME}} --webdav-password=${{WEBDAV_PASSWORD}} --artifact={artifact} --branch={branch} --version=\$(cat /tmp/newtag_{artifact}) --filepath=build/libs/{artifact}.\$(cat /tmp/newtag_{artifact}).jar") }} }} stage("docker-container") {{ steps {{ git(poll: false, branch: "master", url: "git@github.com:Talligent/openbook-v4-ci.git") - sh(script: "./build-docker-containers.sh {artifact}") + sh(script: "./build-docker-containers.sh {artifact} {branch}") }} }} }} |
