diff --git a/murano-ci/jenkins/jobs/murano_jobs.yaml b/murano-ci/jenkins/jobs/murano_jobs.yaml index 4a87dcb8..eab51370 100755 --- a/murano-ci/jenkins/jobs/murano_jobs.yaml +++ b/murano-ci/jenkins/jobs/murano_jobs.yaml @@ -1,8 +1,8 @@ - job-template: - name: 'gate-{name}-{distro}{job-suffix}' + name: 'gate-{name}-{distro}{pkg-service}{job-suffix}' project-type: freestyle defaults: global - description: '{name} {distro} gate job' + description: '{name} {pkg-service} {distro} gate job' disabled: false concurrent: true node: trusty-devstack-cz5608 || trusty-devstack-cz5680 @@ -26,6 +26,7 @@ fi export DISTR_NAME='{distro}' + export PACKAGE_SERVICE='{pkg-service}' if [[ $ZUUL_REF =~ "juno" || $ZUUL_REF =~ "kilo" ]]; then echo 'Using old CI strategy' @@ -135,11 +136,14 @@ job-suffix: - '' - '-nv' + pkg-service: + - '' + - '-glare' repository: openstack/murano tests: 'gate' jobs: - 'hook-{name}-rtfd' - - 'gate-{name}-{distro}{job-suffix}' + - 'gate-{name}-{distro}{pkg-service}{job-suffix}' - 'heartbeat-{name}-{distro}' - 'coverage-{name}-{distro}' @@ -151,12 +155,16 @@ - '-nv' repository: openstack/murano-dashboard tests: '' + pkg-service: + - '' + - '-glare' jobs: - - 'gate-{name}-{distro}{job-suffix}' + - 'gate-{name}-{distro}{pkg-service}{job-suffix}' - 'heartbeat-{name}-{distro}' - project: name: murano-agent + pkg-service: '' distro: - ubuntu - debian @@ -166,7 +174,7 @@ repository: openstack/murano-agent tests: 'gate' jobs: - - 'gate-{name}-{distro}{job-suffix}' + - 'gate-{name}-{distro}{pkg-service}{job-suffix}' - 'heartbeat-{name}-{distro}' - project: @@ -175,7 +183,10 @@ job-suffix: - '' - '-nv' + pkg-service: + - '' + - '-glare' repository: openstack/python-muranoclient tests: '' jobs: - - 'gate-{name}-{distro}{job-suffix}' + - 'gate-{name}-{distro}{pkg-service}{job-suffix}' diff --git a/murano-ci/scripts/deploy_devstack.sh b/murano-ci/scripts/deploy_devstack.sh index c451cabe..184ef964 100644 --- a/murano-ci/scripts/deploy_devstack.sh +++ b/murano-ci/scripts/deploy_devstack.sh @@ -106,15 +106,31 @@ function deploy_devstack() { echo "MURANO_PYTHONCLIENT_REPO=${MURANO_PYTHONCLIENT_REPO}" echo "MURANO_PYTHONCLIENT_BRANCH=${MURANO_PYTHONCLIENT_BRANCH}" - if [[ ${ZUUL_BRANCH} =~ kilo || ${ZUUL_BRANCH} =~ liberty ]]; then - export DEVSTACK_LOCAL_CONF="enable_service murano" - export DEVSTACK_LOCAL_CONF+=$'\n'"enable_service murano-api" - export DEVSTACK_LOCAL_CONF+=$'\n'"enable_service murano-engine" - export DEVSTACK_LOCAL_CONF+=$'\n'"enable_service murano-dashboard" - else - export DEVSTACK_LOCAL_CONF="enable_plugin murano git://git.openstack.org/openstack/murano" + DEVSTACK_LOCAL_CONFIG="" + + if [[ ${PACKAGE_SERVICE} = "-glare" ]]; then + # NOTE(kzaitsev): we have to install glance to make devstack install glare code + # g-api ensures glance is installed, g-reg ensures cache dirs would be created + DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_service g-api" + DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_service g-reg" + DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_service g-glare" + DEVSTACK_LOCAL_CONFIG+=$'\n'"DOWNLOAD_DEFAULT_IMAGES=False" + # NOTE(mkarpin): we have to point to local endpoint for glare + DEVSTACK_LOCAL_CONFIG+=$'\n'"GLANCE_GLARE_HOSTPORT=${FOUND_IP_ADDRESS}:9494" + DEVSTACK_LOCAL_CONFIG+=$'\n'"MURANO_USE_GLARE=True" fi + if [[ ${ZUUL_BRANCH} =~ kilo || ${ZUUL_BRANCH} =~ liberty ]]; then + DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_service murano" + DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_service murano-api" + DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_service murano-engine" + DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_service murano-dashboard" + else + DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin murano git://git.openstack.org/openstack/murano" + fi + + export DEVSTACK_LOCAL_CONFIG + # Set KEYSTONE_DEPLOY to "uwsgi" as far as it will be set to "mod_wsgi" by default. # For more information take a look at: # * https://review.openstack.org/#/c/193894/ @@ -150,7 +166,7 @@ ENABLED_SERVICES= enable_service mysql enable_service rabbit enable_service horizon -${DEVSTACK_LOCAL_CONF} +${DEVSTACK_LOCAL_CONFIG} # Disable neutron services because its unused on CI workers. disable_service neutron disable_service q-svc q-agt q-dhcp q-l3 q-meta q-metering diff --git a/murano-ci/zuul/layout.yaml b/murano-ci/zuul/layout.yaml index 4fa37ed1..51757fac 100755 --- a/murano-ci/zuul/layout.yaml +++ b/murano-ci/zuul/layout.yaml @@ -35,26 +35,36 @@ projects: - name: openstack/murano check: - gate-murano-ubuntu - post: + - gate-murano-ubuntu-glare-nv + post: - hook-murano-rtfd + - name: openstack/murano-dashboard check: - gate-murano-dashboard-ubuntu + - gate-murano-dashboard-ubuntu-glare-nv + - name: openstack/murano-agent check: - gate-murano-agent-ubuntu - gate-murano-agent-debian + - name: openstack/python-muranoclient check: - gate-murano-client-ubuntu + - gate-murano-client-ubuntu-glare-nv + - name: openstack/murano-deployment check: - gate-murano-deployment - gate-murano-ubuntu-nv + - gate-murano-ubuntu-glare-nv - gate-murano-dashboard-ubuntu-nv + - gate-murano-dashboard-ubuntu-glare-nv - gate-murano-agent-ubuntu-nv - gate-murano-agent-debian-nv - gate-murano-client-ubuntu-nv + - gate-murano-client-ubuntu-glare-nv - coverage-murano-ubuntu jobs: diff --git a/murano-ci/zuul/openstack_functions.py b/murano-ci/zuul/openstack_functions.py index a92f26fa..5a3d3529 100755 --- a/murano-ci/zuul/openstack_functions.py +++ b/murano-ci/zuul/openstack_functions.py @@ -44,7 +44,16 @@ def set_params(item, job, params): if 'murano-client' in job.name: project_name = 'python-muranoclient' else: - project_name = re.sub("^\w+-|-\w+$|-\w+-nv|-nv", '', job.name) + # NOTE(kzaitsev) Remove leading prefix (gate, heartbeat, etc.) + # and distro name together with everything that follows (note + # no '$' at the end). This should leave project's name + result = re.search("^\w+-(?P.*)-(?:ubuntu|debian)", + job.name) + if not result: + raise ValueError("Couldn't parse job name {}".format( + job.name)) + project_name = result.group('proj_name') + deployment_ref = params['ZUUL_CHANGES'].rpartition(':')[2] params['MURANO_DEPLOYMENT_REF'] = deployment_ref params['ZUUL_REF'] = params.get('ZUUL_BRANCH', 'master')