From 986f65738dfac3a1ce73d9239defcd23ef195b94 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 17 Jul 2017 10:55:54 -0500 Subject: [PATCH] Propose patches to os-service-types from service-types-authority When we publish new service-types.json files we need to update the builtin fallback data for os-service-types. Add a proposal script update and job. Only trigger the job after the publish job runs, since the proposal script fetches the json file from the publication site. Change-Id: I139235e4e4644700e4197737c5ce62ba32b86b07 --- jenkins/jobs/service-types.yaml | 16 ++++++++++++++++ jenkins/scripts/propose_update.sh | 7 +++++++ zuul/layout.yaml | 3 ++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/jenkins/jobs/service-types.yaml b/jenkins/jobs/service-types.yaml index 31dcf0fa7c..dc6aee801f 100644 --- a/jenkins/jobs/service-types.yaml +++ b/jenkins/jobs/service-types.yaml @@ -53,3 +53,19 @@ keep-hierarchy: false copy-after-failure: false - console-log + +- job: + name: propose-service-types-update + description: Update os-service-types from Service Types Authority + node: proposal + + builders: + - proposal-slave-cleanup + - revoke-sudo + - link-logs + - net-info + - zuul-git-prep + - shell: /usr/local/jenkins/slave_scripts/propose_update.sh os-service-types + + publishers: + - console-log diff --git a/jenkins/scripts/propose_update.sh b/jenkins/scripts/propose_update.sh index c73a4efb8d..8bf2f1f55e 100755 --- a/jenkins/scripts/propose_update.sh +++ b/jenkins/scripts/propose_update.sh @@ -72,6 +72,13 @@ elif [ "$OWN_PROJECT" == "openstack-ansible-tests" ] ; then function update { bash /usr/local/jenkins/slave_scripts/sync_openstack_ansible_common_files.sh $1 } +elif [ "$OWN_PROJECT" == "os-service-types" ] ; then + INITIAL_COMMIT_MSG="Updated from OpenStack Service Type Authority" + TOPIC="openstack/os-service-types/sync-service-types-authority" + PROJECTS="openstack/os-service-types" + function update { + curl https://service-types.openstack.org/service-types.json > os_service_types/data/service-types.json + } else echo "Unknown project $1" >2 exit 1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index d841b4387f..d62cbc28f2 100755 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -16842,7 +16842,8 @@ projects: - gate-service-types-authority-pep8-ubuntu-xenial - gate-service-types-authority-validate post: - - publish-service-types-authority + - publish-service-types-authority: + - propose-service-types-update - name: openstack/shaker template: