summaryrefslogtreecommitdiff
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rw-r--r--jjb/.gitignore1
-rw-r--r--jjb/requirements.txt1
-rwxr-xr-xjjb/run.sh5
-rw-r--r--jjb/yaml/openbook-pipeline.yaml8
4 files changed, 13 insertions, 2 deletions
diff --git a/jjb/.gitignore b/jjb/.gitignore
index cfe5767..bdcf3b6 100644
--- a/jjb/.gitignore
+++ b/jjb/.gitignore
@@ -1,2 +1,3 @@
pippiandcarlos.com.ini
verizoncloudplatform.com.ini
+venv
diff --git a/jjb/requirements.txt b/jjb/requirements.txt
new file mode 100644
index 0000000..1d847f4
--- /dev/null
+++ b/jjb/requirements.txt
@@ -0,0 +1 @@
+jenkins-job-builder>=2.0.0.0b2
diff --git a/jjb/run.sh b/jjb/run.sh
index b99ff84..34962f5 100755
--- a/jjb/run.sh
+++ b/jjb/run.sh
@@ -1,4 +1,9 @@
#!/bin/bash
ini="${1}"
+
+virtualenv venv
+. venv/bin/activate
+venv/bin/pip install --upgrade -r requirements.txt
+
jenkins-jobs --conf "${ini}" update --delete-old yaml/
diff --git a/jjb/yaml/openbook-pipeline.yaml b/jjb/yaml/openbook-pipeline.yaml
index 75cf363..52536b0 100644
--- a/jjb/yaml/openbook-pipeline.yaml
+++ b/jjb/yaml/openbook-pipeline.yaml
@@ -22,6 +22,9 @@
customWorkspace "workspace/{artifact}"
}}
}}
+ environment {{
+ NEW_TAG = "4.1.1"
+ }}
stages {{
stage("gradle") {{
steps {{
@@ -36,7 +39,8 @@
]
]
)
- sh(script: "gradle -PbuildNumber=4.1.${{BUILD_NUMBER}} -PbuildMode=buildProd -Dorg.gradle.daemon=false clean shadowJar")
+ sh(script: "NEW_TAG=\$(/var/lib/jenkins/find_next_tag.sh \$(pwd) 4.1)")
+ sh(script: "gradle -PbuildNumber=${{NEW_TAG}} -PbuildMode=buildProd -Dorg.gradle.daemon=false clean shadowJar")
stash(includes: "build/libs/*.jar", name: "jar")
}}
}}
@@ -57,7 +61,7 @@
]
)
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")
+ sh(script: "ruby openbook/ruby/upload_jar.rb --webdav-url=${{WEBDAV_URL}} --webdav-username=${{WEBDAV_USERNAME}} --webdav-password=${{WEBDAV_PASSWORD}} --artifact={artifact} --version=${{NEW_TAG}} --filepath=build/libs/{artifact}.${{NEW_TAG}}.jar")
}}
}}
stage("docker-container") {{