From aa2e32bbfa949bba9d01f4b92ea8064173a2c1cd Mon Sep 17 00:00:00 2001 From: Carlos Konstanski Date: Fri, 6 Oct 2017 17:07:58 -0600 Subject: simplified jjb files with a job-template --- jjb/yaml/admin-api-server.yaml | 35 -------------- jjb/yaml/admin-web-ui.yaml | 35 -------------- jjb/yaml/build-docker-containers.yaml | 23 --------- jjb/yaml/customer-api-server.yaml | 35 -------------- jjb/yaml/customer-web-ui.yaml | 35 -------------- jjb/yaml/deploy-dev-env.yaml | 23 --------- jjb/yaml/job-scheduler-server.yaml | 35 -------------- jjb/yaml/openbook-pipeline.yaml | 90 +++++++++++++++++++++++++++++++++++ jjb/yaml/test-pipeline.yaml | 78 ------------------------------ jjb/yaml/upload-jar.yaml | 26 ---------- jjb/yaml/workflow-server.yaml | 35 -------------- 11 files changed, 90 insertions(+), 360 deletions(-) delete mode 100644 jjb/yaml/admin-api-server.yaml delete mode 100644 jjb/yaml/admin-web-ui.yaml delete mode 100644 jjb/yaml/build-docker-containers.yaml delete mode 100644 jjb/yaml/customer-api-server.yaml delete mode 100644 jjb/yaml/customer-web-ui.yaml delete mode 100644 jjb/yaml/deploy-dev-env.yaml delete mode 100644 jjb/yaml/job-scheduler-server.yaml create mode 100644 jjb/yaml/openbook-pipeline.yaml delete mode 100644 jjb/yaml/test-pipeline.yaml delete mode 100644 jjb/yaml/upload-jar.yaml delete mode 100644 jjb/yaml/workflow-server.yaml (limited to 'jjb') diff --git a/jjb/yaml/admin-api-server.yaml b/jjb/yaml/admin-api-server.yaml deleted file mode 100644 index fa35e3a..0000000 --- a/jjb/yaml/admin-api-server.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- -- scm: - name: admin-api-server - scm: - - git: - url: git@github.com:Talligent/admin-api-server.git - branches: - - master - -- job: - name: admin-api-server - display-name: "admin-api-server" - project-type: freestyle - description: "Builds the admin-api-server microservice." - node: openbook_v4 - properties: - - build-discarder: - days-to-keep: 0 - num-to-keep: 1 - artifact-days-to-keep: 0 - artifact-num-to-keep: 0 - triggers: - - github - scm: - - admin-api-server - builders: - - gradle: - build-file: "build.gradle" - switches: - - "-P buildNumber=4.1.$BUILD_NUMBER" - - "-P buildMode=buildProd" - - "-D org.gradle.daemon=false" - tasks: | - clean - shadowJar diff --git a/jjb/yaml/admin-web-ui.yaml b/jjb/yaml/admin-web-ui.yaml deleted file mode 100644 index c1237c8..0000000 --- a/jjb/yaml/admin-web-ui.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- -- scm: - name: admin-web-ui - scm: - - git: - url: git@github.com:Talligent/admin-web-ui.git - branches: - - master - -- job: - name: admin-web-ui - display-name: "admin-web-ui" - project-type: freestyle - description: "Builds the admin-web-ui microservice." - node: openbook_v4 - properties: - - build-discarder: - days-to-keep: 0 - num-to-keep: 1 - artifact-days-to-keep: 0 - artifact-num-to-keep: 0 - triggers: - - github - scm: - - admin-web-ui - builders: - - gradle: - build-file: "build.gradle" - switches: - - "-P buildNumber=4.1.$BUILD_NUMBER" - - "-P buildMode=buildProd" - - "-D org.gradle.daemon=false" - tasks: | - clean - shadowJar diff --git a/jjb/yaml/build-docker-containers.yaml b/jjb/yaml/build-docker-containers.yaml deleted file mode 100644 index c005bbd..0000000 --- a/jjb/yaml/build-docker-containers.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -- job: - name: build-docker-container - display-name: "build-docker-container" - project-type: freestyle - description: "Runs the saltstack which generates the docker build scripts and ansible playbook installers. Runs the docker build scripts. Pushes the ansible playbooks to git." - node: openbook_v4 - properties: - - build-discarder: - days-to-keep: 0 - num-to-keep: 1 - artifact-days-to-keep: 0 - artifact-num-to-keep: 0 - triggers: - - timed: "H 0 * * *" - scm: - - git: - url: git@github.com:Talligent/openbook-v4-ci.git - branches: - - master - builders: - - shell: | - ./build-docker-containers.sh diff --git a/jjb/yaml/customer-api-server.yaml b/jjb/yaml/customer-api-server.yaml deleted file mode 100644 index added8e..0000000 --- a/jjb/yaml/customer-api-server.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- -- scm: - name: customer-api-server - scm: - - git: - url: git@github.com:Talligent/customer-api-server.git - branches: - - master - -- job: - name: customer-api-server - display-name: "customer-api-server" - project-type: freestyle - description: "Builds the customer-api-server microservice." - node: openbook_v4 - properties: - - build-discarder: - days-to-keep: 0 - num-to-keep: 1 - artifact-days-to-keep: 0 - artifact-num-to-keep: 0 - triggers: - - github - scm: - - customer-api-server - builders: - - gradle: - build-file: "build.gradle" - switches: - - "-P buildNumber=4.1.$BUILD_NUMBER" - - "-P buildMode=buildProd" - - "-D org.gradle.daemon=false" - tasks: | - clean - shadowJar diff --git a/jjb/yaml/customer-web-ui.yaml b/jjb/yaml/customer-web-ui.yaml deleted file mode 100644 index a937c49..0000000 --- a/jjb/yaml/customer-web-ui.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- -- scm: - name: customer-web-ui - scm: - - git: - url: git@github.com:Talligent/customer-web-ui.git - branches: - - master - -- job: - name: customer-web-ui - display-name: "customer-web-ui" - project-type: freestyle - description: "Builds the customer-web-ui microservice." - node: openbook_v4 - properties: - - build-discarder: - days-to-keep: 0 - num-to-keep: 1 - artifact-days-to-keep: 0 - artifact-num-to-keep: 0 - triggers: - - github - scm: - - customer-web-ui - builders: - - gradle: - build-file: "build.gradle" - switches: - - "-P buildNumber=4.1.$BUILD_NUMBER" - - "-P buildMode=buildProd" - - "-D org.gradle.daemon=false" - tasks: | - clean - shadowJar diff --git a/jjb/yaml/deploy-dev-env.yaml b/jjb/yaml/deploy-dev-env.yaml deleted file mode 100644 index 4bd3198..0000000 --- a/jjb/yaml/deploy-dev-env.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -- job: - name: deploy-dev-env - display-name: "deploy-dev-env" - project-type: freestyle - description: "Uses the ansible playbook that was generated by the build-docker-containers job to deploy Openbook onto the development cluster." - node: openbook_v4 - properties: - - build-discarder: - days-to-keep: 0 - num-to-keep: 1 - artifact-days-to-keep: 0 - artifact-num-to-keep: 0 - triggers: - - timed: "H 1 * * *" - scm: - - git: - url: git@github.com:Talligent/openbook-v4-installer.git - branches: - - master - builders: - - shell: | - ./deploy-dev-env.sh diff --git a/jjb/yaml/job-scheduler-server.yaml b/jjb/yaml/job-scheduler-server.yaml deleted file mode 100644 index f3b7eca..0000000 --- a/jjb/yaml/job-scheduler-server.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- -- scm: - name: job-scheduler-server - scm: - - git: - url: git@github.com:Talligent/job-scheduler-server.git - branches: - - master - -- job: - name: job-scheduler-server - display-name: "job-scheduler-server" - project-type: freestyle - description: "Builds the job-scheduler-server microservice." - node: openbook_v4 - properties: - - build-discarder: - days-to-keep: 0 - num-to-keep: 1 - artifact-days-to-keep: 0 - artifact-num-to-keep: 0 - triggers: - - github - scm: - - job-scheduler-server - builders: - - gradle: - build-file: "build.gradle" - switches: - - "-P buildNumber=4.1.$BUILD_NUMBER" - - "-P buildMode=buildProd" - - "-D org.gradle.daemon=false" - tasks: | - clean - shadowJar diff --git a/jjb/yaml/openbook-pipeline.yaml b/jjb/yaml/openbook-pipeline.yaml new file mode 100644 index 0000000..ef8dc2b --- /dev/null +++ b/jjb/yaml/openbook-pipeline.yaml @@ -0,0 +1,90 @@ +--- +- 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" + +- job-template: + name: "{artifact}-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/{artifact}.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={artifact} --version=4.1.${{BUILD_NUMBER}} --filepath=build/libs/{artifact}.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/test-pipeline.yaml b/jjb/yaml/test-pipeline.yaml deleted file mode 100644 index 74967c8..0000000 --- a/jjb/yaml/test-pipeline.yaml +++ /dev/null @@ -1,78 +0,0 @@ ---- -- 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 deleted file mode 100644 index 25f134f..0000000 --- a/jjb/yaml/upload-jar.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -- 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 diff --git a/jjb/yaml/workflow-server.yaml b/jjb/yaml/workflow-server.yaml deleted file mode 100644 index d88d0ce..0000000 --- a/jjb/yaml/workflow-server.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- -- scm: - name: workflow-server - scm: - - git: - url: git@github.com:Talligent/workflow-server.git - branches: - - master - -- job: - name: workflow-server - display-name: "workflow-server" - project-type: freestyle - description: "Builds the workflow-server microservice." - node: openbook_v4 - properties: - - build-discarder: - days-to-keep: 0 - num-to-keep: 1 - artifact-days-to-keep: 0 - artifact-num-to-keep: 0 - triggers: - - github - scm: - - workflow-server - builders: - - gradle: - build-file: "build.gradle" - switches: - - "-P buildNumber=4.1.$BUILD_NUMBER" - - "-P buildMode=buildProd" - - "-D org.gradle.daemon=false" - tasks: | - clean - shadowJar -- cgit v1.3