Browse Source

migrate to victoria testing runtime

As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04)
and Node.js 10.

Tox is not anymore pre-installed on the OpenDev CI images.
The file package.json needs tox, install it to fix the nodejs-job.

Install it via a pre-run playbook so that this is run in addition to all
of the playbooks of the parent.

This patch also update python version to py38 in package.json[2]
as py36 is not available on focal.

Note: Before this patch We used nodejs8-jobs from openstack-zuul-jobs
which consumes npm jobs from zuul-jobs. We would like to install tox
in the 'pre-run' phase in each npm job, so this patch also defines
npm job defination here.

Story: #2007865
Task: #40212

[1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-focal.html
[2] https://opendev.org/openstack/stackviz/src/branch/master/package.json#L73

Co-Author: manchandavishal <manchandavishal143@gmail.com>

Change-Id: I116ea1609f88496c599a8285d33350104067c517
changes/69/740369/7
Ghanshyam Mann 2 months ago
committed by manchandavishal
parent
commit
ff8a129225
3 changed files with 36 additions and 2 deletions
  1. +29
    -1
      .zuul.yaml
  2. +1
    -1
      package.json
  3. +6
    -0
      playbooks/nodejs/pre.yaml

+ 29
- 1
.zuul.yaml View File

@@ -1,3 +1,25 @@
- job:
name: stackviz-nodejs10-run-lint
parent: nodejs-run-lint
description: |
Run lint using Node 10.
vars:
node_version: 10
nodeset: ubuntu-focal
pre-run: playbooks/nodejs/pre.yaml
required-projects:
- openstack/stackviz

- job:
name: stackviz-nodejs10-run-test-browser
parent: nodejs-run-test-browser
vars:
node_version: 10
nodeset: ubuntu-focal
pre-run: playbooks/nodejs/pre.yaml
required-projects:
- openstack/stackviz

- job:
name: tempest-full-rocky
parent: tempest-full-py3
@@ -6,12 +28,13 @@

- project:
templates:
- nodejs8-jobs
- publish-openstack-docs-pti
- openstack-python35-jobs
- openstack-python3-victoria-jobs
check:
jobs:
- stackviz-nodejs10-run-lint
- stackviz-nodejs10-run-test-browser
- tempest-full-py3:
irrelevant-files: &irrelevant-files
- ^.*\.rst$
@@ -27,6 +50,11 @@
irrelevant-files: *irrelevant-files
- tempest-full-rocky:
irrelevant-files: *irrelevant-files
gate:
jobs:
- stackviz-nodejs10-run-lint
- stackviz-nodejs10-run-test-browser

post:
jobs:
- publish-openstack-stackviz-element

+ 1
- 1
package.json View File

@@ -70,7 +70,7 @@
"watchify": "3.7.0"
},
"scripts": {
"postinstall": "if [ ! -d .venv ]; then tox -epy36 --notest; fi",
"postinstall": "if [ ! -d .venv ]; then tox -epy38 --notest; fi",
"test": "gulp unit",
"lint": "eslint ./",
"prod": "gulp prod; python setup.py sdist"


+ 6
- 0
playbooks/nodejs/pre.yaml View File

@@ -0,0 +1,6 @@
- hosts: all
roles:
# package.json needs to run 'tox' as command, ensure that it's
# installed and can be used globally.
- role: ensure-tox
ensure_global_symlinks: True

Loading…
Cancel
Save