releng/global-jjb.git
6 years agoMake GitHub JJB verify jobs actually verify 93/5193/1 v0.3.5
Andrew Grimberg [Tue, 13 Jun 2017 17:03:35 +0000 (10:03 -0700)]
Make GitHub JJB verify jobs actually verify

The JJB verify jobs were found to be doing merge instead of just verify.
This means that every JJB PR was actually is causing Jenkins changes.

Issue: RELENG-190
Change-Id: If7984725e0319f558738dce7735d688df2cc5092
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
6 years agoFix shellcheck errors SC2086 89/5189/1
Anil Belur [Tue, 13 Jun 2017 03:03:32 +0000 (13:03 +1000)]
Fix shellcheck errors SC2086

SC2086: Double quote to prevent globbing and word splitting.

Change-Id: Ib9fd89a72d3c3f4788f9b1c02a882ace0250bd09
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
6 years agoInstall virtualenvs into /tmp/v 88/5188/1 v0.3.4
Thanh Ha [Tue, 13 Jun 2017 02:34:30 +0000 (22:34 -0400)]
Install virtualenvs into /tmp/v

The kernel has a limit on how long a shebang can be and causes build
issues when we store virtualenvs in $WORKSPACE for jobs that have very
long names. Move virtualenv installs into /tmp/v will solve this issue
for good. Also no need for workarounds like `$PYTHON -m pip` anymore.

Change-Id: I72be5f42c2196e88f22262688e3425f6a83e807c
Jira: RELENG-156
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoFix typo in WORKSPACE name 86/5186/1 v0.3.3
Thanh Ha [Mon, 12 Jun 2017 23:23:04 +0000 (19:23 -0400)]
Fix typo in WORKSPACE name

Change-Id: I27608a7db9ec47b4bd0c95226a08d5346f236d8b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoJenkins cannot handle ${} vars in GitHub project 81/5181/4
Andrew Grimberg [Mon, 12 Jun 2017 19:51:37 +0000 (12:51 -0700)]
Jenkins cannot handle ${} vars in GitHub project

The GitHub project requires a rendered URL to the project. It does not
apparently properly render variables that are {} enclosed which means
that any vars needs to fully path separated properly

Issue: RELENG-188
Change-Id: Ie616752899453a0e614f1b6500eb2886e796d7a9
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
6 years agoFix alias linking for lf_tox_verify 80/5180/1 v0.3.2
Thanh Ha [Mon, 12 Jun 2017 18:49:07 +0000 (14:49 -0400)]
Fix alias linking for lf_tox_verify

Change-Id: I1c80c87fcb591af1d00f0d480615e58da0a68ab7
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoGitHub JJB verifies should be concurrent 79/5179/2
Andrew Grimberg [Mon, 12 Jun 2017 18:42:55 +0000 (11:42 -0700)]
GitHub JJB verifies should be concurrent

While doing some work pushing multiple different patches to a GitHub
project it was discovered that the GitHub JJB verify jobs were not
configured for concurrency.

Change-Id: I48af8b1722a8223916324f49151fec88aa8e32b3
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
6 years agoMerge "Add support for GitHub to Python templates" v0.3.0
Andrew Grimberg [Mon, 12 Jun 2017 18:03:12 +0000 (18:03 +0000)]
Merge "Add support for GitHub to Python templates"

6 years agoCreate Maven release job 26/5126/9
Thanh Ha [Thu, 8 Jun 2017 01:09:51 +0000 (21:09 -0400)]
Create Maven release job

The Maven release job runs a build and deploys the artifacts into a
local staging repository located at $WORKSPACE/m2repo which is then
used to push to a Nexus staging repository later in the build process.

- Adds a new Maven release job
- Merges the maven-exec macro into a single lf-infra-maven-parameters
  macro.
- Creates a common-variables.sh which can be sourced for useful common
  variables.
- Store staging-repo number in archives staging-repo.txt for easy
  retrieval.

Change-Id: I020d819ea59b809d06803c0dfd999ef002b201c4
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoAdd support for GitHub to Python templates 44/5144/2
Thanh Ha [Mon, 12 Jun 2017 00:14:10 +0000 (20:14 -0400)]
Add support for GitHub to Python templates

Jira: RELENG-170
Change-Id: I79aba6cf06f985fbcab6dfae6963d1e8e1c6949f
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoMerge "Set wget to quiet mode to hide Maven DL output"
Thanh Ha [Sun, 11 Jun 2017 16:11:23 +0000 (16:11 +0000)]
Merge "Set wget to quiet mode to hide Maven DL output"

6 years agoMerge "Do not print pipdeptree for lftools"
Thanh Ha [Sun, 11 Jun 2017 16:10:43 +0000 (16:10 +0000)]
Merge "Do not print pipdeptree for lftools"

6 years agoFix incorrect file name being echoed 40/5140/1
Anil Belur [Sat, 10 Jun 2017 22:27:27 +0000 (08:27 +1000)]
Fix incorrect file name being echoed

Change-Id: I6df00db6be537285063a510fe73f2a77e1484139
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
6 years agoMerge "Enable sar report collection for global-jjb"
Thanh Ha [Sat, 10 Jun 2017 07:27:58 +0000 (07:27 +0000)]
Merge "Enable sar report collection for global-jjb"

6 years agoEnable sar report collection for global-jjb 21/5121/6
Anil Belur [Wed, 7 Jun 2017 21:48:59 +0000 (07:48 +1000)]
Enable sar report collection for global-jjb

Change-Id: I0615d295b17151ade5c899350069516d66e6d809
Jira: releng-46
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
6 years agoMerge "Fix warning about Default profile being deprecated"
Thanh Ha [Sat, 10 Jun 2017 06:11:44 +0000 (06:11 +0000)]
Merge "Fix warning about Default profile being deprecated"

6 years agoFix warning about Default profile being deprecated 39/5139/1
Thanh Ha [Sat, 10 Jun 2017 06:06:10 +0000 (02:06 -0400)]
Fix warning about Default profile being deprecated

The Default profile configuration in coala is deprecated and recommended
that we no longer use it.

Change-Id: I1460a727e77ea0df2c9087836baa9bc451fc0bd0
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoDo not print pipdeptree for lftools 38/5138/2
Thanh Ha [Fri, 9 Jun 2017 22:18:29 +0000 (18:18 -0400)]
Do not print pipdeptree for lftools

pipdeptree causes a lot of text spam in the logs and is really only
useful for us when we need to troubleshoot so lets comment it out by
default.

Change-Id: I36de21e3b08d5bd5aa49ae628c2bec37e3ca2fe6
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoSet wget to quiet mode to hide Maven DL output 37/5137/1
Thanh Ha [Fri, 9 Jun 2017 22:03:27 +0000 (18:03 -0400)]
Set wget to quiet mode to hide Maven DL output

When Jenkins installs Maven it uses wget to download. We're not
interested in the download progress output so create a .wgetrc in order
to hide it and remove the file after download is complete.

Change-Id: I15e56c7a06b39a0c1fe3d7be72b381559585543c
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoMerge "Make Github url and clone url at Jenkins level."
Thanh Ha [Fri, 9 Jun 2017 17:18:37 +0000 (17:18 +0000)]
Merge "Make Github url and clone url at Jenkins level."

6 years agoCall pipdeptree from python -m 31/5131/2
Jamo Luhrsen [Thu, 8 Jun 2017 23:27:07 +0000 (16:27 -0700)]
Call pipdeptree from python -m

Instead of pipdeptree itself which fails when the workspace is
too long, due to kernel constraint on max length available for an
interpreter and args.

Change-Id: Id7c3933c8a53c7648070e80e0d74bf905e547611
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoFix shellcheck warnings 25/5125/1
Thanh Ha [Thu, 8 Jun 2017 01:33:43 +0000 (21:33 -0400)]
Fix shellcheck warnings

- SC2196: egrep is deprecated use grep -E instead.
- SC2086: Double quote to prevent word globbing.

Change-Id: I466ebf8f890fbc9e1047624345cc93d9f58ad5a0
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoAdd python tox verify job 89/4989/6
Thanh Ha [Fri, 26 May 2017 17:01:01 +0000 (13:01 -0400)]
Add python tox verify job

This is a generic verify job that can be used to test anything that uses
Tox to run tests. This is mostly a port of OpenDaylight's version of the
same job. Will be useful initially to test lftools and global-jjb but we
plan to migrate all of the OpenDaylight Python / Tox jobs over to this
template as well.

Change-Id: I10417db8fc78a599b794087d3f9f729658214359
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoMake virtualenv creation less verbose 06/5106/2
Thanh Ha [Wed, 7 Jun 2017 01:30:56 +0000 (21:30 -0400)]
Make virtualenv creation less verbose

Change-Id: I93f55fb1be8a0cdc98c601419af5ffe8344372fb
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoAllow git-url to be overridden by job 01/5101/2
Thanh Ha [Tue, 6 Jun 2017 17:28:05 +0000 (13:28 -0400)]
Allow git-url to be overridden by job

This is needed for jobs that want to trigger against cross-project
Git systems such as global-jjb and lftools.

Change-Id: I28035e22532c1e81e363e59a5e57a1b09b5ae1b8
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoMake Github url and clone url at Jenkins level. 23/5023/8
Jeremy Phelps [Tue, 30 May 2017 16:40:41 +0000 (11:40 -0500)]
Make Github url and clone url at Jenkins level.

Provide a way to access Github url and Github clone url.
Github url and clone url will be set at global level in Jenkins;
GIT_URL and GIT_CLONE_URL respectively.

JIRA: RELENG-151
Change-Id: I2fdc509b27d97816aab2168a6a7863d295c3dd8a
Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
6 years agoAdd macro section headers and new macros 94/5094/1
Andrew Grimberg [Tue, 6 Jun 2017 15:53:43 +0000 (08:53 -0700)]
Add macro section headers and new macros

* Add in section headers to help finding different macros sections
  faster

* Add in 4 of our commonly replicated macros
  builders:
    - lf-jacoco-nojava-workaround
    - lf-maven-install
    - lf-provide-maven-settings
  parameters:
    - lf-maven-exec

Change-Id: Ide5dd2acdd30d6683f864dc806513e88621ae639
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
6 years agoUse pip module instead of pip itself 93/5093/2
Jamo Luhrsen [Tue, 6 Jun 2017 05:05:30 +0000 (22:05 -0700)]
Use pip module instead of pip itself

when the filepath is very long and pip is run in a
virtualenv, the filepath is truncated and the
commands don't work. Some ODL CSIT jobs have
this problem. They use the lftools to upload their
logs so these specific CSIT jobs are not getting
their logs updloaded.

Change-Id: I0b4c0ac785fe6e2fbd183c1b9332cc6fd7b0ecaa
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
6 years agoAll macros should be namespaced to lf-infra- 56/5056/1
Andrew Grimberg [Wed, 31 May 2017 22:39:15 +0000 (15:39 -0700)]
All macros should be namespaced to lf-infra-

Fixes create-netrc and gpg-verify-git-signature to be namespaced into
lf-infra- as all of the macros should be so that we can more easily
bring over current macros that projects may have that make sense in a
global sense without stomping on current definitions. This will allow us
to more gradually migrate onto global macros when it makes sense.

Change-Id: I419468cc5826490736b94d1f3f2041f11f0b9470
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
6 years agoUse pipdeptree instead of freeze 01/5001/1
Thanh Ha [Sat, 27 May 2017 16:51:18 +0000 (12:51 -0400)]
Use pipdeptree instead of freeze

pipdeptree provides better output than pip freeze with more information.
Also run pip installs in quiet mode to cut down on log spam. It will
still print out WARNINGS, ERROR, and CRITICAL log messages.

Change-Id: I3f7e687ccdea5fcb5c749328c1e387e6d99d9fed
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoFix jjb-verify to not fail on ls call 00/5000/1
Thanh Ha [Sat, 27 May 2017 16:39:59 +0000 (12:39 -0400)]
Fix jjb-verify to not fail on ls call

The set -e configure fails the build when ls returns an error state.
Rewrite the code such that it passes correctly and does not fail the
build.

Change-Id: Ib1e99dd3c8ce596610d5119b9fcdf01c626bcbdd
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoEnable archive pattern support 99/4999/1
Thanh Ha [Sat, 27 May 2017 14:49:49 +0000 (10:49 -0400)]
Enable archive pattern support

lftools deploy supports archiving using patterns via the -p argument.
Pass in this argument if the env variable ARCHIVE_ARTIFACTS is defined.
If variable is not defined or blank then a blank string gets passed in
which still works.

Change-Id: I4d096ea9ad1b0c93864d37c6188f02f7e32f6228
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoFix unbound variable failure 98/4998/1
Thanh Ha [Sat, 27 May 2017 15:22:11 +0000 (11:22 -0400)]
Fix unbound variable failure

Virtualenv's activate script has expected unbound variables so will
cause the install scripts to fail if we `set -u` so let's not set that
and leave a note.

Change-Id: I65179570e20e5ae39da54f944ad3a7331ce86184
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoMake sure we fail if scripts fail 95/4995/2
Thanh Ha [Fri, 26 May 2017 20:52:32 +0000 (16:52 -0400)]
Make sure we fail if scripts fail

Rather then allowing the scripts to continue we should immediately fail
the scripts if an error occurs.

Change-Id: Ide1d02df950b434d24d7e60675ba73639bded33f
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoAdjust git url 73/4973/2 v0.2.3
Jeremy Phelps [Wed, 24 May 2017 18:00:19 +0000 (13:00 -0500)]
Adjust git url

JIRA: RELENG-127
Change-Id: I596866ca28a3dd6067072563ad2fb981da673d69
Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
6 years agoRemoved explicit refspec reference for merge job 72/4972/1 v0.2.2
Jeremy Phelps [Wed, 24 May 2017 17:36:17 +0000 (12:36 -0500)]
Removed explicit refspec reference for merge job

Change-Id: I08c60b4ff7ee0bc2bd5998bbd2c15e9fc4c81bba
Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
6 years agoAdd trigger for github plugin 68/4968/8 v0.2.1
Jeremy Phelps [Wed, 24 May 2017 12:58:06 +0000 (07:58 -0500)]
Add trigger for github plugin

JIRA: RELENG-127
Change-Id: I5e10d5e5d3a530fedfdd0d762b1f212a9acfbe09
Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
6 years agoAdd macro for github SCM and bits for ghrpb 33/4533/81 v0.2.0
Jeremy Phelps [Thu, 11 May 2017 17:23:20 +0000 (12:23 -0500)]
Add macro for github SCM and bits for ghrpb

RELENG-127
Change-Id: I2affd71b4c4332522104b7eff11af284b9bab895
Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
6 years agoTransition Gerrit jobs to ID names 48/4948/1
Andrew Grimberg [Tue, 23 May 2017 17:34:21 +0000 (10:34 -0700)]
Transition Gerrit jobs to ID names

Move to ID targetted names for the Gerrit JJB jobs. This will allow us
to have the GitHub JJB jobs have the same name as long as the job-group
uses the IDs instead of the direct job names.

Change-Id: Ifac6cca2f5a29b0b21d939fbb0c232daaef65c50
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
7 years agoUse anchors on JJB verify / merge job definitions 46/4746/1
Andrew Grimberg [Mon, 8 May 2017 18:28:49 +0000 (11:28 -0700)]
Use anchors on JJB verify / merge job definitions

We need a relatively easy way of keeping our Gerrit and GitHub verify
and merge jobs in sync. Given that presently the only difference really
should be the SCM and Trigger diffinitions for each of the job types,
plus a bunch of shared boiler plate in document anchors make a good
method for dealing with it.

Issue: RELENG-106
Change-Id: I28dba9cd5e5535353d9bd4214e38fc4f8e34fc07
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
7 years agoOnly ship logs if LOGS_SERVER defined 05/4505/3
Andrew Grimberg [Mon, 24 Apr 2017 15:27:23 +0000 (08:27 -0700)]
Only ship logs if LOGS_SERVER defined

When new projects are first being stood up they don't always have the
ability to pull their console logs since Jenkins may be in a locked down
mode. If this is the case then the log shipping will always fail and
cause the job to be marked as either FAILED or UNSTABLE. Instead we
should only ship the logs if LOGS_SERVER is defined in Jenkins flagging
that the console logs are publicly available.

Change-Id: I6fc162fec2d7c0cdc1a3785a8ec726d2430d5c96
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
7 years agoDocument steps for deploying ci-jobs 39/4439/2 v0.1.0
Thanh Ha [Thu, 20 Apr 2017 04:44:00 +0000 (00:44 -0400)]
Document steps for deploying ci-jobs

Provide step-by-step instructions in the README for how to deploy
ci-jobs to a project ci-management repo.

Change-Id: I4ed845b0e160f2f2b5a60a04a14848067ee41c2b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoFix Gerrit Trigger comment regex 38/4438/1
Thanh Ha [Thu, 20 Apr 2017 04:04:43 +0000 (00:04 -0400)]
Fix Gerrit Trigger comment regex

Gerrit comments also contain Patch Set #: so the regex would need to be
slightly more complex if we want to be precise. Let's stick with a
comment ending in the keyword instead. It get's us most of the way
there.

Change-Id: Ib1209c5685f41ba0b287d6b32261e870fee1e27c
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoAdd lf ci-management jjb jobs 34/4234/12
Thanh Ha [Fri, 7 Apr 2017 17:00:12 +0000 (10:00 -0700)]
Add lf ci-management jjb jobs

This patch ports the jjb ci-management jobs over from OpenDaylight and
makes necessary adjustments to make it generically re-useable as
possible.

This patch requires some environment variables defined. For example:

JENKINS_HOSTNAME=jenkins092
LOGS_SERVER=https://logs.opendaylight.org
NEXUS_URL=https://nexus.opendaylight.org
SILO=releng

Issue: RELENG-32
Change-Id: Ic19c5fa652885270d8e16992e82e642af95b0f4d
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoAdd coala linting for YAML and JSON 33/4233/2
Thanh Ha [Fri, 7 Apr 2017 16:04:18 +0000 (09:04 -0700)]
Add coala linting for YAML and JSON

Change-Id: Ic64a0b208b338b6eaaddd4229aa036f076639e34
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoSetup .git{review,ignore} 26/3626/1
Andrew Grimberg [Tue, 7 Mar 2017 21:53:48 +0000 (13:53 -0800)]
Setup .git{review,ignore}

Change-Id: I7ab3bfd593199488cbfe1f81377dd021bb586d0a
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
7 years agoInitial empty repository
Andrew Grimberg [Tue, 7 Mar 2017 21:32:22 +0000 (21:32 +0000)]
Initial empty repository