summaryrefslogtreecommitdiff
path: root/jjb/yaml/openbook-pipeline.yaml
blob: c07f14cc52691156547545775871a3d59ed31c4c (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
- 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"
              }}
          }}
          stages {{
              stage("gradle") {{
                  steps {{
                      git(
                          changelog: true,
                          poll: true,
                          branch: master,
                          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 {{
                      git(
                          changelog: true,
                          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=4.1.${{BUILD_NUMBER}} --filepath=build/libs/{artifact}.4.1.${{BUILD_NUMBER}}.jar")
                  }}
              }}
              stage("build_docker_containers") {{
                  steps {{
                      git(
                          changelog: true,
                          poll: false,
                          branch: master,
                          url: "git@github.com:Talligent/openbook-v4-ci.git"
                      )
                      sh(script: "./build-docker-containers.sh {artifact}")
                  }}
              }}
              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")
                  }}
              }}
          }}
      }}