releng/global-jjb.git
4 years agoFix rtd merge job to handle new tag uploaded 09/62009/1 v0.45.x
Anil Belur [Wed, 16 Oct 2019 17:00:53 +0000 (22:30 +0530)]
Fix rtd merge job to handle new tag uploaded

Issue: RELENG-2445
Change-Id: I83bbb8b5b44ae6aee8e9cafd1711e8ac19b48811
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoMerge "Add sonar-project-file parameter to ci sonar jobs" v0.45.0
Eric Ball [Tue, 8 Oct 2019 21:19:59 +0000 (21:19 +0000)]
Merge "Add sonar-project-file parameter to ci sonar jobs"

4 years agoAdd sonar-project-file parameter to ci sonar jobs 37/61937/3
Eric Ball [Mon, 7 Oct 2019 21:40:22 +0000 (14:40 -0700)]
Add sonar-project-file parameter to ci sonar jobs

By enabling the caller to override the default project file name with
an empty string, we enable the ability to provide project settings
directly in the sonar-properties field. This removes the requirement
for a "sonar-project.properties" file in the repo.

Change-Id: Ia1069417d3bb2a742a68d6113fbd1d8e0374cbdc
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
4 years agoMerge "Fix auto update image script to compare image type"
Anil Belur [Sat, 5 Oct 2019 05:10:48 +0000 (05:10 +0000)]
Merge "Fix auto update image script to compare image type"

4 years agoRevert "Update packer version to 1.4.4" 27/61927/1
Thanh Ha (zxiiro) [Fri, 4 Oct 2019 15:19:08 +0000 (15:19 +0000)]
Revert "Update packer version to 1.4.4"

This reverts commit 0727a30524c2f708f81448c03dd37d1ebb272167.

Reason for revert: 1.4.4 still fails packer build vexxhost: Error setting image metadata: Bad request with: [POST https://block-storage-ca-ymq-1.vexxhost.net/v3/12c36e260d8e4bb2913965203b1b491f/volumes/d0bdc2ef-8827-441f-84ad-3edf52616bdb/action], error message: {"badRequest": {"message": "Invalid volume: Updating volume metadata is not allowed for volumes in uploading status.", "code": 400}}

Change-Id: Ibc534b1a66f08e71e40780457eadba87ca7dda81
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
4 years agoUpdate packer version to 1.4.4 42/61742/4
Aric Gardner [Fri, 4 Oct 2019 05:09:42 +0000 (10:39 +0530)]
Update packer version to 1.4.4

Update packer version to 1.4.4, which fixes the issue
with the metadata update failure during image update.

https://github.com/hashicorp/packer/pull/8016

Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Change-Id: Ibe2ee5e7b22008fd6ee7ec29361bbe110da5cbac

4 years agoMerge "Change PyPI merge repo default and fix doc URL"
Aric Gardner [Thu, 3 Oct 2019 15:54:26 +0000 (15:54 +0000)]
Merge "Change PyPI merge repo default and fix doc URL"

4 years agoChange PyPI merge repo default and fix doc URL 06/61906/1
Lott, Christopher (cl778h) [Thu, 3 Oct 2019 13:54:28 +0000 (09:54 -0400)]
Change PyPI merge repo default and fix doc URL

Correct doc .pypirc test URL to https://test.pypi.org/legacy/
Change doc .pypirc to use API tokens instead of username/password.
Use pypi-test as the default repository name in the PyPI merge template
(instead of "staging") to match established ONAP practice.

Change-Id: Id8a6f253f05a7c15790f45979d7dc47039aaf5cd
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
4 years agoFix auto update image script to compare image type 05/61905/1
Anil Belur [Thu, 3 Oct 2019 11:46:12 +0000 (17:16 +0530)]
Fix auto update image script to compare image type

Fix auto update image script to compare the image type before
updating an the image in the source repository. This fixes the
bug that updates images although they are the same flavour but
a diffirent type.

Issue: RELENG-2352
Change-Id: Ibaaeea41fb3d8a413e527c56b898a1fecadf5d22
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoGlobal JJB use python3 versions of lftools and jjb 76/61876/8
Tim Johnson [Mon, 30 Sep 2019 16:08:39 +0000 (09:08 -0700)]
Global JJB use python3 versions of lftools and jjb

Create LF bash 'library' and install in ~jenkins

Issue: RELENG-2411
Change-Id: I211c85b9823ca5582a263ec145797d4de9424e10
Signed-off-by: Tim Johnson <tijohnson@linuxfoundation.org>
4 years agoAdd missing DRY_RUN parameter in PyPI merge 01/61901/1
Lott, Christopher (cl778h) [Wed, 2 Oct 2019 17:35:10 +0000 (13:35 -0400)]
Add missing DRY_RUN parameter in PyPI merge

Add DRY_RUN parameter to the PyPI verify and merge template common
macro because it's required by the pypi_upload.sh script.
Also adjust verbosity of shell scripts - quiet down pip, add
repository name to output.

Change-Id: I947ee16fb6e42a6a3ec0f0de2722a6ecf7200ceb
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
4 years agoAdjust Jenkins triggers in PyPI templates 86/61886/4 v0.44.1
Lott, Christopher (cl778h) [Tue, 1 Oct 2019 10:37:56 +0000 (06:37 -0400)]
Adjust Jenkins triggers in PyPI templates

- In the PyPI merge template, add cron parameter to support daily
  build and push to a staging repo, like the maven merge template.
- In PyPI release templates, change name of gerrit and github trigger
  file patterns parameter. This avoids accidental overriding by jobs
  that limit their actions to subdirectories. The release file patterns
  are hardcoded in a shell script. Remove params from doc.
- In all PyPI templates, add disabled option and disable-job parameter
  to be consistent with other python templates.

Change-Id: Ib2934728efbb4d957ad622dc84f1ee2a8383a27c
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
4 years agoImprove doc in maven job groups 64/61864/3
Lott, Christopher (cl778h) [Fri, 27 Sep 2019 18:25:05 +0000 (14:25 -0400)]
Improve doc in maven job groups

Improve documentation about use of git, maven, docker.
Fold in maven-docker-job-groups file content and drop that file.
Move maven-docker test file into maven-jobs subdirectory.
No functional change.

Issue: RELENG-908
Change-Id: Ifca5364acfcd9afdb98b25afeb1d089d95311e34
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
4 years agoFix rtd verify for lftools 59/61859/2
Aric Gardner [Fri, 27 Sep 2019 16:11:03 +0000 (12:11 -0400)]
Fix rtd verify for lftools

lftools docs build runs literal lftools commands
these commands are only avaliable if the current patchset
is installed.

this part is a bit of a hacke, suggestions welcome.
also, if anyone knows how this ever worked before,
id love to know.

Also, install tox so that path has python 3 version of tox
first in path.

Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: Ic3f9bd788db851bec815e86d57a1788e7eae945a

4 years agoRTD builds, python version should be python3 47/61847/1
Aric Gardner [Thu, 26 Sep 2019 17:12:39 +0000 (13:12 -0400)]
RTD builds, python version should be python3

Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: Ib44e4291a88be05983d8df3bbf389403ad1a329e

4 years agoChange Packer version back to 1.4.2 42/61842/2
Eric Ball [Wed, 25 Sep 2019 22:00:27 +0000 (15:00 -0700)]
Change Packer version back to 1.4.2

Packer 1.4.3 frequently has issues setting metadata after a build
completes.
There is a WIP change[0] to upgrade to 1.4.4, but per notes there,
it will not be available until October. Until then, the version
should be downgraded instead, as all Packer builds with 1.4.3 are
failing.

0: https://gerrit.linuxfoundation.org/infra/c/releng/global-jjb/+/61742

Change-Id: Ideb5aa607a9fccbd319e4638413414c5cb4c8a23
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
4 years agoMerge "Revert "Fix rtd verify job choosing strategy""
Aric Gardner [Wed, 25 Sep 2019 18:35:57 +0000 (18:35 +0000)]
Merge "Revert "Fix rtd verify job choosing strategy""

4 years agoCapture sudo log on builders 65/61665/7
Tim Johnson [Mon, 9 Sep 2019 17:51:54 +0000 (10:51 -0700)]
Capture sudo log on builders

Created new script sudo-logs.sh to archive the sudo logs

Issue: RELENG-1994
Change-Id: I86a44e6abf18e35c7dc0e1840797e0dde5c764fb
Signed-off-by: Tim Johnson <tijohnson@linuxfoundation.org>
4 years agoRevert "Fix rtd verify job choosing strategy" 38/61838/1
Chris Lott [Wed, 25 Sep 2019 16:12:51 +0000 (16:12 +0000)]
Revert "Fix rtd verify job choosing strategy"

This reverts commit c02c7a2ac05e3a9b987edc15d555a5124a2ad976.

Reason for revert: Acumos RTD jobs are triggered by commits to ANY Acumos repo on a *.rst file.  This change causes the doc job to checkout the commit ID from that other repo, which is never present in the doc repo.

Issue-ID: RELENG-911
Change-Id: Icab10bb8b0e3e3cc28458751a9de1edf88fdc3d7
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
4 years agoMerge "Lift PyPI templates to Global-JJB from Acumos" v0.44.0
Jessica Wagantall [Wed, 25 Sep 2019 10:10:53 +0000 (10:10 +0000)]
Merge "Lift PyPI templates to Global-JJB from Acumos"

4 years agoMove python version to python3 10/61810/7
Aric Gardner [Mon, 23 Sep 2019 17:27:05 +0000 (13:27 -0400)]
Move python version to python3

Remove pin workarounds for python2
install tox via python3 pip
so that the version of tox is run from
/home/jenkins/.local/lib/python3.6/site-packages/tox/__init__.py
fix release-job to use venv

Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I4b2d778f3fd81565c5dd009d50c969696faba0d2
Signed-off-by: Tim Johnson <tijohnson@linuxfoundation.org>
4 years agoLift PyPI templates to Global-JJB from Acumos 32/16632/43
Lott, Christopher (cl778h) [Wed, 21 Aug 2019 14:54:25 +0000 (10:54 -0400)]
Lift PyPI templates to Global-JJB from Acumos

New templates provide features to build and push Python
source and binary distributions to a PyPI repository.
Check version string and push a tag on release.

New job groups:
    {project-name}-gerrit-pypi-jobs
    {project-name}-github-pypi-jobs

New templates:
    {project-name}-pypi-verify-{stream}
    gerrit-pypi-verify
    github-pypi-verify
    {project-name}-pypi-merge-{stream}
    gerrit-pypi-merge
    github-pypi-merge
    {project-name}-pypi-release-verify-{stream}
    gerrit-pypi-release-verify
    github-pypi-release-verify
    {project-name}-pypi-release-merge-{stream}
    gerrit-pypi-release-merge
    github-pypi-release-merge

Change-Id: If74925623f2a5804de8684b9a9933573dfea29a1
Issue-Id: RELENG-2317
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
4 years agoGlobal JJB Fatal Shellcheck Errors 03/61803/1
Tim Johnson [Fri, 20 Sep 2019 22:21:31 +0000 (15:21 -0700)]
Global JJB Fatal Shellcheck Errors

Fix all tox warnings/errors

Issue: RELENG-1214
Change-Id: Ic4c1743828dbe4a230eaf2950c03d8c7fbfaf458
Signed-off-by: Tim Johnson <tijohnson@linuxfoundation.org>
4 years agoChange sonar trigger to run-sonar 70/61770/3
Bengt Thuree [Wed, 18 Sep 2019 08:56:15 +0000 (10:56 +0200)]
Change sonar trigger to run-sonar

It was stage-release, and with this change it
will be similar to other jobs.

Signed-off-by: Bengt Thuree <bthuree@linuxfoundation.org>
Change-Id: I4c458979ec696c7d368bf410dabaa43ee7abb2f7

4 years agoSet DISTRIBUTION_TYPE to choice 81/61781/1
Thanh Ha [Thu, 19 Sep 2019 16:17:37 +0000 (12:17 -0400)]
Set DISTRIBUTION_TYPE to choice

As for as I can tell from the release_job.sh file there are only 3
valid options "None" as the default and choices are container or maven.

Set parameter to choices to help the user of the job select the right
option.

Change-Id: I587d63103011b9f42252a58ce3a79c44b46ceefd
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
4 years agoMerge "Add sonar-prescan jobs"
Jessica Wagantall [Tue, 17 Sep 2019 23:56:24 +0000 (23:56 +0000)]
Merge "Add sonar-prescan jobs"

4 years agoMerge "Allow java opts in WS scans"
Jessica Wagantall [Tue, 17 Sep 2019 17:02:58 +0000 (17:02 +0000)]
Merge "Allow java opts in WS scans"

4 years agoAllow java opts in WS scans 43/61743/2
Jessica Wagantall [Mon, 16 Sep 2019 23:47:54 +0000 (16:47 -0700)]
Allow java opts in WS scans

Allow java options for WhiteSource
Unified Agent calls

Issue: RELENG-2387
Change-Id: I4b0d717a38448e1a8ced1ba63416c1b0a92d26e2
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
4 years agoMerge "Fix rtd verify job choosing strategy"
Aric Gardner [Mon, 16 Sep 2019 23:30:54 +0000 (23:30 +0000)]
Merge "Fix rtd verify job choosing strategy"

4 years agoFix rtd verify job choosing strategy 22/61722/4
Houa Yang [Fri, 13 Sep 2019 16:03:35 +0000 (11:03 -0500)]
Fix rtd verify job choosing strategy

Change default setting of choosing strategy from default to gerrit
for rtd verify job. If the stratgey is not gerrit, you will need
to manually set the choosing strategy to gerrit in the jenkins job
before you can build using a specific parameter refspec.

Issue-Id:RELENG-911

Signed-off-by: Houa Yang <hyang@contractor.linuxfoundation.org>
Change-Id: If5f10f83048b907123bf423394ef0adf85607806

4 years agoAdd template to update OpenStack cloud images 19/61719/10
Anil Belur [Mon, 16 Sep 2019 17:18:02 +0000 (22:48 +0530)]
Add template to update OpenStack cloud images

This job finds and updates OpenStack cloud images on the
ci-management source repository.

The job is triggered in two ways:

1. When a packer merge job completes, the new image name created is
   passed down to the job.
2. Manually trigger the job to update all images.

When the job is triggered through an upstream packer merge job, this
only generates a change request for the new image built.

When the job is triggered manually, this job finds the latest
images on OpenStack cloud and compares them with the images currently
used in the source ci-management source repository. If the compared
images have newer time stamps are **all** updated through a change
request.

This job requires a Jenkins configuration merge and verify job setup and
working on Jenkins.

Issue: RELENG-2352
Change-Id: I2c75407bbe9d6866ded492310b8d34b47c3a1341
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agopyenv pick latest installed version 39/61739/4
Aric Gardner [Mon, 16 Sep 2019 15:32:36 +0000 (11:32 -0400)]
pyenv pick latest installed version

Logic to pick latest version of pyev.
Builders may have diffrent versions installed.

Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I2eb5cc75d815778bb35f166d1512711705b6ccd7

4 years agoUpdate WhiteSource scan timer 29/61729/2
Jessica Wagantall [Fri, 13 Sep 2019 19:47:11 +0000 (12:47 -0700)]
Update WhiteSource scan timer

Run WhiteSource jobs weekly on Sunday.

Issue: RELENG-2386
Change-Id: I26d5b4a89e262ff2b046bdae8298e61597b71bc1
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
4 years agoAdd sonar-prescan jobs 15/61715/2
Eric Ball [Fri, 13 Sep 2019 01:26:06 +0000 (18:26 -0700)]
Add sonar-prescan jobs

These jobs allow the caller to provide a builder that runs prior to
the Sonar scan.

Issue: RELENG-2314
Change-Id: I97ec30b27c83a7ce1ac7dc8a1736672dc8d15eee
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
4 years agoMerge "Update release docs."
Andrew Grimberg [Fri, 13 Sep 2019 17:25:12 +0000 (17:25 +0000)]
Merge "Update release docs."

4 years agoUpdate release docs. 69/61669/4
Aric Gardner [Mon, 9 Sep 2019 20:32:05 +0000 (16:32 -0400)]
Update release docs.

Add note about adding env variables to global-vars-releng.sh

Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I3596434d7601829fdd92f27ce0646006452a4c89

4 years agoPin more-itertools for python2 21/61721/4
Aric Gardner [Fri, 13 Sep 2019 15:31:00 +0000 (11:31 -0400)]
Pin more-itertools for python2

Pin more-itertools for python2 tox-install
tox-pyenv requires more-itertools.
Force to a compatible version if pip installed
via python2

Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: Ia5ade84925cdc6eac2f3407cb732eaf4946769e4

4 years agoPin python-cinderclient to 4.3.0. 18/61718/1 v0.43.1
Anil Belur [Fri, 13 Sep 2019 07:28:33 +0000 (12:58 +0530)]
Pin python-cinderclient to 4.3.0.

A new version of python-cinderclient 5.0.0 is released which breaks
the openstack jobs.

ImportError: No module named v1.contrib

Issue: IT-17567
Change-Id: I2736c464ff82a3b08433031a5e924e1345c2c317
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoCleanup tox warnings 13/61713/3
Tim Johnson [Thu, 12 Sep 2019 22:58:33 +0000 (15:58 -0700)]
Cleanup tox warnings

Issue: RELENG-2365
Change-Id: I5a739a4446bfeabf73d020e6f72a8440b9d1c913
Signed-off-by: Tim Johnson <tijohnson@linuxfoundation.org>
4 years agoUpdate release container info 04/61704/4
Jessica Wagantall [Wed, 11 Sep 2019 23:28:17 +0000 (16:28 -0700)]
Update release container info

- Update schema to require pull and push container
registries
  - This will fix issues where for example ONAP pulls from
    snapshots exclusively where other projects like O-RAN
    use both snapshots or staging.
  - Allows for future push to DockerHub
  - Benefits projects like O-RAN and Acumos where they already
    provide this information for other docker jobs.
  - Pull and push registries need to be defined as Jenkins
    global variables.
  - Can be overwritten in releases files.
- Update some echos to allow users to find information faster.

Change-Id: Ibd0088c6419bacca16ded4ae86d70304c5bad45c
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
4 years agoFix WS CLI Agent calls 09/61709/1
Jessica Wagantall [Thu, 12 Sep 2019 18:22:42 +0000 (11:22 -0700)]
Fix WS CLI Agent calls

Remove quotes from optional variable
WSS_UNIFIED_AGENT_OPTIONS which, if empty, will
cause WS Unified Agent CLI issues.
Upgrade WS Unified Agent CLI to latest version 19.8.1

Change-Id: I3d21bad21bceee0a0c626b145c1ca74e0cd21ddc
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
4 years agoFix import key release jobs 99/61699/1 v0.43.0
Jessica Wagantall [Wed, 11 Sep 2019 20:17:37 +0000 (13:17 -0700)]
Fix import key release jobs

Import GPG signing key before verifying Gerrit
tag details.

Change-Id: I132fb8dbba51de995b0e42765344bf218340415c
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
4 years agoMerge "Add python templates to run tox on merge"
Aric Gardner [Wed, 11 Sep 2019 15:22:00 +0000 (15:22 +0000)]
Merge "Add python templates to run tox on merge"

4 years agoAdd python templates to run tox on merge 21/16621/6
Lott, Christopher (cl778h) [Tue, 20 Aug 2019 15:46:31 +0000 (11:46 -0400)]
Add python templates to run tox on merge

Makes the Python job groups and templates parallel to
the maven job groups and templates.  Although no build
is required by most Python projects, re-testing after
merge is a chance to reveal failures in the new tree.

Change-Id: I1fb793e08deb435a838d76d634dbbad730a3d7fa
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
4 years agoMerge "Use configured python version to install tox-pyenv"
Aric Gardner [Wed, 11 Sep 2019 11:52:55 +0000 (11:52 +0000)]
Merge "Use configured python version to install tox-pyenv"

4 years agoUse configured python version to install tox-pyenv 63/61663/4
Lott, Christopher (cl778h) [Mon, 9 Sep 2019 15:08:37 +0000 (11:08 -0400)]
Use configured python version to install tox-pyenv

Revise the tox-install.sh script to use PYTHON env var to invoke pip,
instead of hardcoded 'python'.
Add python-version parameter to Read-The-Docs doc, macro and templates.

Change-Id: Ib0fe98dca62ce67f0ad002036b54f02faf27e888
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Issue: RELENG-2361

4 years agoMerge "Fix self release script indent"
Jessica Wagantall [Mon, 9 Sep 2019 20:54:53 +0000 (20:54 +0000)]
Merge "Fix self release script indent"

4 years agoRemove passive voice in doc to silence warnings 50/61650/2
Lott, Christopher (cl778h) [Sun, 8 Sep 2019 11:04:37 +0000 (07:04 -0400)]
Remove passive voice in doc to silence warnings

The write-good feature as invoked by tox coala WriteGoodLintBear
complains about usage of passive voice e.g., 'is applied'.
These changes silence all but two warnings about use of the word
'validate' which is a well-known Maven goal.
This makes no functional change to any templates.

Change-Id: I5a68a475997cbeeae5ce41a2e487d67cc3c2644f
Issue: RELENG-2365
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
4 years agoFix self release script indent 49/61649/1
Anil Belur [Sun, 8 Sep 2019 03:56:42 +0000 (09:26 +0530)]
Fix self release script indent

Use 4 spaces indent. This makes the code easily readable
and consistant with rest of the code in global-jjb.

Change-Id: I62edca97517fe456d0fe688e2826b0d0fce8432a
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoRepair tox-sonar behavior by restoring mvn goal 12/61612/3
Lott, Christopher (cl778h) [Fri, 6 Sep 2019 00:38:46 +0000 (20:38 -0400)]
Repair tox-sonar behavior by restoring mvn goal

Use existing builder lf-infra-maven-sonar, drop the locally
defined builder lf-infra-tox-sonar, to get desired behavior
of generating code analysis then publishing to Sonar. This
broke when hardcoded goals were removed from maven-sonar.sh.

Change-Id: I862c4857d60361d77b390425d50f3c7c77e3919d
Issue: RELENG-2359
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
4 years agoUpdate release vars functions 83/61583/7
Jessica Wagantall [Wed, 4 Sep 2019 00:25:52 +0000 (17:25 -0700)]
Update release vars functions

Release schema verification needs to happen
first before we attempt to assign values to
the variables.

Organize variable setup into functions.
Maven release files expects different variables
than container release files.

Rename "version" variable in container release
files to "container_release_tag" which is a
better user friendly name given the fact that
container versions are rather called tags.
Internally, we still process it as "version"
to allow reuse of the tag function.

Issue: RELENG-2353
Change-Id: Ie0456a1fa87ea62855cb5d1140f6ae9f32b3e566
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
4 years agoMerge "Clarify limit of one release yaml file"
Aric Gardner [Wed, 4 Sep 2019 16:21:48 +0000 (16:21 +0000)]
Merge "Clarify limit of one release yaml file"

4 years agoClarify limit of one release yaml file 78/61578/3
Lott, Christopher (cl778h) [Tue, 3 Sep 2019 19:06:03 +0000 (15:06 -0400)]
Clarify limit of one release yaml file

Specify that Centos + Sigul + Docker are required.
Rewrap all paragraphs to eliminate long lines.

Change-Id: I57f46405cb962aed31c578354147b2b414da811f
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
4 years agoRemove the unused MAVEN_CENTRAL_URL variable 86/61586/1
Anil Belur [Wed, 4 Sep 2019 11:48:26 +0000 (17:18 +0530)]
Remove the unused MAVEN_CENTRAL_URL variable

Remove the unused MAVEN_CENTRAL_URL variable. The self-release job is
designed to work with any Nexus repository info published in
`staging-repo.txt.gz`, which makes the `MAVEN_CENTRAL_URL` redundant,
hence remove the unused variable.

Issue: RELENG-2129
Change-Id: Iabb772d908f8001a6626d728a9140ff14e3088f2
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoMinor rewording and reformatting of release doc 76/61576/3
Lott, Christopher (cl778h) [Tue, 3 Sep 2019 17:53:27 +0000 (13:53 -0400)]
Minor rewording and reformatting of release doc

Change-Id: I4d91d42bc2bd5cee4ae1e8dcebaba659bc168b6a
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
4 years agoMerge "INFO validate job improvements"
Anil Belur [Sat, 31 Aug 2019 03:04:35 +0000 (03:04 +0000)]
Merge "INFO validate job improvements"

4 years agoAdd Sonar plug-in configurations to docs 48/61548/1
Houa Yang [Fri, 30 Aug 2019 14:23:08 +0000 (09:23 -0500)]
Add Sonar plug-in configurations to docs

Add documentation for configuring the Jenkins Sonarqube Scanner plug-in.

Signed-off-by: Houa Yang <hyang@contractor.linuxfoundation.org>
Change-Id: I21b21efc6cefa3f4f643a0235d670c6e1ec4ac08

4 years agoINFO validate job improvements 36/61536/3
Aric Gardner [Thu, 29 Aug 2019 18:54:03 +0000 (14:54 -0400)]
INFO validate job improvements

removed +x trace as job is too verbose

verify now checks that repositories matches $PROJECT
Catches projects that replace / with - in their INFO file
Also ensures that repositories only has one entry.
We are not supporting multiple projects with a single INFO.yaml
file.

ISSUE: RELENG-2344
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: Id847b7c10ef0515fd6f6a4b7d6809ebd37a9b51d

4 years agoMerge "Remove detox in favor of tox --parallel"
Anil Belur [Thu, 29 Aug 2019 14:49:46 +0000 (14:49 +0000)]
Merge "Remove detox in favor of tox --parallel"

4 years agoUpdate lftools version to v0.26.2 20/61520/1 v0.42.1
Anil Belur [Wed, 28 Aug 2019 18:52:30 +0000 (00:22 +0530)]
Update lftools version to v0.26.2

Change-Id: I069dda979d203b1960821e4d112a5591843fd441
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoAdd DRY_RUN param to the release job 20/16720/5
Anil Belur [Wed, 28 Aug 2019 18:02:03 +0000 (23:32 +0530)]
Add DRY_RUN param to the release job

Add DRY_RUN build param to do a test run the job with
publishing artifacts.

Change-Id: I1b015db4be8ed3e8c39bec2cefe022819e31e59f
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoMerge "Verify both repos before attempting release"
Anil Belur [Wed, 28 Aug 2019 16:31:17 +0000 (16:31 +0000)]
Merge "Verify both repos before attempting release"

4 years agoVerify both repos before attempting release 19/16719/3
Aric Gardner [Wed, 28 Aug 2019 15:39:00 +0000 (11:39 -0400)]
Verify both repos before attempting release

We have run into a case where the repo on ODL
was good, and the repo on nexus was failed.
Cover this case by running the loop twice.

Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I995a34918481db9e41d5486c06995f57100c1199

4 years agoRemove detox in favor of tox --parallel 16/16716/2
Thanh Ha [Tue, 27 Aug 2019 22:13:38 +0000 (18:13 -0400)]
Remove detox in favor of tox --parallel

Tox officially supports parallel mode as of Tox 3.7 so drop the
usage of detox. Set parallel mode to 'auto' which will run as many
threads as available CPUs.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: Id59ad10ed9b521a5c0ca3fef3e7e15053c2dc32c

4 years agoFix cmake docs 15/16715/2
Houa Yang [Tue, 27 Aug 2019 21:32:58 +0000 (16:32 -0500)]
Fix cmake docs

Remove unnecessary info for :install-prefix parameter.

Issue: RELENG-2210

Signed-off-by: Houa Yang <hyang@contractor.linuxfoundation.org>
Change-Id: I6cebee91b62f240c9cd8ade4b80573621b060ef0

4 years agoConfigure basepython to python3 06/16706/2
Thanh Ha [Tue, 27 Aug 2019 19:08:54 +0000 (15:08 -0400)]
Configure basepython to python3

More and more libraries that we are pulling in require Python 3 so
to avoid having to play the pin dependencies whack-a-mole game let's
bump or base python where possible to python3.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I65208f80b9f0479a10b1a8b6a4ba52956c2c3e3c

4 years agoUpgrade lftools to v0.26.1 77/16677/1 v0.42.0
Anil Belur [Tue, 27 Aug 2019 03:25:00 +0000 (08:55 +0530)]
Upgrade lftools to v0.26.1

Change-Id: I66a72fcb7cff0148eb0f680df13e8744b17c7025
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoFix use-release-file varaible 73/16673/3
Jessica Wagantall [Mon, 26 Aug 2019 20:59:33 +0000 (13:59 -0700)]
Fix use-release-file varaible

Rename "RELEASE_FILE" parameter to "USE_RELEASE_FILE" in
release-jobs. This will match the actual varaible default value
better and will not collide with the local "release_file" in
the script.

Fix "USE_RELEASE_FILE" if statement. We are now using a bool
instead of a string.

Changing the if statements to evaluate bools.

Change-Id: I9909a16487fabacc0261f6489ac81a00cbf0f965
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoPin more-itertools~=5.0.0 69/16669/4
Anil Belur [Mon, 26 Aug 2019 19:12:17 +0000 (00:42 +0530)]
Pin more-itertools~=5.0.0

Pin more-itertools ~= 5.0.0, since version 6.0.0 requires Python 3.4
https://github.com/erikrose/more-itertools/releases

Error:
more-itertools requires Python '>=3.4' but the running Python is 2.7.5

Pin tox~<3.5.0

Change-Id: I1f2eefefc3f5b58a14441db78fb3f0bf9061e711
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoMerge "Add pre-build scripts to Python templates"
Eric Ball [Sat, 24 Aug 2019 00:25:49 +0000 (00:25 +0000)]
Merge "Add pre-build scripts to Python templates"

4 years agoAdd support for container releases 70/16470/47
Aric Gardner [Wed, 7 Aug 2019 18:05:51 +0000 (14:05 -0400)]
Add support for container releases

- Add support for distribution_type container
- Add conditional build step.
If {build-node} is ^.*-docker-.*
docker login will occur for verify and merge.
- Trigger updated to support hidden releases
directory. (releases\/.*\.yaml|\.releases\/.*\.yaml)
- Container support:
    container_release_file example:

        containers:
            - name: example
            version: 1.5.1-20190806T184921Z

    - Verify pulls container
    - Grab the image_id
    - Merge
    - Apply tag
    - Push the container

ISSUE: RELENG-2292
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: Ibc6cf1a22bd6c0136a94d2b434c6cd332c12b43f

4 years agoAdd pre-build scripts to Python templates 52/16652/3
Lott, Christopher (cl778h) [Fri, 23 Aug 2019 12:36:56 +0000 (08:36 -0400)]
Add pre-build scripts to Python templates

New parameter pre-build-script accepts a shell script
that can install prerequisite libraries, rearrange the
source tree to cope with nested projects, etc.

Change-Id: I1fd7c2c094a664244e697ff5a61b82a2e7752faa
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
4 years agoMerge "Add lf-sonar-common job-template"
Eric Ball [Fri, 23 Aug 2019 22:25:38 +0000 (22:25 +0000)]
Merge "Add lf-sonar-common job-template"

4 years agoMerge "Allow Build with Params releases"
Aric Gardner [Fri, 23 Aug 2019 18:13:56 +0000 (18:13 +0000)]
Merge "Allow Build with Params releases"

4 years agoAllow Build with Params releases 47/16647/3
Aric Gardner [Fri, 23 Aug 2019 00:02:05 +0000 (17:02 -0700)]
Allow Build with Params releases

Add support for "Build with Parameters" for projects
that do not want to use a release file for maven builds.
Restructure shell/release-job.sh into functions.

Change-Id: Iada9c9a50710c24fbfe87b2ea0def10f3dd04bd7
Authored-By: Aric Gardner <agardner@linuxfoundation.org>
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
4 years agoAdd lf-sonar-common job-template 71/16571/8
Houa Yang [Thu, 15 Aug 2019 21:40:44 +0000 (16:40 -0500)]
Add lf-sonar-common job-template

Add lf-sonar-common job-template for sonar-project.properties

Issue: RELENG-1304

Signed-off-by: Houa Yang <hyang@contractor.linuxfoundation.org>
Change-Id: I6788bf9afb3b25fb751b806f08fddcf2fed42d26

4 years agoFix release-schema.yaml 46/16646/1
Jessica Wagantall [Thu, 22 Aug 2019 23:23:16 +0000 (16:23 -0700)]
Fix release-schema.yaml

Fix missing extension in ID for release-schema.yaml.

Make "distribution_type" mandatory in future
release files.

Change-Id: I813f6b863fabfafcc9560df753c380675e8cc09e
Co-Authored-By: Aric Gardner <agardner@linuxfoundation.org>
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
4 years agoMerge "Upgrade lftools to v0.26.0" v0.41.0
Andrew Grimberg [Mon, 19 Aug 2019 21:52:32 +0000 (21:52 +0000)]
Merge "Upgrade lftools to v0.26.0"

4 years agoMerge "Update packer-version to 1.4.3"
Andrew Grimberg [Mon, 19 Aug 2019 21:42:57 +0000 (21:42 +0000)]
Merge "Update packer-version to 1.4.3"

4 years agoHard code release job compare pattern. 02/16602/6
Aric Gardner [Mon, 19 Aug 2019 19:07:54 +0000 (15:07 -0400)]
Hard code release job compare pattern.

This change:
https://gerrit.acumos.org/r/c/ci-management/+/4979

The project section has:
gerrit_trigger_file_paths:
  - compare-type: REG_EXP
  pattern: '^((?!migrate-cms-to-cds|\/COMMIT_MSG).)*$'

This is overwriting the default parameters of this job.

gerrit_trigger_file_paths:
  - compare-type: REG_EXP
    pattern: "releases/*.yaml"

I belive I should hard code this value so that this
does not happen.

Pattern going forward will actually support
pattern: '(releases\/.*\.yaml|\.releases\/.*\.yaml)'

I will update 16470 and hard code as well, if this is
merged.

ISSUE: RELENG-2316
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: Ib520672a548f34762c723972152abea898cd98a8

4 years agoUpdate packer-version to 1.4.3 01/16601/3
Suresh Channamallu [Mon, 19 Aug 2019 18:52:59 +0000 (14:52 -0400)]
Update packer-version to 1.4.3

This new packer version fixed an issues in
docker image, where its unable to install the
packages into docker containers due to checking
of wrong container OS.

Fix in 1.4.3:
builder/docker: Check container os, not host os,
when creating container dir default [GH-7939]

Issue: RELENG-2180
Signed-off-by: Suresh Channamallu <schannamallu@linuxfoundation.org>
Change-Id: I3fe36e5669942d1f7fadfd2b711f9d7a3ca1e5a9

4 years agoUpgrade lftools to v0.26.0 73/16573/1
Anil Belur [Fri, 16 Aug 2019 02:48:13 +0000 (08:18 +0530)]
Upgrade lftools to v0.26.0

Change-Id: Iaa97109a097a85d0847372b8d7c9515960a4cd2e
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoUpdate release-jobs docs. 91/16491/2
Aric Gardner [Thu, 8 Aug 2019 17:02:19 +0000 (13:02 -0400)]
Update release-jobs docs.

Feedback has allowed me to
Clarify the procedure

Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I421cb6eebfccb48bde02d2a9d75ff020f895fde3

4 years agoMerge "Resolve ShellCheck errors in shell scripts"
Andrew Grimberg [Thu, 8 Aug 2019 16:44:56 +0000 (16:44 +0000)]
Merge "Resolve ShellCheck errors in shell scripts"

4 years agoUse --config-xml option for JJB archives 79/16479/2
Thanh Ha [Thu, 8 Aug 2019 02:20:22 +0000 (22:20 -0400)]
Use --config-xml option for JJB archives

The --config-xml option will produce actual config xml files in the
format 'job_name/config.xml' similar to the jobs directory in Jenkins
master instead of creating generically named 'job_name' files.

This allows the jobs to be dropped into a Jenkins jobs directory
path and Jenkins will be able to pick it up.

This is potentially useful for the ability to quickly drop in the
config into a Jenkins test environment.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I59517d905a2448e46c50d98a471e10d7ca0fb808

4 years agoResolve ShellCheck errors in shell scripts 80/16480/1
Thanh Ha [Thu, 8 Aug 2019 02:32:05 +0000 (22:32 -0400)]
Resolve ShellCheck errors in shell scripts

* SC2086: Double quote to prevent globbing and word splitting.
* SC2027: The surrounding quotes actually unquote this.
          Remove or escape them.
* SC2016: Expressions don't expand in single quotes,
          use double quotes for that.
* SC2236: Use -n instead of ! -z.
* SC2233: Remove superfluous (..) around condition.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I73207aa87646472bdb1c7848ba9608ac702bda53

4 years agoMerge "Use release credentials only for merge job wrappers" v0.40.4
Jessica Wagantall [Tue, 6 Aug 2019 23:18:55 +0000 (23:18 +0000)]
Merge "Use release credentials only for merge job wrappers"

4 years agoMerge "Spell check fixes in release-jobs docs"
Aric Gardner [Tue, 6 Aug 2019 15:00:49 +0000 (15:00 +0000)]
Merge "Spell check fixes in release-jobs docs"

4 years agoUse release credentials only for merge job wrappers 51/16451/2
Anil Belur [Tue, 6 Aug 2019 03:38:38 +0000 (13:38 +1000)]
Use release credentials only for merge job wrappers

Release creds are only required for promoting the repo, which uses diff ACL
as compared to normal user.

Therefore dont use the release creds for the verify jobs and the
scm sections in both the job templates.

Issue: RELENG-2129
Change-Id: Ibb36d11ba57c5e59a63c414b0b338846eefd8983
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoHad an if where I needed a fi 52/16452/2
Aric Gardner [Tue, 6 Aug 2019 02:08:41 +0000 (22:08 -0400)]
Had an if where I needed a fi

Also the git fetch needs the dashed version
git fetch "$PATCH_DIR/${PROJECT//\//-}.bundle"

Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: Ib4245be2b46645fca93225a5c32efb904acd68c8

4 years agoUpgrade lftools version to v0.25.4 50/16450/1
Anil Belur [Tue, 6 Aug 2019 00:15:37 +0000 (10:15 +1000)]
Upgrade lftools version to v0.25.4

Change-Id: I10460e230bccbf69cf8e8e12244f6c7a88cdccca
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoSpell check fixes in release-jobs docs 30/16430/2
Anil Belur [Sun, 4 Aug 2019 01:10:28 +0000 (11:10 +1000)]
Spell check fixes in release-jobs docs

Change-Id: I76aacf289bd46a1578c0741d58f2f3be4f48f28f
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoExit 0 if release job has already tagged a repo. 41/16441/14
Aric Gardner [Mon, 5 Aug 2019 17:32:04 +0000 (13:32 -0400)]
Exit 0 if release job has already tagged a repo.

The release merge job is a one way operation.
Given this, Release jobs should only exist in the format
{project-name}-release-verify
and
{project-name}-release-merge

They should trigger from a change to any branch/**
As a developer working on {example-branch} will not want to
check out master to push a new release file.

Edge Cases:
Inevitably a release file will be pulled in from master to {example-branch}
or a remerge will be requested
This will again trigger the release jobs.
since in this case the repo is already tagged, the job should not report
a failure.

This is solved by having the verfiy and merge exit 0 when the repo is already tagged

if git tag -v "$VERSION"; then
  echo "Repo already tagged $VERSION"
  echo "This job has already run exit 0"
  exit 0
if

Example Workflow - Milestone 0 is released from master:
releases/1.4.0.yaml (on branch master)
tag: 1.4.0
log_dir: 'optf-osdf-maven-stage-master/97/'

Repo is tagged and artifact is pushed!

Milestone 3 is released from dublin:
releases/1.4.3.yaml (on branch dublin)
tag: 1.4.3
log_dir: 'optf-osdf-maven-stage-dublin/20/'

Repo is tagged and artifact is pushed!

Note:
the ref is determined by the log file.
So We could check if this ref can be found on the {branch}
to reduce human errors.
example:
odlparent-maven-stage-4.0.x/152/patches/taglist.log.gz
has:
odlparent c8964051cf81e2bd5d831fe6e5d568c5eedeeb8e

Psudo code:
STREAM=${STREAM:-'nostream'}
echo "--> Checking if $ref is on stable/$STREAM"
if ! (git branch -a --contains $ref | grep "stable/$STREAM"); then
    echo "--> ERROR: $ref for $repo is not on stable/$STREAM!"
fi

Also in this patch:
To reduce possible errors:
Don't get project name from the release file:
PROJECT="$(niet ".project" "$release_file")"
we can just use ${PROJECT//\//-} when we need
the /'s changed to -'s

It will allways be correct when passed to jenkins
from gerrit

Also remove quiet from wget,
if there is a failure I want to see it on the console.

Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I1e95e864bc2b49a62b3f7016cb2f1292a6687d9a

4 years agoMerge "Add release notes for lftools v0.25.3 release" v0.40.3
Aric Gardner [Sun, 4 Aug 2019 23:26:45 +0000 (23:26 +0000)]
Merge "Add release notes for lftools v0.25.3 release"

4 years agoImprove the release job script 32/16432/1
Anil Belur [Sun, 4 Aug 2019 22:55:50 +0000 (08:55 +1000)]
Improve the release job script

Change-Id: Ie62e2f3771632012423e0b791aca1551b4b31112
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoUpdate the release job tigger 31/16431/2
Anil Belur [Sun, 4 Aug 2019 08:35:30 +0000 (18:35 +1000)]
Update the release job tigger

Update release job template to tigger on any branch name, and not just
'**/master'. ODL projects branches are version '4.0.x' which requires
passing the branch name to the template.

Issue: RELENG-2129
Change-Id: I9c29d1c986fee73f6bad4fe39af8f9ffbda201c6
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoAdd release notes for lftools v0.25.3 release 29/16429/1
Anil Belur [Sun, 4 Aug 2019 01:08:22 +0000 (11:08 +1000)]
Add release notes for lftools v0.25.3 release

This was missed in CR Id64b36e8f59d500800d6b9078f56b314348ed1f2

Change-Id: Ie5412ea5724db51fe1eb73fd5f9370b2b6e3b6d2
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoVerify job needs target/variable switch 28/16428/1 v0.40.2
Aric Gardner [Sat, 3 Aug 2019 15:59:44 +0000 (11:59 -0400)]
Verify job needs target/variable switch

Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I46501ed93f873c87a7d297398c1eb0dc9d23700f

4 years agoFix release-job.sh 26/16426/1 v0.40.1
Jessica Wagantall [Fri, 2 Aug 2019 23:04:08 +0000 (16:04 -0700)]
Fix release-job.sh

Use {GERRIT_PROJECT} when calling Gerrit in
release-merge job.

Change-Id: I0d62d5c713858e7e43b2fc6a6462813b01bea2f8
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
4 years agoFix signing pubkey declaration 25/16425/1
Andrew Grimberg [Fri, 2 Aug 2019 22:42:47 +0000 (15:42 -0700)]
Fix signing pubkey declaration

Change-Id: Id9fb1cfa8c992949266622e3a2ed2100e8bc78f6
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>