summaryrefslogtreecommitdiff
path: root/jjb/yaml/test-pipeline.yaml
blob: 74967c8db6e8195171fc8fdbf5ee46143d24467b (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
73
74
75
76
77
78
---
- 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")
                  }
              }
          }
      }