summaryrefslogtreecommitdiff
path: root/jjb/yaml/openbook-pipeline.yaml
blob: 5fcfbbe593d2465e6f731d9c883948053b35dc6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
- 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 {{
              node {{
                label "openbook_v4"
                customWorkspace "workspace/{artifact}"
              }}
          }}
          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")
                      sh(script: "./gradlew -PbuildNumber=\$(cat /tmp/newtag_{artifact}) -PbuildMode=buildProd -Dorg.gradle.daemon=false clean shadowJar")
                      stash(includes: "build/libs/*.jar", name: "jar")
                  }}
              }}
              stage("upload-jar") {{
                  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")
                  }}
              }}
              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}")
                  }}
              }}
          }}
      }}