Commit Graph

36 Commits

Author SHA1 Message Date
Davlet Panech 25aa783f24 Fix github mirroring for this repo
Updating the rsa ssh host key based on:
https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/

Note: In the future, StarlingX should have a zuul job and
secret setup for all repos so we do not need to do this
for every repo.

Needed to rename the secret, because zuul fails if like-named
secrets have diffent values in different branches of the same
repo.

Partial-Bug: #2015246
Change-Id: Id0caa3ad6efbaed9fff904c6fab8ba35472ee6f5
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
2023-04-28 12:38:51 -04:00
Al Bailey e5a8ba7ff4 Tox and Zuul cleanup for python3.9
Added in the following tox targets for fm-rest-api:
 - bandit
 - flake8 / pep8
 - pylint (suppressing most of the codes)

All the tox targets run on python3
The test-requirements.txt have been updated
The StarlingX Debian upper constraints are utilized.
The spec-lint (rpm) job is removed from Zuul.

Zuul runs pylint for sub directories
Bandit exclusions are updated.

Included a change to a .py file to trigger
the bandit zuul job.

Test Plan (for fm-rest-api)
  PASS: tox -e bandit
  PASS: tox -e coverage
  PASS: tox -e flake8
  PASS: tox -e pylint

Story: 2010531
Task: 47575
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I7ecaf1c90495b283c26e02e3b481bfe4c77c3939
2023-03-02 19:32:25 +00:00
Al Bailey 7c9989cc34 Remove python2 jobs from zuul for this repo
The python2.7 jobs will no longer be executed as part
of the zuul check and gate.

This also removed the unused devstack job for stx/fault

Story: 2010531
Task: 47304
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I308a067e6ca23e45b7f5539853d7bb28f31bb7f5
2023-02-07 15:29:51 +00:00
Al Bailey 13b24042a1 Update tox.ini to work with tox 4
This change will allow this repo to pass zuul now
that this has merged:
https://review.opendev.org/c/zuul/zuul-jobs/+/866943

Tox 4 deprecated whitelist_externals.
Replace whitelist_externals with allowlist_externals

Removed the 'build' target from zuul which just invokes
the devstack script which is un-supported.

Partial-Bug: #2000399

Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I59bd7c82c297e12969e31b5de9ac02d2a47834a6
2022-12-27 01:38:20 +00:00
Bernardo Decco c0cc7ce02f Removing py36 gates from zuul for fault
Removing redundant py36 Zuul jobs since we now have py39 Zuul jobs in
place with the debian nodeset

Story: 2006796
Task: 43488
Signed-off-by: Bernardo Decco <bernardo.deccodesiqueira@windriver.com>
Change-Id: I66f160ca6d497cb17a3eec0ded0cea0e02698c35
2021-09-30 10:14:06 -03:00
Charles Short 68f1b97a7f py3: Add support for python 3.9
Add support for Debian bullseye which runs python3.9.
This was tested by running tox locally on a Debian bullseye
VM.

Story: 2006796
Task: 42941

Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I5568b85a365104fdbca2af7adcf9f289001baea0
2021-09-01 08:58:34 -04:00
Andy Ning 60f7cb2308 Fix zuul pylint failure on review
For a review in stx/fault repo if pylint runs on ubuntu-focal,
it'll fail with error "ERROR: InvocationError for command ...".
This update fixed this by restricting pylint to run on
the compatible ubuntu-bionic, as we do for stx/config repo.

Closes-Bug: 1930919
Signed-off-by: Andy Ning <andy.ning@windriver.com>
Change-Id: I584e80d6286dbaf5439cbff593d0ad74da96ab77
2021-06-09 08:48:11 -05:00
Sharath Kumar K 2f364daa08 Tox and Zuul job for the python code scan in starlingx/fault
Setting up the bandit tool for the scanning of HIGH severity issues
in the python codes under Starlingx/fault folder.
Expecting this merge will enable zuul job for CI/CD of bandit scan.

Configuration files:
1. tox.ini for adding bandit environment and command.
2. test-requirements.txt for adding bandit version.
3. .zuul.yaml file for adding bandit job and configuring under
   check job to run code scan every time before code commit.

Test:
Run tox -e bandit command inside the fault folder to validate the
bandit scan and result.

Please note:
Changes will be implemented in batches and  this is Batch2 change.

Story: 2007541
Task: 39490
Depends-On: https://review.opendev.org/#/c/721294/

Change-Id: I84449691281d9769e9219e6f9f1338c20f518f40
Signed-off-by: Sharath Kumar K <sharath.kumar@intel.com>
2020-04-27 11:14:36 +02:00
albailey ce56ce7ea5 Adding pylint zuul and tox target
Adding a pylint tox target which only suppresses
the error codes that are currently failing.
This will prevent any of the passing checks from being
broken by future submissions.
The currently suppressed codes can be fixed by subsequent
commits.

Adds a zuul pylint target to invoke the new tox target.

Unified the install_command in tox.ini to ensure
the upper constraints are used.

Change-Id: Id2fb8cbb7ce63f844a06403410d461c601822ad6
Story: 2007082
Task: 39020
Signed-off-by: albailey <Al.Bailey@windriver.com>
2020-03-11 09:05:18 -05:00
albailey b1dfa14f0b Fix py27 and py35 zuul jobs failing to setup
As of March 1, when jobs run on ubuntu-xenial, they fail
to run py27 and py35 jobs with an error similar to:

/usr/bin/python3 -m virtualenv --no-download
  --python /usr/bin/python2.7 py27

ImportError: cannot import name 'ContextManager'

It does not appear to impact the ubuntu-bionic nodes so
updating zuul to use those nodes.

bionic nodes do not support python3.5, so the py35 jobs
is now converted to py36.

Partial-Bug: 1865554
Change-Id: Iad13d03ced21294d1a02c82f4e1e37cac3f27ee7
Signed-off-by: albailey <Al.Bailey@windriver.com>
2020-03-02 11:53:17 -06:00
Bin Qian dda009f4c3 Adding job to upload commits to GitHub
Add job to publish fault repo to GitHub

Change-Id: Idf3b1f553f7126fd2c7551fa5ab5383ef445fca1
Story: 2007252
Task: 38678
Signed-off-by: Bin Qian <bin.qian@windriver.com>
2020-02-06 10:02:45 -05:00
chenyan 2f37da8e8e Add unit test case for fm-rest-api/fm/fm/common/utils.py
Add test case FaultUtilsTestCase.
Add fake log in tests/base.py.

Story: 2007082
Task: 38093
Task: 38084

Depends-on: https://review.opendev.org/#/c/702175/
Change-Id: I560415ed1519834c21f0090f594f2da6c26f3eca
Signed-off-by: chenyan <yan.chen@intel.com>
2020-01-16 16:45:54 +08:00
chenyan 385f274a8f Create test framework for python with stestr.
Add add the first unit test for fm-rest-api/fm/fm/common/timeutils.
Add tox task for py27/35 as zuul checking and gating jobs.

Story: 2007082
Task: 38077

Change-Id: I2f259dcf2178f42546966063c0d724bc17e2a804
Signed-off-by: chenyan <yan.chen@intel.com>
2020-01-16 16:45:45 +08:00
Saul Wold 3a58bf68a1 Zuul: remove stx-build-rpms template
Since OBS is not working correctly for CentOS and we are stopping openSUSE
for now, no point it having this template run those OBS jobs.

Change-Id: Ibc562eb55c85f375c560cca1c4f5d1bda0507473
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2019-12-18 06:50:42 -08:00
Al Bailey 2f65897514 Turn off devstack as a zuul job
devstack is failing, most likely because StarlingX
uses postgres, and postgres was dropped in devstack by:
cf1c847191

I am not removing the devstack job declaration, or the devstack files
because in the future StarlingX could convert from postgres to
another DB backend, at which point we might want to revisit
using devstack.

Change-Id: I9dda188aeb32ca07108fed4eabf6716545212dab
Partial-Bug: 1848557
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
2019-10-17 12:58:48 -05:00
Saul Wold a93d482461 Add specfile linter and build templates
This moves the linters to use the zuul-jobs

Remove the old flock-check-packaging

Depends-On: https://review.opendev.org/#/c/679353
Change-Id: I5abc8dd461e2728d43eddc528f23d940fc45a32a
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2019-08-30 11:21:18 -07:00
Andreas Jaeger 521b0f7b38 Use Zuul templates
Use templates instead of individual jobs so that these
can be changed in one place.

Depends-On: https://review.opendev.org/677606
Change-Id: If47727858f1a2bef239be5ec400f4447b09f4722
2019-08-21 12:57:37 +00:00
Saul Wold 91af45019b Tox: add tox job and requirements to improve specfiles
This is a tox job to scan the RPM specfiles and do some
initial sanity checks and use the OpenDev Spec-Cleaner tool, this
is not a 'linter' per-se, but will output a diff of recommended
changes for the specfile.

Initial disable cleaning our default CentOS specfiles since we
know they need work, we can enable this later.

This uses the speclint script in starlingx/integ a proposed
by the Depends-On.

The recommended guildline for openSUSE is located here:
https://en.opensuse.org/openSUSE:Specfile_guidelines

Fix up fm-rest-api opensuse specfile

Depends-On: https://review.opendev.org/664995
Change-Id: I46da780a667569a9dccedd551d955c983e9601cd
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2019-07-16 13:15:24 -07:00
Dean Troyer cd5693bc48 Followup opendev cleanup and test jobs
Because we are in a deadly embrace with the config plugin after
the OpenDev work the config plugin is being forced off in this job
to remove one of the dependencies.

Ultimately extracting cgts-client to be installable stand-alone
is a better solution to allow other plugins to install directly.

Depends-On: https://review.opendev.org/653961
Change-Id: I47f1d0df404fc40a9d514c1b0689b5457dbc3f87
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-04-20 20:26:25 -05:00
OpenDev Sysadmins ae72f4deec OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:52:34 +00:00
Dean Troyer 1e73fcfd0d [DevStack] Remove old job definition
I believe the last of the job updates has merged, this can go away now.

If that turns out to be not the case, this is easy to revert...

Change-Id: I5e1feb53d8b7857d4d8c69553de91bab32d0977c
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-04-03 14:18:56 -05:00
Dean Troyer 456615539f Switch to new DevStack base job
Rename stx-fault-devstack to flock-devstack-fault
and inherit from flock-devstack-base

The old job definition must remain until no other plugins
are using it.

Change-Id: I736594c44fb45fd31a4920ca81298b2c2c1217a1
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-04-01 15:21:04 -05:00
Dean Troyer c6b9accb4f Updates to include cgtsclient and install dirs
fm-rest-api requires cgtsclient, stx-config needed some work
to allow only that to be installed.

Rework installation dir again.  Put everything in /usr/local
again, but allow that to be changed to a user-writable dir and
not require sudo.

Depends-on: https://review.openstack.org/641786
Depends-on: https://review.openstack.org/641783
Depends-on: https://review.openstack.org/641699
Change-Id: I37cc8283e8eb93a77088aebacdcc62dfb7e1c75e
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-03-13 00:39:50 +08:00
Dean Troyer b217f4c87c Convert DevStack jobs to master & bionic
We're changing to upstream master soon, let's start running
on the upstream devstack configuration.

There is an undeclared dependency on cgtsclient in fm-rest-api
so we need to work around that.

Change-Id: If764701fce94fb760edf0a68805753d3804892c0
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-02-08 15:42:06 -06:00
Dean Troyer 68c99f6f66 DevStack cleanups
* Pull binary build steps into separate functions
* Add build.sh to call binary builds without the rest of DevStack
* Add new stx-fault-build job and tox build environment
* Make stx-fault-devstack voting (still only devstack/*)

Change-Id: I6692fc1f75db413860ede2657f4f1501b95c10c0
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-02-04 13:03:38 -06:00
Sun Austin 83023a2d18 change install_non_bb to install target in devstack
change install_non_bb to install due to
I431b733030444185cc51a8b5352492926170a4c3 change
Force to use xenial(nodeset:openstack-single-node-xenial)

Closes-bug: 1812785

Change-Id: I61338a79f09d59b1f1e36a4911ecadad4a3453e8
Signed-off-by: Sun Austin <austin.sun@intel.com>
2019-01-23 09:38:26 +08:00
Dean Troyer b27c2143ab Add a basic devstack job
Begin working on a base devstack job for testing stx projects.
We have to pull a lot of stable/pike bits yet let STX services
run from master.

Change-Id: I6eee854888acb27b54c10c25d47e97d98a7f999c
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-11-01 23:38:13 -05:00
Dean Troyer 105a2ea2c5 Add api-ref and relnotes publish jobs
* Add pointers in the main doc to api-ref and releasenotes pages
* Add publish-stx-api-ref and publish-stx-releasenotes jobs
* Add search at bottom of api-ref and relnotes pages to trigger the jobs

Change-Id: Iece880f25e33f0c18a512904b7839b24a0cacbac
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2018-10-11 08:06:43 -05:00
Dean Troyer 62431965cd Add publish job for docs
Also set the theme to alabaster until starlingxdocs is ready

Change-Id: I8881381821ca3497f3451c15043e1469d3366a52
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-10-06 12:01:18 -05:00
Dean Troyer b2ebe88722 Add api-ref jobs
Change-Id: I049279244b0bc6ac33e8ee5ae4c1b7f75b95e20c
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-09-27 21:33:39 -05:00
Abraham Arce 92e1b2e3bf [Doc] Release Notes Management
Baseline changes to comply with Release Notes Management
based in Reno [0]:

* Use build-openstack-releasenotes job for release notes
  (We can't use the OpenStack releasenotes template as it includes
  publish jobs, stx needs its own)
* Add newnote tox environment as convenience for creating new release
  notes, re-using the releasenotes venv.
* Adding SPDX-License-Identifier: Apache-2.0

[0] https://docs.openstack.org/reno/latest/

Story: 2003101
Task: 26696

Change-Id: I03cd9d9fe6e2d0d4ae1a02210f74a456a2a2839c
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2018-09-25 15:54:52 -07:00
Abraham Arce 352583420d [Doc] Building docs following Docs Contrib Guide
Baseline changes to comply with OpenStack Documentation
Contributor Guide [0] starting with the following sections:

- Project guide setup
  - [1] sphinx-quickstart
  - [2] doc/source/ layout
- Building documentation
  - [3] tox -e docs
- Using documentation tools
  - [4] openstackdocstheme
- Use build-openstack-docs-pti job template for docs
- Adding SPDX-License-Identifier: Apache-2.0

[0] https://docs.openstack.org/doc-contrib-guide
[1] http://www.sphinx-doc.org/en/master/usage/quickstart.html
[2] https://docs.openstack.org/doc-contrib-guide/project-guides.html
[3] https://docs.openstack.org/doc-contrib-guide/docs-builds.html
[4] https://docs.openstack.org/openstackdocstheme/

Story: 2002708
Task: 26693

Story: 2002813
Task: 26694

Change-Id: I603077bc75bfed4b6032c65dfb308a75cfb0aa76
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2018-09-25 15:54:38 -07:00
Lachlan Plant 05e50a2ea3 Fix tox linters for zuul
Enable voting on tox-linters

Story: 2003361
Task: 24413

Change-Id: I3d5b15f8a5bd4fa321c946e5e67272ed35e5b75f
Signed-off-by: Lachlan Plant <lachlan.plant@windriver.com>
2018-08-29 11:24:13 -05:00
chenyan 7bdf6fd47c add flake8 as pep8 codestyle check.
Enable test for pep8 and use flake8 as check tool.

Story: 2003310
Task: 24446

Change-Id: Idf5cbde46dc1a2a579587438b83f2dcb7b9352bb
Signed-off-by: chenyan <yan.chen@intel.com>
2018-08-10 11:39:57 +08:00
Dean Troyer 81feb078e4 Remove non-voting gate job
Change-Id: I95bcee9070ea62611252fd79eb5b499cf50df5a9
2018-06-29 14:25:23 -05:00
Dean Troyer 3a4be5f79c Add default test framework
Change-Id: Idbc2f22873edff7a80b5abc5a5110b41b75fa6cc
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-06-09 08:44:12 -05:00