Andrew Grimberg [Thu, 10 Aug 2017 20:56:36 +0000 (20:56 +0000)]
Merge "Make Merge and Verify job triggers overrideable"
Thanh Ha [Thu, 10 Aug 2017 20:32:01 +0000 (16:32 -0400)]
Make Merge and Verify job triggers overrideable
This makes merge and verify jobs that use Gerrit Trigger be able to
override the default trigger defined by the job. This is useful in cases
where a project may have topic branches that they do not wish to
configure their build rules differently. For example in OpenDaylight the
NetVirt project has a need for topic branches but they don't want to
run testing against every patch submission in the topic branches and
would prefer to run them manually. This patch would allow them to
reconfigure the triggers in that case for the topic branch.
Based on a POC from:
https://git.opendaylight.org/gerrit/61385
Change-Id: Idf1d301572bb33f5b540f1011658cdd3f3fc69f5
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Thu, 10 Aug 2017 03:43:41 +0000 (23:43 -0400)]
Fix python-tox incorrect default stream setting
Change-Id: Ief29e966267efac9634e51bec3c201c3ee4351c9
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Wed, 9 Aug 2017 23:01:52 +0000 (19:01 -0400)]
Refactor tests into jjb-tests directory
Issue: RELENG-250
Change-Id: Idc2ddc9c28a8ab835b3558f4076305053ee43235
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Wed, 9 Aug 2017 23:24:01 +0000 (19:24 -0400)]
Exclude the jjb-test directory
When running jenkins-jobs we should exclude the jjb-test directory. That
way global-jjb can maintain tests in that directory while not affecting
users of global-jjb's tests jobs from picking up the tests.
Change-Id: I5101e4627291817d5cf9538f85a9f3db3e6d7b28
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Thu, 10 Aug 2017 03:17:12 +0000 (03:17 +0000)]
Merge "Generalize deploy maven-file builder"
Anil Belur [Sun, 6 Aug 2017 23:59:48 +0000 (09:59 +1000)]
Generalize deploy maven-file builder
The builder hard codes the URL path which makes the builder
limit deploy capabilites only to external nexus repos and not
local file systems.
The change fixes the above issue by allowing the calling job
to define the repository path.
ex:
"${NEXUS_URL}/content/repositories/$REPO_ID"
"file://$WORKSPACE/m2repo"
Renamed variables:
'files-dir' to 'upload-files-dir'
'nexus-url-path' to 'maven-repo-url'
'$NEXUS_URL_PATH' to '$MAVEN_REPO_URL'
Change-Id: If0beb7f6dff76c18988c9a75b52c80358f16dff6
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Thanh Ha [Thu, 3 Aug 2017 21:23:32 +0000 (17:23 -0400)]
Add license header test for shell scripts
Add a test to check license headers exist in shell scripts.
Change-Id: I4f6f9874f79d55f5ab52b17a4dafa9d836f90d34
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Anil Belur [Thu, 3 Aug 2017 02:20:05 +0000 (12:20 +1000)]
Add timer to packer merge job to build new images
Change-Id: I5d3d76ba4350d71e051a3f1642060ebb0bd0aa2d
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Thanh Ha [Wed, 2 Aug 2017 18:58:50 +0000 (18:58 +0000)]
Merge "Make packer-cloud-env variable configurable"
Anil Belur [Mon, 31 Jul 2017 05:30:30 +0000 (15:30 +1000)]
Make packer-cloud-env variable configurable
The packer-cloud-env can have a default in job templates but we should
allow it to be configurable in case a downstream consumer names their
configuration file differently.
Jira: releng-341
Change-Id: Ifc89dec39d3b93b75df58d8d37c7299a9dccf29d
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Anil Belur [Tue, 1 Aug 2017 05:39:55 +0000 (15:39 +1000)]
packer should validate only .json files
Some of the projects could have README or .txt file
which should be excluded, without which packer validate
would fail.
Change-Id: I6cc388a851ae2731a113d47e3719da7edf519c63
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Thanh Ha [Wed, 2 Aug 2017 13:49:54 +0000 (13:49 +0000)]
Merge "Rename settings-file to mvn-settings"
Thanh Ha [Wed, 2 Aug 2017 13:42:40 +0000 (09:42 -0400)]
Rename settings-file to mvn-settings
I7970aae80a807e359dd34c52353007f13642fb01 did not rename the test
settings and caused some build failures.
Issue: RELENG-345
Change-Id: Ief9b45a000eb43600531a9ac923d12b4e4aa8c91
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Fri, 28 Jul 2017 01:00:31 +0000 (01:00 +0000)]
Merge "Pass common maven options to deploy file builder"
Thanh Ha [Wed, 26 Jul 2017 15:30:57 +0000 (11:30 -0400)]
Rename settings-file to mvn-settings in templates
For Maven Templates we should be using mvn-* when referring to settings
files (and any other variables provided by user related to mvn cli).
Issue: RELENG-345
Change-Id: I7970aae80a807e359dd34c52353007f13642fb01
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Wed, 26 Jul 2017 15:08:24 +0000 (11:08 -0400)]
Build CLM weekly on Saturdays
Change-Id: I92f7bf21f66d48f2f073a09e444f16b909d22c27
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Wed, 26 Jul 2017 14:43:36 +0000 (10:43 -0400)]
Fix GitHub CLM job-group
Incorrectly referred to a Gerrit job.
Change-Id: Id0a48befb5631ea4b192a81e15b0c57659e1b65e
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Wed, 26 Jul 2017 03:32:36 +0000 (23:32 -0400)]
Add missing maven parameters to CLM job
lf-infra-maven-parameters expects some parameters to be passed to it.
Add the missing ones to the CLM job and set sensible defaults.
Change-Id: I7d5fe5e2c306dd988ba023c78b86ce32db1d30b2
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Wed, 26 Jul 2017 03:06:15 +0000 (23:06 -0400)]
Add missing stream declaration in clm job
Change-Id: Ie2e0540f79c10b0960405056d697a305c5520d27
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Andrew Grimberg [Tue, 25 Jul 2017 20:30:23 +0000 (13:30 -0700)]
Fix docker login for custom registry
Custom registry detection fails to be detected if the corresponding
Jenkins environment variable is not properly referenced.
Change-Id: I618836ca4e9364045b01c7d710ac00f359a1e025
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Anil Belur [Tue, 25 Jul 2017 03:01:23 +0000 (13:01 +1000)]
Set sensible default timeouts for packer jobs
Set the build timeout for verify job to 10 minutes and merge job
to 45 minutes based on evaluation of average build timeouts in
OpenDaylight's packer job runs.
https://jenkins.opendaylight.org/releng/view/packer
Change-Id: If97eab52f23952fd141888a7618b4bd8a502dd70
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Andrew Grimberg [Tue, 25 Jul 2017 13:22:49 +0000 (06:22 -0700)]
Remove unneeded JJB variable from packer templates
Gerrit Iaccaa906980eb077676a3dc4b9100a91ec65f8c0 /
commit
91d975d5c426a08e82d8a6bbe1e298fa82f2b7b5 removed an unneeded
variable from the packer scripts but it wasn't removed from the top
level macros.
Change-Id: I893e25429c5aab45fcabdf3853e752e2f12dcf36
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Thanh Ha [Mon, 24 Jul 2017 22:10:08 +0000 (18:10 -0400)]
Remove unnecessary openstack configuration file
The packer jobs do not use openstack so do not require a clouds.yaml
file.
Change-Id: Iaccaa906980eb077676a3dc4b9100a91ec65f8c0
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Andrew Grimberg [Mon, 24 Jul 2017 20:47:15 +0000 (13:47 -0700)]
GitHub triggers need distinct status contexts
For GitHub to register each of the different jobs that are running for
verify (and merge?) we need distinct status context strings.
Change-Id: Ie240797dcb383b9f6a09319db902df9a6f46c942
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Anil Belur [Wed, 19 Jul 2017 10:14:49 +0000 (20:14 +1000)]
Pass common maven options to deploy file builder
Uploading large files on nexus prints lots of unwanted
messages in the logs, therefore disable this by passing
predefiend options through $MAVEN_OPTIONS. Also pass any
parameters to maven provided through job parameters.
Change-Id: I2e11adcb26d07097fa43cc289175aaa1cda897f9
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Anil Belur [Mon, 3 Jul 2017 11:54:03 +0000 (21:54 +1000)]
Add generic packer templates
- Packer jobs are designed to validate packer files and build
custom images on the cloud. The packer templates can be used for
and LF projects which clone global-jjb submodule.
- The jobs check if packer binaries are unavailable and install packer
on the build node. The default version of packer installed is 1.0.2
while more recent version can be defined in the job.
- Update test templates according to new packer jobs introduced.
Change-Id: I3657621e30d402655b84973ea4b4c48fa21cea2d
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Jamo Luhrsen [Wed, 19 Jul 2017 21:49:57 +0000 (21:49 +0000)]
Merge "Cleanup Coala config"
Daniel Farrell [Wed, 19 Jul 2017 21:43:16 +0000 (17:43 -0400)]
Cleanup Coala config
* Use new inheritance semantics
* Add ignores so checks run faster
* Use cleaner multi-dir regexes
Change-Id: I18e0fa2b3033c658a297cd71e368f0e272b081b0
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
Jeremy Phelps [Thu, 13 Jul 2017 16:46:19 +0000 (11:46 -0500)]
Add whitelist and admin-list params to gh trigger
This enables users in the white list to trigger any job
that uses the lf-infra-github-trigger macro.
In addition you can set users in the admin-list to have
admin rights on a pr.
Change-Id: Ib69095008780e8ba3a752aaeb498e7d6f8582cb5
JIRA: RELENG-174
Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Tue, 18 Jul 2017 17:54:16 +0000 (13:54 -0400)]
Update SPDX License header to new format
According to SPDX's website https://spdx.org/using-spdx the correct
format for specifying SPDX is now:
# SPDX-License-Identifier: EPL-1.0
Issue: RELENG-278
Change-Id: I261e220b0b509eac12a9d2b3bbef82dd1c3a7c4c
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Jessica Wagantall [Fri, 14 Jul 2017 07:02:39 +0000 (00:02 -0700)]
Validate URLs using Jenkins env variable
Since we are adding in Jenkins a variable
JIRA_URL, we want to make the logic of this
script so that it picks up its value to look
for related URLs in the commit text rather
than using a static value.
Change-Id: Id6d1df4cfefa0d37f7f74a48d8d5149379ede3eb
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Jessica Wagantall [Tue, 11 Jul 2017 20:40:36 +0000 (13:40 -0700)]
Check for JIRA URLs on JIRA based projects
Check if the project has a JIRA_URL defined
in Jenkins and, if so, check if there are
JIRA URLS in the commit text.
Ignore checks for projects that don't use JIRA
Change-Id: I2267aa98e1b6a9c727fb9a54426aef5c5a7131e6
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Anil Belur [Tue, 4 Jul 2017 00:47:28 +0000 (10:47 +1000)]
Add missing content/repositories path to URL
NEXUS_REPO_URL was missing the content/repositories path creating an
invalid upload path for Nexus.
Change-Id: I09f6ff06e71355aafcb90cb2d011203bfc6584c0
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Jessica Wagantall [Fri, 16 Jun 2017 06:29:09 +0000 (23:29 -0700)]
Add Nexus IQ CLM scan job
This template will be used to perform code scans
and report the results in nexus-iq server.
A plugin for nexus-iq will need to be installed and
configured in Jenkins before using this job.
JIRA: RELENG-176
Change-Id: I813da293728615a42b43ec785385a38237c57213
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Andrew Grimberg [Mon, 3 Jul 2017 16:01:01 +0000 (16:01 +0000)]
Merge "Fix typo in deploy file builder loop"
Jamo Luhrsen [Fri, 30 Jun 2017 02:43:40 +0000 (02:43 +0000)]
Merge "Expose stream as a env variable"
Thanh Ha [Fri, 30 Jun 2017 02:02:00 +0000 (22:02 -0400)]
grep: DO NOT return exit code 1 on no match
This is causing build failures in OpenDaylight for our patches :(
Change-Id: I1e5c90a0507756103e602a4fd298164b127189ec
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Thu, 29 Jun 2017 22:55:53 +0000 (18:55 -0400)]
Expose stream as a env variable
Shell scripts might be interested in using STREAM so let's expose it via
env variable so that they can pick it up. Default all job types to
stream=master.
Change-Id: Ia61d00f88649ef9c01cd6a15cbc248bb4fae1106
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Thu, 29 Jun 2017 15:38:36 +0000 (11:38 -0400)]
Fix maven-release job choosing strategy
The choosing strategy should be default otherwise the wrong commit is
checked out.
Change-Id: I398e51440c9fffd58538fea5f12665685c97c725
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Anil Belur [Thu, 29 Jun 2017 09:36:58 +0000 (19:36 +1000)]
Fix typo in deploy file builder loop
Change-Id: I22400fdd7a15897f3648881c1ab74868248113ee
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Anil Shashikumar Belur [Wed, 28 Jun 2017 07:22:22 +0000 (07:22 +0000)]
Merge "Add maven-deploy-file builder for packaging jobs"
Anil Belur [Wed, 14 Jun 2017 08:12:40 +0000 (18:12 +1000)]
Add maven-deploy-file builder for packaging jobs
Change-Id: I243d13c257756f653b702c57e5d8c700411c53e9
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Jessica Wagantall [Tue, 27 Jun 2017 18:58:20 +0000 (18:58 +0000)]
Merge "Add a check before running the sysstat script"
Thanh Ha [Mon, 26 Jun 2017 22:01:30 +0000 (18:01 -0400)]
Add write-good plugin to lint Markdown
Change-Id: Ib96d2abbfff893ef70d084f3b55ec656a4b374be
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Mon, 26 Jun 2017 21:25:07 +0000 (17:25 -0400)]
Add Markdown linting
Change-Id: I6232763c39c2369e5352033ffbffc831aa5e148e
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Mon, 26 Jun 2017 21:14:35 +0000 (17:14 -0400)]
Reorganize .coafile
- Alphabetical ordering
- More specific ignores
Change-Id: I1663a044be845ee1edc65e65192074548212ccae
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Mon, 26 Jun 2017 21:10:13 +0000 (17:10 -0400)]
Add jenkins-admin scripts to global-jjb
Change-Id: I3419d1af343d04dc85f777b61d820f7c4f27276e
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Tue, 20 Jun 2017 19:49:12 +0000 (15:49 -0400)]
Make global-jjb verify JJB files
This adds to tox.ini some code to make it actually test the global-jjb
yaml files by using a test.yaml that is copied from test.template by
tox. This is so that downstream projects do not pull in the fake job
data.
Also archives the test job output to job-configs on the log server.
Change-Id: Ie0dcc99d2df9ac90410be4a5b03d6d409027f34a
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Andrew Grimberg [Thu, 22 Jun 2017 13:33:53 +0000 (13:33 +0000)]
Merge "Add an appendix to the README"
Andrew Grimberg [Wed, 21 Jun 2017 20:00:58 +0000 (13:00 -0700)]
Make sure docker-login is include-raw-escape
The docker login script has several curly brace variables that it needs.
Using include-raw instead of include-raw-escape causes JJB to break.
Change-Id: I345e9256f46eef2bf1fd245b985ebf5ecad77616
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Thanh Ha [Wed, 21 Jun 2017 15:45:55 +0000 (11:45 -0400)]
Add an appendix to the README
Explain the minimum ShellCheck version that is required if ShellCheck is
being used by a ci-management project to lint their JJB directory.
Change-Id: I5b08f6d29fee189b9cbc7714f2dc0ba646c5e917
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Mon, 19 Jun 2017 18:36:55 +0000 (18:36 +0000)]
Merge "lf-ci-jobs: Add git-validate-jira-urls.sh"
Jessica Wagantall [Tue, 13 Jun 2017 17:43:39 +0000 (10:43 -0700)]
lf-ci-jobs: Add git-validate-jira-urls.sh
Across projects, we have commit messages being
merged with jira URLs instead of the accepted
format: Issue: <JIRAKEY>-<ISSUE#>
Jira URLs break the its-jira plugin making the
link unaccessible from gerrit to the jira issue.
Change-Id: Iecc82b34275d640549f974312bfba65fe3fa56f7
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Andrew Grimberg [Fri, 16 Jun 2017 20:39:26 +0000 (13:39 -0700)]
Add lf-infra-docker-login macro and script
Provide a way to utilize a maven settings file to store the login
credentials to our custom hosted docker registries as well as for
DockerHub (docker.io)
Change-Id: Ifb519b09afecf29c44bedc75a3a81a9b174a978a
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Anil Belur [Fri, 16 Jun 2017 02:51:33 +0000 (12:51 +1000)]
Add a check before running the sysstat script
Systat is not enabled by default on Ubuntu, which requires
this check for projects which have not configured sysstat in
their provisioning scripts.
Change-Id: Idcde47ab389ff2b0bb2f5d43ee716a4a5c926fd0
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Andrew Grimberg [Tue, 13 Jun 2017 17:48:51 +0000 (10:48 -0700)]
Fully render GitHub SCM clone URLs
After additional testing it has been proven that the GitHub plugin
itself, which is used for the final merge (push) operation will only
register as a handler if the SCM URL is fully realized without any
variables.
Issue: RELENG-191
Change-Id: I3492dac96e85a3d81819fd2ba810629f179d0c04
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
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>
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>
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>
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>
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>
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>
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>
Andrew Grimberg [Mon, 12 Jun 2017 18:03:12 +0000 (18:03 +0000)]
Merge "Add support for GitHub to Python templates"
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>
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>
Thanh Ha [Sun, 11 Jun 2017 16:11:23 +0000 (16:11 +0000)]
Merge "Set wget to quiet mode to hide Maven DL output"
Thanh Ha [Sun, 11 Jun 2017 16:10:43 +0000 (16:10 +0000)]
Merge "Do not print pipdeptree for lftools"
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>
Thanh Ha [Sat, 10 Jun 2017 07:27:58 +0000 (07:27 +0000)]
Merge "Enable sar report collection for global-jjb"
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>
Thanh Ha [Sat, 10 Jun 2017 06:11:44 +0000 (06:11 +0000)]
Merge "Fix warning about Default profile being deprecated"
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>
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>
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>
Thanh Ha [Fri, 9 Jun 2017 17:18:37 +0000 (17:18 +0000)]
Merge "Make Github url and clone url at Jenkins level."
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>