Aric Gardner [Tue, 22 Sep 2020 20:51:59 +0000 (16:51 -0400)]
Fix capture-instance-metadata.sh
bios_vendor file now says Xen, no amazon string
to match on any longer.
cat /sys/devices/virtual/dmi/id/bios_vendor
Xen
however result.json has the info we need.
/run/cloud-init/result.json
{
"v1": {
"datasource": "DataSourceEc2Local",
"errors": []
}
}
Issue-Id: RELENG-3163
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: Iece691579622608616a6abc8d27b9ca7653ad9ae
Aric Gardner [Thu, 17 Sep 2020 16:01:38 +0000 (12:01 -0400)]
Need to export SET_JDK_VERSION
This var is needed by the exteral script
must export so that it is inherited.
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I627e6ecb369a5f0dab1f047663d24ac8a07b6330
Aric Gardner [Mon, 14 Sep 2020 20:47:42 +0000 (16:47 -0400)]
Use java11 for sonar cloud upload
default to openjdk11
before calling sonarcloud upload.
sonar cloud upload will stop working
with java8 on october 1st
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I8c321b053a86e1f15149552af25b775353051444
Anil Belur [Thu, 10 Sep 2020 04:09:02 +0000 (04:09 +0000)]
Merge "Remove tox from python-tools-install."
Andrew Grimberg [Wed, 9 Sep 2020 20:36:48 +0000 (20:36 +0000)]
Merge "The openstack-cron job email report."
Aric Gardner [Wed, 9 Sep 2020 16:02:15 +0000 (12:02 -0400)]
Remove tox from python-tools-install.
If users need a system pip install of tox
they can include tox-install.
However, unless they need pyenv
I would suggest they use lf-env.
Order of system pip install of tox matters,
whichever one is installed most recently
is the one that is going to be called.
removing tox from python tools install
allows the install of tox in tox-install
to not be skipped, and in this way
we can ensure that the py3 version
is the once most recently installed
Issue-Id: RELENG-3189
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: Ie904f42821f6598a389854e8876448237cfac3dd
Andrew Grimberg [Thu, 3 Sep 2020 17:16:43 +0000 (17:16 +0000)]
Merge "Improve python-tools-install.sh alpine compat"
Aric Gardner [Thu, 3 Sep 2020 00:02:57 +0000 (20:02 -0400)]
workaround for bad tox on centos builders
system tox is py2.7 needs updated pip and setuptools.
this needs to be fixed in packer. tox is py3 on my machine
tox --version on builders shows
imported from /usr/lib/python2.7
should be
imported from /usr/lib/python3.6
also as tox is called from python2 and needs the zipp package
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I1f7230a8483ae3c33a574056492fb283d3f8eac2
Eric Ball [Thu, 3 Sep 2020 00:29:32 +0000 (17:29 -0700)]
Improve python-tools-install.sh alpine compat
Improve alpine compatibility by changing the mktemp call in
python-tools-install.sh to be compatible with both GNU mktemp as well
as BusyBox mktemp (which is used in alpine).
Change-Id: I7123d8928415c163ec26540c42fa0a96108b84e4
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
Anil Belur [Wed, 2 Sep 2020 04:27:35 +0000 (14:27 +1000)]
Check if ${NOMAD_DC} is undefined or unset
The condition in the commit
31a4b7fc00fe90494b6efb512ad0f1db02481ff3
should instead check when the environment variable $NOMAD_DC is not
defined or unset, this avoids the script from exiting without capturing
instance metadata.
Issue: RELENG-3142
Change-Id: I80240d77abfacb59c81e41e63629468350e24b7b
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Aric Gardner [Wed, 2 Sep 2020 17:01:19 +0000 (13:01 -0400)]
Tox is called from system python2
which tox
/usr/bin/tox
tox --version
3.14.5 imported from
/usr/lib/python2.7/site-packages/tox/__init__.pyc
if $PYTHON=python3 we are not updaing tox
to the lastest version.
for some reason running this old tox
broke things. this appears to fix.
Also revert the lfenv stuff that we
don't want in tox-run
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I2f964ec5123bd4a3b5fcc75f3d1ba38c0810cd8a
Jessica Wagantall [Mon, 31 Aug 2020 21:13:22 +0000 (14:13 -0700)]
Fix Python env issues - Part2
This is a follow up for commit
f4f795bda67897b1b1e527e99e0b5f627ca1a4db
The release-job.sh script needed the same fix
Issue-ID: IT-20528
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Change-Id: I88fbad702fcd329c062a1f86a415ba99325882ab
Aric Gardner [Tue, 25 Aug 2020 18:28:47 +0000 (14:28 -0400)]
The openstack-cron job email report.
The openstack-cron job should report to LF staff when it fails
Upgrade notes:
Will require all projects to add:
failure-notification: "releng+PROJECTCODE@linuxfoundation.org"
failure-notification-prefix: "[releng]"
to jjb/defaults.yaml
Issue-ID: IT-20409
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I0f4f9ad5f6e810898b9815d7ff66784557e2fc71
Aric Gardner [Mon, 31 Aug 2020 17:39:04 +0000 (13:39 -0400)]
Fix pypi build and upload.
No need for job to create its own
venv like this.
virtualenv -p python3 /tmp/pypi
this does not update virtualenv first
also it was failing, I think due to
needing a readline package update.
python3 -m venv is preferred.
however we have lf-env.sh, which does things properly.
se we are going to use it.
Issue-ID: IT-20528
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: If2b8369296256368659c41e9e77231d4442f55bd
Jessica Wagantall [Tue, 25 Aug 2020 22:15:42 +0000 (15:15 -0700)]
Run Sonar scans using JDK11.
java-version will only set java for the maven build
part of the job, the sonar scan will use
sonarcloud-java-version which is set to openjdk11.
Projects not compatible with JDK11 will be able to
run their build with java-version set to their JDK
preference.
https://sonarcloud.io/documentation/user-guide/move-analysis-java-11/
Issue: RELENG-3176
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Change-Id: Ida96043317da7671034416df6a438350041f4731
Jessica Wagantall [Fri, 21 Aug 2020 16:45:15 +0000 (09:45 -0700)]
Optionally set docker-tag to stream
If container-tag-method: stream, docker jobs will
use the value of the variable stream as docker tag.
Issue: IT-20480
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Change-Id: Ib595b6bf9439a45985cc41233f588cb0e56b7920
Andrew Grimberg [Thu, 20 Aug 2020 20:23:33 +0000 (20:23 +0000)]
Merge "Run packer against a specific builder"
Andrew Grimberg [Thu, 20 Aug 2020 19:57:49 +0000 (19:57 +0000)]
Merge "Fix job cost amazon exception"
Aric Gardner [Mon, 17 Aug 2020 20:03:58 +0000 (16:03 -0400)]
Fix job cost amazon exception
bios_vendor file now says Xen, no amazon string
to match on any longer.
cat /sys/devices/virtual/dmi/id/bios_vendor
Xen
however result.json has the info we need.
/run/cloud-init/result.json
{
"v1": {
"datasource": "DataSourceEc2Local",
"errors": []
}
}
Issue-Id: RELENG-3163
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I57e27fe5bb2135e738b33c0f6de78f1759bcb93d
Thanh Ha [Fri, 14 Aug 2020 14:09:35 +0000 (10:09 -0400)]
Run packer against a specific builder
As preparation to enable the ability to configure multiple builders
in a single packer template, we need to enable the ability in the
job to select which builder to run.
This patch sets up a new variable "packer-builder" which is used to
select the builder definition in the templates file.
Defaulting to "openstack" as that's the most common use case at the
moment.
Issue: RELENG-1052
Change-Id: Ib33a00f38a0005af69d52e7697322a2e84f6c674
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Jessica Wagantall [Tue, 18 Aug 2020 17:55:54 +0000 (10:55 -0700)]
Fix email notifications for lfdocs-conf releases
Unfortunatelly the name of the repo does not match the
configuration in the code and we need to make sure the
email notification announces the corrected name of the
project which should be lfdocs-conf.
Add a new PROJECT_SLUG variable to use in case the name
of the repo is different from its configuration.
Issue: IT-20404
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Change-Id: I0dc7b0088851ce8abf8238bc63e8e5bdbfc2ea9b
Thanh Ha [Sat, 15 Aug 2020 01:08:45 +0000 (21:08 -0400)]
Fix parallel tox mode when using bool jjb cfg
JJB takes in the word "true" unquoted as a boolean and converts it to
the Python "True" boolean causing the bash script to ultimately receive
a string that starts with an uppercase letter. Since we are comparing
against a lowercase "true" we should ensure the string is lowercased
before comparison.
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: If85c4411c73c18c931a339592a0dd352f574131a
Thanh Ha [Thu, 13 Aug 2020 01:22:20 +0000 (21:22 -0400)]
Revert "Fix formatting in script"
This reverts commit
8ac864b735534ac4c8646aa9141dac1c51147912.
Change-Id: Ibd0d79eb81d486f17d27de78c9d5c64162e8c55e
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Anil Belur [Thu, 13 Aug 2020 00:18:40 +0000 (10:18 +1000)]
Fix formatting in script
The revert
0c66e6ab1d80770ca7060237b436190f9fa274a0
did not take care of the formatting.
Change-Id: I8efe5aed70d902a959c6653b56429dc9774276b6
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Thanh Ha [Wed, 12 Aug 2020 19:07:32 +0000 (15:07 -0400)]
Revert "Minor cleanup of openstack-protect script"
The "Minor cleanup" ended up breaking the script entirely as the
image list array is not correctly created causing invalid image
name to be passed to the openstack command.
Also adds some code to strip double quotes from the prefix and suffix
if there are any.
This reverts commit
b03a1792362654ad8fcd15092a64ed00f8509209.
Change-Id: Id4f734113d6dede7e7603f85784b46d164b91392
Co-authored-by: Aric Gardner <agardner@linuxfoundation.org>
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Anil Belur [Tue, 11 Aug 2020 04:21:42 +0000 (14:21 +1000)]
Correct section type in release notes
The CR
762400ee2c77 was submitted with a wrong
section type, the correct one should be fixes.
Ref: https://docs.openstack.org/reno/latest/user/usage.html#editing-a-release-note
Change-Id: I47e2b4532d5cf1ea94dffb5cf2b9fb26d3d0a250
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Anil Belur [Sun, 9 Aug 2020 03:06:12 +0000 (13:06 +1000)]
Fix image update script to handle $image_type
Issue: RELENG-3153
Change-Id: I82bab26605733ea3b65179f1107724f5b0a1ae06
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Anil Belur [Sun, 9 Aug 2020 04:01:32 +0000 (04:01 +0000)]
Merge "Migrate write-good hook to pre-commit"
Anil Belur [Sun, 9 Aug 2020 04:00:53 +0000 (04:00 +0000)]
Merge "docs: Move release notes out of "Guides" section"
Thanh Ha [Sat, 8 Aug 2020 13:07:57 +0000 (09:07 -0400)]
Migrate write-good hook to pre-commit
This is a final patch to remove our dependency on the Coala platform
and use only pre-commit moving forward.
This patch also resolves write-good lint issues that were not caught
by the Coala version of write-good due to file ignore rules that
excluded several files from being scanned. With pre-commit we can
create separate rules to exclude more specific scans while no excluding
the file from scans entirely.
Issue: RELENG-2642
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: Ic9a48b2964ff5c689a01f3fd611e69ef9525e055
Eric Ball [Fri, 7 Aug 2020 12:43:41 +0000 (05:43 -0700)]
docs: Move release notes out of "Guides" section
The text in the "Release Notes" section of the docs index was
outdated (we have not used the relnotes directory in quite some
time), and the actual Release Notes links were under the "Guides"
section.
There is also a correction to put paths into monospace rather than
italics.
Change-Id: I3096bdce7ec666b762ab4be5811ae4c7ec2ffb55
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
Anil Belur [Wed, 5 Aug 2020 09:21:09 +0000 (19:21 +1000)]
Capture instance metadata with job logs
Capture instance metadata for the VM's. This data is useful while
working with the cloud provider and debuging VM issues on the
infrastructure.
Issue: RELENG-3142
Change-Id: If54a6a02bf25f039c37fee2831f641ba662254a8
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Eric Ball [Tue, 4 Aug 2020 18:15:52 +0000 (11:15 -0700)]
Update sigul-install.sh to check for sigul
If sigul is already installed, we can skip the installation. This is
important due to kojipkgs being unreliable. We now have the sigul
binary baked into the base image creation, so newer images should
already have sigul on board. If they do and we still try to do this
manual installation, we could still run into connection issues with
kojipkgs.
Issue: RELENG-3115
Change-Id: I3580b92b8e4c1c72493069bf977f96e36aba6a85
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
Eric Ball [Tue, 4 Aug 2020 19:25:53 +0000 (12:25 -0700)]
Fix shellcheck errors in scripts
Change-Id: I8ffc8ac98bc128f54aa515153615c8aa10560316
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
Thanh Ha [Thu, 23 Jul 2020 19:27:17 +0000 (15:27 -0400)]
Explicity set Gerrit comment mode to PLAIN
The default setting for this config is BASE64 where it used to be
PLAIN. Explicity set what we expect the mode to be so that the
job does not fail to parse an unexpected base64 string.
Change-Id: Icf8ae74089f6f60cc03f41d4526d038c78e65606
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Anil Belur [Tue, 21 Jul 2020 23:22:25 +0000 (23:22 +0000)]
Merge "Fix port clean up race condition"
Jessica Wagantall [Mon, 20 Jul 2020 21:14:02 +0000 (21:14 +0000)]
Merge "lftools_activate should be deprecated"
Aric Gardner [Mon, 20 Jul 2020 17:11:41 +0000 (13:11 -0400)]
lftools_activate should be deprecated
We have lf-env.sh and lf-activate-venv
on all builders.
It is a more error resitant way to make sure a pip
package is installed
In tests lf-env passes in places that lftools_activate
fails.
Issue-ID: IT-20217
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: Ib5610d6110e762f4510e62794215d17a086a1d20
Jessica Wagantall [Mon, 20 Jul 2020 17:12:06 +0000 (17:12 +0000)]
Merge "Clarifying read the docs documentation"
Anil Belur [Thu, 16 Jul 2020 23:31:33 +0000 (09:31 +1000)]
Fix jjb-deploy job to accept JJB_VERSION parameter
Fix the jjb-deploy job to accept a JJB_VERSION parameter in the
build parameters field so that projects can select which version
of JJB they want for the job.
Issue: RELENG-3073
Change-Id: I33653d50e11c79a00a5858c395bc05f20a03d283
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Anil Belur [Tue, 14 Jul 2020 04:10:43 +0000 (14:10 +1000)]
Fix port clean up race condition
Fix the race condition by checking the created_at timestamp and
clean up ports that were created atleast 30 minutes before.
Jira: RELENG-3062
Change-Id: I151d4d541e6858214fc49d3479cf932feb8b9acf
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Aric Gardner [Tue, 7 Jul 2020 14:58:06 +0000 (10:58 -0400)]
Clarifying read the docs documentation
This patchset hopes to elicit comments
from community members to ensure that this documentation
is understandable.
Please comment on any sections that are not clear.
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I359ac15094e90594eadc44a80885088e540cd766
Andrew Grimberg [Wed, 15 Jul 2020 16:58:02 +0000 (16:58 +0000)]
Merge "Add lf-pipelines-verify job for global pipelines"
Eric Ball [Fri, 10 Jul 2020 22:49:10 +0000 (15:49 -0700)]
Add lf-pipelines-verify job for global pipelines
This job will test the releng/pipelines repo. This also introduces a
framework for adding additonal pipeline jobs to global-jjb.
Issue: RELENG-2792
Change-Id: I5440b6d1a8dd4b56ebec2d810331cd52f8bbe4c4
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
Anil Belur [Tue, 14 Jul 2020 00:58:13 +0000 (00:58 +0000)]
Merge "Use double bracket conditional compound command"
Aric Gardner [Thu, 9 Jul 2020 20:09:36 +0000 (16:09 -0400)]
Use double bracket conditional compound command
Odd failures in the read the docs jobs
casued by not quoting "$result"
Im going to quote it and switch to double bracket.
Fixed the issue in my testing.
Errors seen were:
jq: error (at <stdin>:1): Cannot index string with string "success"
./script: line 11: [: ==: unary operator expected
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: Ic7554ddfa384b817ad3aac311972e6cfc52e0b49
Jessica Wagantall [Thu, 9 Jul 2020 16:25:35 +0000 (09:25 -0700)]
Update semver regex for release-job.sh
Update semver regex to the one recommended
by https://semver.org/
This regex was taken from
https://github.com/fsaintjacques/semver-tool
which follows the semver guidances and works in bash.
Issue: IT-20145
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Change-Id: I9d1fe49693279f71243df0280eebed266e55ff4e
Aric Gardner [Fri, 26 Jun 2020 18:51:07 +0000 (14:51 -0400)]
Fix ONAP exception.
Missed this one on my last go.
masterproject must equal rtdproject
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I1a184885dfee04f6abde6f29482d292bc7d85c58
Aric Gardner [Fri, 26 Jun 2020 17:20:23 +0000 (13:20 -0400)]
Need an exception for onap
We imported their docs for the migration
to not lose old versions.
this imported project does not follow the naming convention
and so I have added a hardcoded exception
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I8ac74bec953cf39b28cf8776c50fcb0e78869073
Aric Gardner [Thu, 18 Jun 2020 19:17:03 +0000 (15:17 -0400)]
Fix logic for discovering new branches
When a new branch exists on gerrit, but has never been seen by RTD
we need to trigger a job so that the branch is discovered
we can then mark it active in the following step.
API changed under out feet, where a 404 was returned before
we now get a 200 with the string null.
Change code to explicitly match the returned string of
"null"
Issue-Id: RELENG-3027
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I769b66384f5b53d87527faeb0f467350a847b65c
Thanh Ha [Thu, 11 Jun 2020 20:47:16 +0000 (16:47 -0400)]
Pin importlib-resources version to <2.0.0
The current virtualenv 20.0.21 is incompatible with importlib-resources
2.0.0. This patch pins the version of importlib-resources temporarily
until a virtualenv version that supports it is released. This resolves
the ignored error in tox-verify job builds:
ERROR: virtualenv 20.0.21 has requirement
importlib-resources<2,>=1.0; python_version < "3.7", but you'll
have importlib-resources 2.0.0 which is incompatible.
Issue: RELENG-2993
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I04cf74f4209104475c1548653f157821814970df
Andrew Grimberg [Wed, 10 Jun 2020 16:01:13 +0000 (09:01 -0700)]
Correctly evaluate UPDATE_CLOUD_IMAGE
While trying to get a clean packer build on an AWS based Jenkins I kept
running into the packer job failing. Digging into the code and turning
on debugging allowed me to spot that
if [[ ${UPDATE_CLOUD_IMAGE} ]]; then
Was translating to
[[ -n false ]]
During runs where $UPDATE_CLOUD_IMAGE wasn't set. This seemed strange to
me and then looking a bit further I realized that the boolean variable
in Jenkins is converting to a string ENV var of either 'true' or 'false'
depending the set. This means for the if statement to properly execute
it must evaluate as a string comparison as the variable is not actually
a boolean.
Change-Id: Ie98b51eb22412705c8c264b61be3c76b4e5ff985
Issue: RELENG-2985
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Thanh Ha [Sat, 6 Jun 2020 13:32:36 +0000 (09:32 -0400)]
Add .editorconfig file
EditorConfig is a universal editor configuration file supported by many
IDEs and Editors (although some might require installing a plugin) to
share consistent editor configuration with developers using different
editors.
This also updates the README.md file to remove the single item bullet
list as that was causing prettier to reformat the bullet item to insert
extra spacing between the '-' and first word in the list.
Ref: https://editorconfig.org/
Change-Id: I22605008837c567d9f6a62abfc85a195acc708c6
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Andrew Grimberg [Sat, 6 Jun 2020 14:24:19 +0000 (14:24 +0000)]
Merge "Print git-diff when pre-commit fails"
Andrew Grimberg [Sat, 6 Jun 2020 14:24:11 +0000 (14:24 +0000)]
Merge "Update pre-commit hooks 2020-06"
Thanh Ha [Sat, 6 Jun 2020 13:43:00 +0000 (09:43 -0400)]
Print git-diff when pre-commit fails
When pre-commit fails and automatically fixes issues for us in Jenkins
we are not able to see what pre-commit automatically fixed. Adding
--show-diff-on-failure makes pre-commit perform a git-diff immediately
after failing to ensure more useful output is printed to inform the
contributor what changes are needed to pass the check.
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I0c9fc6afa8be214d03e342b2913205e946aa901e
Thanh Ha [Sat, 6 Jun 2020 13:37:13 +0000 (09:37 -0400)]
Update pre-commit hooks 2020-06
It's been awhile since we last bumped these so let's catch up with
the world.
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I3567df53ccbf7c78b8de8145bee4008fe785590a
Thanh Ha [Fri, 5 Jun 2020 21:57:37 +0000 (17:57 -0400)]
Fix gerrit-push-patch Job key not in trailers
Key-value pairs in Git should be appended to the Git trailers section
(AKA footer). This patch fixes the commit message produced by
gerrit-push-patch which currently creates a commit message where the
Job key appears in the commit message body rather than the trailer.
For example:
An example commit message
Job: builder-job/123
Change-Id:
1234567
Signed-off-by: Jenkins <jenkins@example.org>
This fixes it to:
An example commit with proper trailer
Job: builder-job/123
Change-Id: 123457
Signed-off-by: Jenkins <jenkins@example.org>
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I66c9b0813b36065c20adcf0e886eaa29354ca603
Eric Ball [Thu, 4 Jun 2020 20:37:28 +0000 (13:37 -0700)]
Improve upstream gjjb jobs, add Github version
ODL already has the upstream LF Gerrit in its Gerrit triggers, and it
is named "lf-releng". This should therefore be used as the standard
name for other projects.
Added a Github version of the upstream global-jjb verify, which just
needs SCM changes for pulling in its ci-man repo.
Documentation for preparing a Jenkins server to test upstream gjjb
changes is available here: https://confluence.linuxfoundation.org/display/RELEN/Add+upstream+global-jjb+testing+to+Jenkins
Issue: RELENG-1043
Change-Id: I0a2f757c0e58355bc59eaa1e56eaa396f60b0f32
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
Aric Gardner [Thu, 28 May 2020 18:02:22 +0000 (14:02 -0400)]
Modify info-schema
make email and timezone optional.
Email if entered must be vaild, but is not required
Timezone if entered must be match regex, but is not required
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I1266c43edabed7fdb3882b8fc335bd8b3942699c
Eric Ball [Wed, 20 May 2020 00:38:18 +0000 (00:38 +0000)]
Merge "Add templates for CXX projects using autotools"
Lott, Christopher (cl778h) [Tue, 19 May 2020 12:32:15 +0000 (08:32 -0400)]
Echo error response from RTD without formatting
The rtd-trigger-build.sh starts a build at ReadTheDocs and parses
the response, a small JSON like this:
{"build_triggered":false,"project":"unicorn","versions":[]}
This change drops the invocation of jq that attempts to pretty-print
the JSON to the log when the build is not triggered, because that
call was failing for inexplicable reasons.
Change-Id: Ic4369b7e0b9172d4b4c9c3544224b6b5325813a5
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Lott, Christopher (cl778h) [Wed, 13 May 2020 14:26:41 +0000 (10:26 -0400)]
Add templates for CXX projects using autotools
New jobs for the "configure && make && make install" pattern used
by many open-source projects. Supports generation of the configure
script for projects that do not store generated files in version
control. Includes gerrit and github versions of templates
autotools-packagecloud-stage, autotools-sonarqube and
autotools-verify.
Change-Id: I4e35db15c73f99b38486f31f137b224e8d6acde0
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Lott, Christopher (cl778h) [Wed, 29 Apr 2020 17:58:30 +0000 (13:58 -0400)]
Report CLI version in scripts that invoke docker
Extend scripts that invoke the docker CLI to report the version
by invoking `docker --version`. Also add echo command to report
end of script where it was missing. Includes docker-build.sh,
docker-login.sh, docker-push.sh and release-job.sh. No functional
change to any script behavior, just a line of extra output.
Change-Id: Iac65366c7810d6f96fecb84267aa4c1dd9027dc1
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Anil Belur [Sun, 26 Apr 2020 00:55:31 +0000 (10:55 +1000)]
Update regexp in lf-infra-ship-logs macro
Missed updating the tested regex in
9e8bc48869a.
Test:
https://jenkins.opendaylight.org/releng/view/builder/job/builder-packer-verify/277
Issue: RELENG-2856
Change-Id: I28bf3410317a4e0962ceb4fd52b2857c41221a54
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Anil Belur [Fri, 24 Apr 2020 04:16:21 +0000 (14:16 +1000)]
Update regexp in lf-infra-ship-logs macro
Update regexp in lf-infra-ship-logs macro. This fixes a
regression from update to deploy-logs.sh script in
v0.53.0 causing missing logs links on Jenkins jobs.
https://gerrit.linuxfoundation.org/infra/c/releng/global-jjb/+/63501/4/shell/logs-deploy.sh
Test:
https://jenkins.opendaylight.org/releng/view/builder/job/builder-packer-verify/274
Issue: RELENG-2856
Change-Id: I2fb0bcf9660189172e2c7742a9b43d66e85493ce
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Eric Ball [Tue, 21 Apr 2020 20:37:13 +0000 (20:37 +0000)]
Merge "Drop removed CLM jobs from python job groups"
Andrew Grimberg [Tue, 21 Apr 2020 20:12:31 +0000 (20:12 +0000)]
Merge "Fix update cloud image list job to handle newlines"
Lott, Christopher (cl778h) [Tue, 21 Apr 2020 19:55:20 +0000 (15:55 -0400)]
Drop removed CLM jobs from python job groups
Drop jobs gerrit-python-xc-clm and github-python-xc-clm from
the two python job groups. Those templates were replaced by
gerrit-tox-nexus-iq-clm and github-tox-nexus-iq-clm. Not adding
those templates to the job groups because successful use requires
additional project configuration to report the package requirements.
Totally baffling that the tox test didn't catch this botch in the
change set that removed those templates.
Change-Id: Ibea19818ebf45cfc541cf910fe90cc3b1b3579ca
Issue-ID: RELENG-2821
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Aric Gardner [Tue, 21 Apr 2020 19:35:33 +0000 (19:35 +0000)]
Merge "Add Tox Nexus IQ (CLM) templates for Python"
Lott, Christopher (cl778h) [Mon, 23 Mar 2020 21:14:30 +0000 (17:14 -0400)]
Add Tox Nexus IQ (CLM) templates for Python
Add new templates gerrit-tox-nexus-iq-clm/github-tox-nexus-iq-clm
to analyze Python package requirements. Add script
nexus-iq-python-cli.sh with correct invocation and arguments for
the latest version of the Nexus IQ scanner.
Drop broken templates g*it-python-xc-clm, unused builder
lf-infra-clm-python and shell script nexus-iq-cli.sh.
Change-Id: I5c34ad02e3e37a0e04dfa7e64b1013ebc26119fc
Issue-ID: RELENG-2821
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Anil Belur [Mon, 20 Apr 2020 03:46:06 +0000 (13:46 +1000)]
Fix update cloud image list job to handle newlines
Fix update cloud image list job to handle newlines correctly and
update an existing gerrit change request.
A gerrit change submitted through git-review checks for an
existing change-id on Gerrit and either updates the patchset or
creates a new one. For this to work correctly the change-id
should go into the commit footer and not in the
GERRIT_COMMIT_MESSAGE. The embedded newlines are not processed
correctly in the script and fails to separate the footer and the
GERRIT_COMMIT_MESSAGE, instead it creates a new patches everytime
rather than updating an existing one.
The change is tested and now existing CR's are updated rather than
pushing a new CR everytime.
https://git.opendaylight.org/gerrit/c/releng/builder/+/89136
Issue: RELENG-2687
Change-Id: I8397d2d8a9402db07c99173c9f999152bc3c61ee
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Anil Belur [Tue, 21 Apr 2020 01:44:31 +0000 (01:44 +0000)]
Merge "Add packer-verify-build jobs"
Eric Ball [Thu, 9 Apr 2020 01:53:58 +0000 (18:53 -0700)]
Add packer-verify-build jobs
This job is made to be manually triggered in order to build the
packer image, so that the full build process can be validated before
merging. If this is done on the final patch that is merged, the
merge job will not run another build (thereby avoiding building two
identical images).
The verify-build job piggybacks on the merge template, since it is
essentially the same job. However, it only triggers when given the
keyword "verify-build" or "packer-build". Due to the similarities,
some documentation improvements have also been shifted over to the
Packer Merge docs, as well as some small changes to Packer Verify.
Issue: RELENG-2671
Change-Id: Id4fb33a88447bbb2f09ac0967ac303a8f6d62326
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
Andrew Grimberg [Fri, 17 Apr 2020 17:24:09 +0000 (17:24 +0000)]
Merge "Fix lftools install in rtd verify job"
Anil Belur [Thu, 16 Apr 2020 04:06:56 +0000 (14:06 +1000)]
Fix lftools install in rtd verify job
Issue: RELENG-2846
Change-Id: I5c3cd6bf8f4af887ba00aa2e1a4d42775caac80a
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Jessica Wagantall [Wed, 15 Apr 2020 23:10:24 +0000 (16:10 -0700)]
Use yq instead of niet
Standardize yaml parsing tools used across global-jjb.
Switch from using niet package to yq for parsing yaml files
in release-job.sh.
Issue: RELENG-2844
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Change-Id: Ia57884a7a8efffa85417becd8c914ab8d23721a9
Jessica Wagantall [Wed, 15 Apr 2020 22:51:08 +0000 (15:51 -0700)]
Bool is not a valid schema type
Using boolean rather than bool.
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Change-Id: Ied68c7f1a2fd4474e9fee65b2820e6c25f662b5f
Jessica Wagantall [Tue, 7 Apr 2020 19:34:14 +0000 (12:34 -0700)]
Optionally skip tag during release process
Make tag process optional. True by default.
Example scenario:
Some ONAP projects make both maven and docker releases
for a single repo. Docker releases depend on maven releases.
This means that the team needs to make a maven release first,
then make a docker release and lastly, tag the repo.
This change will allow them to hold the tagging part during
maven releases to allow them to tag after the docker release is made.
Issue: RELENG-2835
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Change-Id: Ibd206269b80e7fb788682a81e038aa74d9eaf97c
Houa Yang [Thu, 9 Apr 2020 21:24:11 +0000 (21:24 +0000)]
Merge "Add "logs" prefix to s3_path"
Houa Yang [Thu, 9 Apr 2020 19:25:05 +0000 (14:25 -0500)]
Add "logs" prefix to s3_path
We are not allowed to have an index.html file at the root level of the
S3 bucket. Adding the additional prefix allows us to mirror the directory
structure of Nexus where you are able to see both production and sandbox
logs when browsing to https://logs.<project>.org/
Issue-Id: RELENG-2379, RELENG-2380
Signed-off-by: Houa Yang <hyang@contractor.linuxfoundation.org>
Change-Id: I7b6bd340170f9390c670f2b6ba507f2de1cfbc0e
Jessica Wagantall [Wed, 8 Apr 2020 17:23:23 +0000 (10:23 -0700)]
Allow rtdv3 jobs to run in parallel
These jobs are submitted against different projects.
Allow them to run in parallel to save time.
Change-Id: I199b07c4b580fdf7be82e5503b8dc8a1e3915e89
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Lott, Christopher (cl778h) [Tue, 7 Apr 2020 13:11:26 +0000 (09:11 -0400)]
Add doc for jjb-verify build-node label check
Document the jjb-verify feature that checks build-node labels named
in JJB YAML files against nodes in cloud config files.
Change the feature's JJB configuration variables to share a prefix.
Improve the shell script to be robust to errors such as a suffix of
".cfg" or an external label of "" (just two double quotes).
Change-Id: I8beb5669531fe2b7f59a9bcf3706b27ede3965b9
Issue-ID: RELENG-2828
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Anil Belur [Tue, 7 Apr 2020 01:39:32 +0000 (01:39 +0000)]
Merge "Add CMake templates to build/publish DEB/RPM pkgs"
Lott, Christopher (cl778h) [Fri, 3 Apr 2020 14:53:43 +0000 (10:53 -0400)]
Add CMake templates to build/publish DEB/RPM pkgs
New templates gerrit-cmake-packagecloud-stage and
github-cmake-packagecloud-stage for building DEB/RPM package
files and publishing them to a PackageCloud.io repository on
posted comment. Adds builder macros lf-packagecloud-file-provider
and lf-packagecloud-push. Adds script packagecloud-push.sh to
call Ruby gem package_cloud.
The new templates are lifted from the ORAN project.
Change-Id: Ia39f5b43c2ef22485166a5f54fcf31d53eab84f8
Issue-ID: RELENG-2832
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Houa Yang [Fri, 3 Apr 2020 17:04:16 +0000 (12:04 -0500)]
Fix aws credential file provider conditional
Add "on-evaluation-failure: dont-run" to conditional, so that if the
global env variable is not set, the job will not fail.
Issue-Id: RELENG-2749
Signed-off-by: Houa Yang <hyang@contractor.linuxfoundation.org>
Change-Id: I3a7d992bfd93853ffe910713c00380852868f20e
Thanh Ha (zxiiro) [Fri, 3 Apr 2020 13:34:19 +0000 (13:34 +0000)]
Merge "Verify build nodes in YAML against config files"
Houa Yang [Wed, 1 Apr 2020 18:33:59 +0000 (18:33 +0000)]
Merge "Add AWS credentials config file"
Lott, Christopher (cl778h) [Sun, 29 Mar 2020 22:53:05 +0000 (18:53 -0400)]
Verify build nodes in YAML against config files
Extend lf-jjb-verify anchor with boolean configuration variable
check-build-node-labels that guards a conditional build step.
If true, run script jjb-verify-build-nodes.sh to check build-node
labels in YAML files within the jjb subdirectory against labels
defined by config files in the jenkins cloud configuration
directory. Disabled by default. Projects should enable and
configure the job; e.g., for external build node labels.
Issue-ID: RELENG-2828
Change-Id: Iaf315b4a68c3488b5ead204a57361a8bcbca91d7
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Jessica Wagantall [Tue, 31 Mar 2020 23:44:43 +0000 (23:44 +0000)]
Merge "Add PyPI stage templates"
Lott, Christopher (cl778h) [Thu, 26 Mar 2020 21:32:23 +0000 (17:32 -0400)]
Repair tox-run for case of no tox logs to archive
Revise tox-run.sh to guard against glob matching no tox log files.
In that case the pattern is passed to the cp command, which fails.
Detect the cp failure ('cp: cannot stat ..') and exit the loop.
I introduced this new and undesired behavior by adding -e in
change
76a0761, so the script stops when the cp command fails.
Change-Id: I1d60bb69e270c4aea413f4f14cf2d4f8f672853b
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Houa Yang [Fri, 21 Feb 2020 21:59:59 +0000 (15:59 -0600)]
Add AWS credentials config file
Add new jenkins-s3-log-ship config file provider utilizing a conditional
step. This is needed to be able to use new lftools deploy s3 api call to
upload logs to AWS S3.
Issue-Id: RELENG-2749
Signed-off-by: Houa Yang <hyang@contractor.linuxfoundation.org>
Change-Id: I2171c4f5a8a18259feca265b628cb7288a18c54f
Lott, Christopher (cl778h) [Wed, 25 Mar 2020 22:15:17 +0000 (18:15 -0400)]
Add PyPI stage templates
Add templates gerrit-pypi-stage/github-pypi-stage to allow projects
flexibility to control when Jenkins publishes a redistributable
Python package, either on merge (with the merge template) or on
demand (with the stage template).
Change-Id: I49d8101b9da8c58d10518cb3ad522cd71b1019dc
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Houa Yang [Wed, 25 Mar 2020 16:05:47 +0000 (11:05 -0500)]
Fix update to logs-deploy.sh
Fix script to remove outputting $ARCHIVE_ARTIFACTS. Outputting required
that $ARCHIVE_ARTIFACTS be set for every job. Instead it will output
${pattern_opts:-}.
Signed-off-by: Houa Yang <hyang@contractor.linuxfoundation.org>
Change-Id: I5f75a12745d1358b89dc7af18a35736514143072
Andrew Grimberg [Tue, 24 Mar 2020 20:42:06 +0000 (20:42 +0000)]
Merge "Run docker-merge job weekly by default"
Andrew Grimberg [Tue, 24 Mar 2020 20:33:25 +0000 (20:33 +0000)]
Merge "Update logs-deploy.sh"
Lott, Christopher (cl778h) [Tue, 24 Mar 2020 09:53:23 +0000 (05:53 -0400)]
Run docker-merge job weekly by default
Use @weekly cron default value in docker_merge_common anchor, no longer
empty. The merge job for docker images is like the stage job for java
artifacts, every docker image is a release candidate. Run the merge job
regularly to check dependencies like base images and to push updated
images to the Nexus3 staging registry.
Change-Id: Ic26f534953c77047515d2678fa654e21ac9d6336
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Houa Yang [Thu, 5 Mar 2020 00:53:41 +0000 (18:53 -0600)]
Update logs-deploy.sh
Update script with get_pattern_opts function. Function refactors code to
be reusable.
Signed-off-by: Houa Yang <hyang@contractor.linuxfoundation.org>
Change-Id: Ic5366f2177c401ce3bedda67b03fc5dee288cb8f
Lott, Christopher (cl778h) [Thu, 19 Mar 2020 20:32:38 +0000 (16:32 -0400)]
Stop on error in nexus-iq-cli.sh script
Revise script nexus-iq-cli.sh to stop on error or unbound variable.
This should fail the build if the scanner returns a non-zero code,
for example if credentials are missing or wrong.
Change-Id: I39f7ae9d6ba552ff3e3f3dd13df5bf998372e20f
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Aric Gardner [Thu, 12 Mar 2020 20:26:27 +0000 (16:26 -0400)]
Use lf-env for info-file-validate
Job was failing due to using python2
use lf-env to manage the environment.
ISSUE-ID: IT-19236
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I388ce7d8471e62efdae8c6131b4924cd89bfcc53