summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorJessica Wagantall <jwagantall@linuxfoundation.org>2018-03-09 19:21:09 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-09 19:21:09 +0000
commitdc39c1e60ee53b4d74a99a61f0cea216c0359d4d (patch)
tree0e9416f99f6f2ec33073996f88eaa6b743854d1d /jjb
parent95e91e9c3c35c3328f4643ed93d22d96fc50e1ad (diff)
parent295975d522aaa584bc3dd79c043b1a6003977f22 (diff)
Merge "Configure PyPI releases"
Diffstat (limited to 'jjb')
-rw-r--r--jjb/dcaegen2/dcaegen2-utils.yaml20
-rw-r--r--jjb/global-macros.yaml8
-rw-r--r--jjb/onap-jjb/onap-pypi-template.yaml194
3 files changed, 222 insertions, 0 deletions
diff --git a/jjb/dcaegen2/dcaegen2-utils.yaml b/jjb/dcaegen2/dcaegen2-utils.yaml
index f91a4c211..d6dcb0168 100644
--- a/jjb/dcaegen2/dcaegen2-utils.yaml
+++ b/jjb/dcaegen2/dcaegen2-utils.yaml
@@ -2,11 +2,31 @@
- project:
name: dcaegen2-utils
project-name: 'dcaegen2-utils'
+ python-version: python3
+ subproject:
+ - 'dcaeapplib':
+ tox-dir: dcaeapplib/
+ tox-envs: ''
+ - 'onap-dcae-dbs-docker-client':
+ tox-dir: onap-dcae-dbs-docker-client/
+ tox-envs: ''
+ - 'onap-dcae-dcaepolicy-lib':
+ tox-dir: onap-dcae-dcaepolicy-lib/
+ tox-envs: ''
+ - 'python-discovery-client':
+ tox-dir: python-discovery-client/
+ tox-envs: ''
+ - 'python-dockering':
+ tox-dir: python-dockering/
+ tox-envs: ''
+
jobs:
- gerrit-maven-clm
- '{project-name}-{stream}-verify-java'
- '{project-name}-{stream}-merge-java'
- '{project-name}-{stream}-release-version-java-daily'
+ - '{project-name}-{subproject}-python-staging-{stream}'
+ - '{project-name}-{subproject}-python-release-{stream}'
project: 'dcaegen2/utils'
stream:
diff --git a/jjb/global-macros.yaml b/jjb/global-macros.yaml
index 826b6041d..85c275644 100644
--- a/jjb/global-macros.yaml
+++ b/jjb/global-macros.yaml
@@ -66,6 +66,14 @@
builders:
- shell: !include-raw: include-docker-login.sh
+- builder:
+ name: publish-pypi
+ builders:
+ - inject:
+ properties-content: PYPI_SERVER={pypi-server}
+ - shell:
+ !include-raw-escape: ../shell/pypi-publish.sh
+
# PARAMETERS
- parameter:
name: infra-parameters
diff --git a/jjb/onap-jjb/onap-pypi-template.yaml b/jjb/onap-jjb/onap-pypi-template.yaml
new file mode 100644
index 000000000..bfd709905
--- /dev/null
+++ b/jjb/onap-jjb/onap-pypi-template.yaml
@@ -0,0 +1,194 @@
+---
+# Job definition Anchors
+- pypi_job_boiler_plate: &pypi_job_boiler_plate
+ name: pypi_job_boiler_plate
+
+ #####################
+ # Job Variables #
+ #####################
+
+ gerrit_merge_triggers:
+ - change-merged-event
+ - comment-added-contains-event:
+ comment-contains-value: pypi-remerge$
+
+ gerrit_release_trigger:
+ - comment-added-contains-event:
+ comment-contains-value: pypi-release$
+
+ gerrit_trigger_file_paths:
+ - compare-type: ANT
+ pattern: '**'
+
+ #####################
+ # Job Configuration #
+ #####################
+
+ project-type: freestyle
+ node: '{build-node}'
+
+ parameters:
+ - lf-infra-parameters:
+ project: '{project}'
+ branch: '{branch}'
+ stream: '{stream}'
+ lftools-version: '{lftools-version}'
+ - lf-infra-tox-parameters:
+ tox-dir: '{tox-dir}'
+ tox-envs: '{tox-envs}'
+
+
+ properties:
+ - lf-infra-properties:
+ build-days-to-keep: '{build-days-to-keep}'
+
+ scm:
+ - lf-infra-gerrit-scm:
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+ git-url: '$GIT_URL/$PROJECT'
+ refspec: '$GERRIT_REFSPEC'
+ branch: '$GERRIT_BRANCH'
+ submodule-recursive: true
+ choosing-strategy: default
+
+ wrappers:
+ - lf-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+ publishers:
+ - lf-infra-publish
+
+- job-template:
+ name: '{project-name}-python-staging-{stream}'
+
+ # Job template for PyPI staging jobs
+ # Daily Builds
+
+ <<: *pypi_job_boiler_plate
+
+ triggers:
+ - gerrit:
+ server-name: '{gerrit-server-name}'
+ trigger-on: '{obj:gerrit_merge_triggers}'
+ projects:
+ - project-compare-type: ANT
+ project-pattern: '{project}'
+ branches:
+ - branch-compare-type: ANT
+ branch-pattern: '**/{branch}'
+ file-paths: '{obj:gerrit_trigger_file_paths}'
+
+ builders:
+ - lf-infra-tox-install:
+ python-version: '{python-version}'
+ - shell: !include-raw-escape: ../global-jjb/shell/tox-run.sh
+ - config-file-provider:
+ files:
+ - file-id: pypirc
+ target: '$HOME/.pypirc'
+ - shell:
+ !include-raw-escape: ../shell/pypi-dist-build.sh
+
+ - publish-pypi:
+ pypi-server: staging
+
+- job-template:
+ name: '{project-name}-python-release-{stream}'
+
+ # Job template for PyPI release jobs
+
+ <<: *pypi_job_boiler_plate
+
+ triggers:
+ - gerrit:
+ server-name: '{gerrit-server-name}'
+ trigger-on: '{obj:gerrit_release_trigger}'
+ projects:
+ - project-compare-type: ANT
+ project-pattern: '{project}'
+ branches:
+ - branch-compare-type: ANT
+ branch-pattern: '**/{branch}'
+ file-paths: '{obj:gerrit_trigger_file_paths}'
+
+ builders:
+ - lf-infra-tox-install:
+ python-version: '{python-version}'
+ - shell: !include-raw-escape: ../global-jjb/shell/tox-run.sh
+ - config-file-provider:
+ files:
+ - file-id: pypirc
+ target: '$HOME/.pypirc'
+ - shell:
+ !include-raw-escape: ../shell/pypi-dist-build.sh
+
+ - publish-pypi:
+ pypi-server: release
+
+- job-template:
+ name: '{project-name}-{subproject}-python-staging-{stream}'
+
+ # Job template for PyPI staging jobs
+ # Daily Builds
+
+ <<: *pypi_job_boiler_plate
+
+ triggers:
+ - gerrit:
+ server-name: '{gerrit-server-name}'
+ trigger-on: '{obj:gerrit_merge_triggers}'
+ projects:
+ - project-compare-type: ANT
+ project-pattern: '{project}'
+ branches:
+ - branch-compare-type: ANT
+ branch-pattern: '**/{branch}'
+ file-paths: '{obj:gerrit_trigger_file_paths}'
+
+ builders:
+ - lf-infra-tox-install:
+ python-version: '{python-version}'
+ - shell: !include-raw-escape: ../global-jjb/shell/tox-run.sh
+ - config-file-provider:
+ files:
+ - file-id: pypirc
+ target: '$HOME/.pypirc'
+ - shell:
+ !include-raw-escape: ../shell/pypi-dist-build.sh
+
+ - publish-pypi:
+ pypi-server: staging
+
+- job-template:
+ name: '{project-name}-{subproject}-python-release-{stream}'
+
+ # Job template for PyPI release jobs
+
+ <<: *pypi_job_boiler_plate
+
+ triggers:
+ - gerrit:
+ server-name: '{gerrit-server-name}'
+ trigger-on: '{obj:gerrit_release_trigger}'
+ projects:
+ - project-compare-type: ANT
+ project-pattern: '{project}'
+ branches:
+ - branch-compare-type: ANT
+ branch-pattern: '**/{branch}'
+ file-paths: '{obj:gerrit_trigger_file_paths}'
+
+ builders:
+ - lf-infra-tox-install:
+ python-version: '{python-version}'
+ - shell: !include-raw-escape: ../global-jjb/shell/tox-run.sh
+ - config-file-provider:
+ files:
+ - file-id: pypirc
+ target: '$HOME/.pypirc'
+ - shell:
+ !include-raw-escape: ../shell/pypi-dist-build.sh
+
+ - publish-pypi:
+ pypi-server: release