integration/packaging.git
6 years agoFix typo s/match/matched 51/66251/2
Jamo Luhrsen [Tue, 5 Dec 2017 18:44:32 +0000 (10:44 -0800)]
Fix typo s/match/matched

Change-Id: Ic704479facd0aea2387e70a4b156ec78c274c3c5
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
6 years agoAdd docs about RPM build publishing Nexus/logs 20/66220/4
Daniel Farrell [Tue, 5 Dec 2017 04:21:42 +0000 (23:21 -0500)]
Add docs about RPM build publishing Nexus/logs

Add docs about how RPMs are published from build jobs running in
production Jenkins (Nexus) and sandbox Jenkins (optinoal logs archive).

Change-Id: I9dacb80f7a254e4fc1f1b434776855fee582cf57
Fixes: INTPAK-46
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoBlacklist false RPM dependencies 65/66165/6
Daniel Farrell [Fri, 1 Dec 2017 20:47:16 +0000 (15:47 -0500)]
Blacklist false RPM dependencies

Fixes: INTPAK-10
Change-Id: I7c8194a7d37638ac9640db89d7188c8a96a7a700
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoFix pkg unit tests, URL update 22/66222/1
Daniel Farrell [Tue, 5 Dec 2017 05:08:18 +0000 (00:08 -0500)]
Fix pkg unit tests, URL update

Change-Id: I257d99365aaabac04eb29118df4c9e61cc8cb2fb
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd Packer definitions for recent ODL releases 99/66099/1
Daniel Farrell [Thu, 30 Nov 2017 16:39:31 +0000 (11:39 -0500)]
Add Packer definitions for recent ODL releases

Change-Id: I7dcda75288595315c7bc3600d9e1a88b08ed0987
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd example repo configs for recent RPMs 40/66040/4
Daniel Farrell [Wed, 29 Nov 2017 00:49:52 +0000 (19:49 -0500)]
Add example repo configs for recent RPMs

Change-Id: I807ccab2f5ea7a0d96574f25b270ac13206839dd
Fixes: INTPAK-105
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoUpdate RPM test, Dockerfile ODL versions 7->7.1 21/66021/2
Daniel Farrell [Tue, 28 Nov 2017 19:03:53 +0000 (14:03 -0500)]
Update RPM test, Dockerfile ODL versions 7->7.1

Change-Id: I6e259208702d2f817b8819ed3d1bc26bbd3c39cd
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoUpdate build URLs use in pkg tests, fixes 38/66038/1
Daniel Farrell [Tue, 28 Nov 2017 23:41:12 +0000 (18:41 -0500)]
Update build URLs use in pkg tests, fixes

The periodic verify jobs were failing because two of the URLs here had
expired. Go ahead and update all of them.

Change-Id: I7f7dad9b1e4438bc8b8ee1d9936e10918e211c35
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoMove versioniong wiki to readthedocs, update 56/65056/8
Dipankar Jain [Thu, 2 Nov 2017 18:26:51 +0000 (23:56 +0530)]
Move versioniong wiki to readthedocs, update

Imports most content from:

wiki.opendaylight.org/view/Integration/Packaging/Versioning

Also:
  * Updates examples to use newer releases
  * Adds links to ODL Nexus-hosted packages
  * Shows puppet-odl versions via metadata, tags no-longer used
  * Updates links
  * Fixes typos

Resolves: INTPACK-24
Change-Id: I8968654078426e5e97298b4380a53e8b3b01077d
Signed-off-by: Dipankar Jain <bunny_jain@ymail.com>
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoConsolidate tarball/sys unit file cache logic 60/63360/16
Daniel Farrell [Wed, 20 Sep 2017 17:08:21 +0000 (13:08 -0400)]
Consolidate tarball/sys unit file cache logic

Move artifact caching logic to shared lib so it can be reused for RPM
and deb builds.

Change-Id: Ic968b67881aaca7041dfe2cddb89df1a0a4cae4a
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoUse latest ODL RPM in example CentOS Dockerfile 33/64533/1
Daniel Farrell [Thu, 19 Oct 2017 17:32:18 +0000 (13:32 -0400)]
Use latest ODL RPM in example CentOS Dockerfile

Change-Id: I8bb0661965c90eabb03014c9c0db30f24035e0c3
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoSimplify most-recent-snap-URL given ODL version fn 71/64171/2 release/carbon-sr2
Daniel Farrell [Wed, 11 Oct 2017 18:59:44 +0000 (14:59 -0400)]
Simplify most-recent-snap-URL given ODL version fn

Change-Id: I3d1d82615f89077bd854f8955abdd9a83539da3d
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd pkg unit tests for changelog date format 89/64089/2
Daniel Farrell [Mon, 9 Oct 2017 18:52:43 +0000 (14:52 -0400)]
Add pkg unit tests for changelog date format

Change-Id: Idbdcd6fe2868501fef2ecd277012b20ac34fc679
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd pkg unit tests for Java version, fix type bug 83/64083/2
Daniel Farrell [Mon, 9 Oct 2017 18:17:03 +0000 (14:17 -0400)]
Add pkg unit tests for Java version, fix type bug

Add unit test coverage for pkg lib helper fn that gives the Java version
required by a given ODL version. Also fix bug in that fn that caused it
to miss-handle strings.

Change-Id: I0ba2f5437ec7dd9d1972c75109c8a671e1be0d6c
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd pkg unit test coverage for get sysd commit fn 82/64082/1
Daniel Farrell [Mon, 9 Oct 2017 17:50:05 +0000 (13:50 -0400)]
Add pkg unit test coverage for get sysd commit fn

Change-Id: I44408738ce410f453ed6a9a60c4a49d74aba9193
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoRemove unnecessary coala linting ignores 74/64074/1
Daniel Farrell [Mon, 9 Oct 2017 14:46:45 +0000 (10:46 -0400)]
Remove unnecessary coala linting ignores

The ShellCheck bear doesn't check *.py file line lengths.

Change-Id: I8e1c065f579531d2797fa61ab22af49120a27663
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd Nitrogen release to pkg unit tests 80/63980/1
Daniel Farrell [Thu, 5 Oct 2017 10:07:42 +0000 (06:07 -0400)]
Add Nitrogen release to pkg unit tests

Change-Id: I8b8c717a814f59424b5caadf5062dc47e34d758e
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoHandle empty strings for pkg changelog name/email 45/63945/2
Daniel Farrell [Wed, 4 Oct 2017 13:59:11 +0000 (09:59 -0400)]
Handle empty strings for pkg changelog name/email

Allows RelEng jobs to makes calls like

./build.sh --changelog_email "$var" ...

without worrying about if $var is set or empty.

Change-Id: Id5fdd4f6891c815062c97ea0fdb68879fedfba42
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoUpdate packaging unit tests 13/63913/1
Daniel Farrell [Tue, 3 Oct 2017 14:03:23 +0000 (10:03 -0400)]
Update packaging unit tests

* Update versions to latest available
* Remove Boron tests, deprecated now that Nitrogen is out

Change-Id: I98367efa9505a93ed4bca630a24e86e803787eca
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoRename pkg tests to reflect new structure 70/63870/3
Daniel Farrell [Mon, 2 Oct 2017 14:32:16 +0000 (10:32 -0400)]
Rename pkg tests to reflect new structure

The functions tested in this module have been moved from build.py to
lib.py, so the module should be renamed accordingly.

Change-Id: I90ecea71b31b3d0f38074d8d94ececdd2da28997
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoIgnore deb build dir in coala/git 72/63872/2
Daniel Farrell [Mon, 2 Oct 2017 15:11:47 +0000 (11:11 -0400)]
Ignore deb build dir in coala/git

Change-Id: I2ea1f01fba0228e31a3926a28c7a5ddaa58f28e3
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoRename pkg-specific build scripts to libs 32/63332/3
Daniel Farrell [Wed, 20 Sep 2017 13:32:58 +0000 (09:32 -0400)]
Rename pkg-specific build scripts to libs

Start of refactoring to consolidate and test more packaging logic.

Change-Id: Ia9f94290648f78c3e0188f3310c9146fbd60072d
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoFix Coala Jinja linting, errors 73/63873/1
Daniel Farrell [Mon, 2 Oct 2017 15:18:40 +0000 (11:18 -0400)]
Fix Coala Jinja linting, errors

Use correct paths to Jinja2 templates, fix errors now identified.

Change-Id: I16205e18df4405cc26bfc6f68333aa7c6591a92b
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoRefactor packaging Vagrant env 16/62516/5 release/nitrogen
Daniel Farrell [Thu, 31 Aug 2017 22:54:10 +0000 (18:54 -0400)]
Refactor packaging Vagrant env

Change-Id: Ib4a3dd05b681a9dae92e8ffb28823ff89344889e
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoCommon Vagrantfile for local testing 19/62419/4
Alok Anand [Tue, 29 Aug 2017 16:42:54 +0000 (22:12 +0530)]
Common Vagrantfile for local testing

A single vagrant file makes sense post refactoring than two vagrantfiles
in each deb and rpm directories. The commit also updates debian box to
the new stable 'stretch' version.

Change-Id: I62543f02ebd768540593a78d5ce644187b3c42a8
Signed-off-by: Alok Anand <alok4nand@gmail.com>
6 years agoRename pkg helper logic vars->lib 79/63279/2
Daniel Farrell [Tue, 19 Sep 2017 13:07:34 +0000 (09:07 -0400)]
Rename pkg helper logic vars->lib

This module started off containing only logic for getting build
variables, but now it's used as a generic packaging logic library.

Change-Id: Iaf953514a892a39d0fb801eedb41eec0d136f889
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd .repo files for Nexus-hosted 7/8 RPMs 37/62737/1
Daniel Farrell [Wed, 6 Sep 2017 00:00:17 +0000 (20:00 -0400)]
Add .repo files for Nexus-hosted 7/8 RPMs

Repo config files that will install ODL Nitrogen and Oxygen from ODL
Nexus repos.

Change-Id: I74b28ab892af2a27c67542407ddb97eb69480806
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoRefactor package building CLI 23/62023/8
Daniel Farrell [Sat, 19 Aug 2017 14:17:07 +0000 (10:17 -0400)]
Refactor package building CLI

Use subparsers to get correct package building CLI behavior. Fixes
issues like:

* Major version should be required when using latest-snap
* Download URL should be required for new-build but not latest-snap
* Minor version shouldn't be accepted

Also simplifies build definition-building logic that consumes CLI args.

Change-Id: Ie1c71b1828fff592aec74da6e9acfdbe0ed894ee
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd gitignore rule for tarballs/zips 17/62517/2
Daniel Farrell [Thu, 31 Aug 2017 22:57:31 +0000 (18:57 -0400)]
Add gitignore rule for tarballs/zips

Change-Id: Ic7c09202a86d23d568c330569d466470875e83f4
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoIgnore zips in Coala linting 18/62518/1
Daniel Farrell [Thu, 31 Aug 2017 22:58:05 +0000 (18:58 -0400)]
Ignore zips in Coala linting

Change-Id: I79fdae1fd71fa9ac75145f31b67999abe5a9175e
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoIgnore extracted distros in Coala linting 64/62464/2
Daniel Farrell [Wed, 30 Aug 2017 19:29:06 +0000 (15:29 -0400)]
Ignore extracted distros in Coala linting

Change-Id: Id12a58aa228f31c6f88b79242767ed6f4651bd27
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoFix fn name/args to make RPM snap builds work 63/62463/3
Daniel Farrell [Wed, 30 Aug 2017 19:26:29 +0000 (15:26 -0400)]
Fix fn name/args to make RPM snap builds work

Also add unit tests to catch basic issues with this fn.

Change-Id: I3ee18483b7bf6e53462789d6b169dcc730039ea0
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoFix permissions for zip-build RPMs 50/62450/3
Daniel Farrell [Wed, 30 Aug 2017 14:23:59 +0000 (10:23 -0400)]
Fix permissions for zip-build RPMs

Python's zipfile.ZipFile.extractall doesn't preserve permissions.
Long-standing Python bug with a proposed patch, but still isn't fixed.

Use a subprocess to call system unzip tool instead.

Change-Id: Id330cd34fd61b1b4e619aa5006d96b43e4d4db5b
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd pkg support for Karaf 4 not having codenames 32/62332/5
Daniel Farrell [Fri, 25 Aug 2017 19:19:44 +0000 (15:19 -0400)]
Add pkg support for Karaf 4 not having codenames

Karaf 3 distros had codenames our version parsing logic expected to be
able to extract. Starting with Nitrogen there are no codenames.

Also note that starting Carbon SR1 we dropped SR versions in codenames,
but the logic already happened to handle this.

Change-Id: I0b3bac64abd1290d5d3012e73935b76d1a913a8a
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoSupport Karaf 3 and Karaf 4 distro prefixes 92/62292/4
Daniel Farrell [Thu, 24 Aug 2017 20:03:09 +0000 (16:03 -0400)]
Support Karaf 3 and Karaf 4 distro prefixes

Karaf 3 used distribution-karaf, Karaf 4 uses karaf. Modify RPM building
logic to support both.

Karaf 4 snapshot builds should work after this change, but Karaf 4
autorelease builds still fail as they don't have the expected codename
tarball version component.

Change-Id: I03c789e530205ded2a948c99dd4cdcb7b6c16254
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoopendaylight.service Restart=on-failure 58/62258/3
Michael Vorburger [Thu, 24 Aug 2017 09:31:13 +0000 (11:31 +0200)]
opendaylight.service Restart=on-failure

https://bugzilla.redhat.com/show_bug.cgi?id=1479292

Change-Id: I3ae058a9581c642c314aaf7bac4fcb17a40bb771
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoMake version extraction logic more generic 29/62229/1
Daniel Farrell [Wed, 23 Aug 2017 21:41:52 +0000 (17:41 -0400)]
Make version extraction logic more generic

Turns out just making the match less strict fixes both issues with
multipatch-test Nexus repos and Karaf 3/4 distro naming.

Change-Id: Icc5272cb0c9411db51cf343681d24093363d39c4
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoRun packaging unit tests in tox, verify job 27/62227/1
Daniel Farrell [Wed, 23 Aug 2017 20:15:55 +0000 (16:15 -0400)]
Run packaging unit tests in tox, verify job

Adding package unit test to tox will cause them to be run as part of
regular verify jobs, which should give insight and keep them working.

Change-Id: Iedef7db355ad0399ff9b7e714a2fff3cbff9f8ef
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoUpdate pkg unit tests for new path, add tests 26/62226/1
Daniel Farrell [Wed, 23 Aug 2017 20:13:18 +0000 (16:13 -0400)]
Update pkg unit tests for new path, add tests

Change directory of packaging unit tests to work after recent RPM/deb
consolidation refactoring. Also add many tests for proper coverage.

Change-Id: I693c17b19a33a4b2eb7bb7ffbcb1e4c7b3eb06fe
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd support for building RPMs from zips 75/62175/3
Daniel Farrell [Tue, 22 Aug 2017 23:35:58 +0000 (19:35 -0400)]
Add support for building RPMs from zips

The RPM specfile logic requires a tarball, but this allows us to accept
links to zip distros and repackage them as tarballs.

This is useful because the multipatch-test job only publishes zips.

Change-Id: I361dd43fc722e675bd90bb69a50b7b2d8d532b82
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoFix systemd unit file URL for new dir structure 74/62174/2
Daniel Farrell [Tue, 22 Aug 2017 23:26:02 +0000 (19:26 -0400)]
Fix systemd unit file URL for new dir structure

Recent refactoring changed the path to this file, update accordingly.

Change-Id: Iabe11c826da9ce3663e262fae6a5065565712b38
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoUpdate RPM repo cfg file URL 59/62159/2
Daniel Farrell [Tue, 22 Aug 2017 13:26:42 +0000 (09:26 -0400)]
Update RPM repo cfg file URL

Recent refactoring in Int/Pack changed the path, update accordingly.

Change-Id: Ifcfad2ebf5f413987109bb2cdd19830f3ede80f5
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAlways use current datetime in pkg changelogs 03/62003/5
Daniel Farrell [Fri, 18 Aug 2017 20:05:51 +0000 (16:05 -0400)]
Always use current datetime in pkg changelogs

Don't accept a changelog_date param in packaging build logic. Instead,
always automatically find the current datetime and format it
appropriately based on package type.

Now that we're typically building from CI, and not supporting static
builds defined in var files, there's no valid usecase for using a
changelog datetime other than the current datetime. Keeping it just
adds complexity.

Also extract datetime formatting logic to a helper function.

Change-Id: I041f8852a340ff554934a274d3523cc27fcfc464
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoMake a common .gitignore file 98/62098/3
Alok Anand [Mon, 21 Aug 2017 16:48:44 +0000 (22:18 +0530)]
Make a common .gitignore file

Change-Id: If00e8b16d7707d2ae8f2da13aa61cd3b64b9dd98
Signed-off-by: Alok Anand <alok4nand@gmail.com>
6 years agoRemove YAML logic from DEB cache and templates 97/62097/4
Alok Anand [Mon, 21 Aug 2017 16:39:18 +0000 (22:09 +0530)]
Remove YAML logic from DEB cache and templates

As the YAML logic has been removed from building DEB packages these
functionalities are no more relevant.

Change-Id: Idaa1949bdf5023700aae7a0bd56510ee0c563155
Signed-off-by: Alok Anand <alok4nand@gmail.com>
6 years agoMove rpm & deb build logic into packages/ 24/61824/4
Alok Anand [Wed, 16 Aug 2017 09:51:21 +0000 (15:21 +0530)]
Move rpm & deb build logic into packages/

This commit organizes deb/ and rpm/ into packages/ . build.py, vars.py,
requirements.txt are moved into the base of packages/ to work with the
refactored logic.

Change-Id: Ife0b6a1382ce906a18d539d132569158860620fa
Signed-off-by: Alok Anand <alok4nand@gmail.com>
6 years agoBuild deb's using common build.py 27/61427/5
Alok Anand [Wed, 9 Aug 2017 14:23:51 +0000 (19:53 +0530)]
Build deb's using common build.py

Refactoring aims at creating a common entry point for both rpms and debs
building logic. Using a common build.py, debain will enjoy the same
advancements made earlier in rpm's build logic.

Change-Id: I038e40c7486cc8243feec9a7bb1dc407018f9b41
Signed-off-by: Alok Anand <alok4nand@gmail.com>
6 years agoMove rpm/requirements.txt 17/61417/3
Alok Anand [Wed, 9 Aug 2017 11:19:55 +0000 (16:49 +0530)]
Move rpm/requirements.txt

requirements.txt in the base dir will serve a common requirements file
for both rpm/deb building logic.

Change-Id: I64c3da2be9997fa344b62bdded87bbb5aa9cbc6b
Signed-off-by: Alok Anand <alok4nand@gmail.com>
6 years agoRemove YAML logic from RPM's spec & cache 15/61415/3
Alok Anand [Wed, 9 Aug 2017 10:39:14 +0000 (16:09 +0530)]
Remove YAML logic from RPM's spec & cache

As the YAML logic has been removed from building RPM packages these
functionalities are no more relevant.

Change-Id: I67c393bd02e02d7248acb022fc16363c15f6bab6
Signed-off-by: Alok Anand <alok4nand@gmail.com>
6 years agoUpdate RPM spec file to use `java_version` 37/61337/2
Alok Anand [Tue, 8 Aug 2017 14:39:30 +0000 (20:09 +0530)]
Update RPM spec file to use `java_version`

`java_version` variable is used by deb to provide java version required
as dependency for ODL package. This patch update RPM build logic as well
as spec file to use the variable `java_version` instead of hard coded
value.

Change-Id: Iac74fb751d3e6fedfea25badc5bdcdb7e498a66a
Signed-off-by: Alok Anand <alok4nand@gmail.com>
6 years agoAdd `get_java_version` func 30/61330/4
Alok Anand [Tue, 8 Aug 2017 12:41:00 +0000 (18:11 +0530)]
Add `get_java_version` func

The function returns the `java_version` variable which helps packages to
determine the needed version of java dependency.

Change-Id: Ifbe044be565ef597e42efa529858e509defd403f
Signed-off-by: Alok Anand <alok4nand@gmail.com>
6 years agoChange `rpm_release` to `pkg_version` 96/61196/2
Alok Anand [Fri, 4 Aug 2017 18:27:25 +0000 (23:57 +0530)]
Change `rpm_release` to `pkg_version`

The RPM build logic uses a var called rpm_version The deb uses a more
generic name, pkg_version. Changing `rpm_release` to `pkg_version` makes
it easier to have consistent names.

Change-Id: Idb2eaa824f78222353c62755d25186ec42b761fa
Signed-off-by: Alok Anand <alok4nand@gmail.com>
6 years agoRefactor snapshot url fetch logic 34/61134/3
Alok Anand [Thu, 3 Aug 2017 20:07:41 +0000 (01:37 +0530)]
Refactor snapshot url fetch logic

The logic to build snapshots is a key difference between rpm and deb
pipeline. `build_rpm_snapshot()` is essentially snapshot url fetch logic
plus `build_rpm()`, refactoring this logic makes it simple to add
snapshot build feature to deb pipeline.

Change-Id: I1369df471d546c4fdd55425830cdb2b86dda5bf9
Signed-off-by: Alok Anand <alok4nand@gmail.com>
6 years agoRelocate `extract_version()` & `get_sysd_commit()` 29/61129/3
Alok Anand [Thu, 3 Aug 2017 17:11:31 +0000 (22:41 +0530)]
Relocate `extract_version()` & `get_sysd_commit()`

The functions named above are useful to collect variables for both rpm
and deb building logic. The common build.py entry point can call these
functions from vars.py

Change-Id: I05fac7b6f09693233ca54a317af2ea7323814344
Signed-off-by: Alok Anand <alok4nand@gmail.com>
6 years agoRelocate entry function of `rpm/build.py` 16/60616/11
Alok Anand [Thu, 20 Jul 2017 17:33:32 +0000 (23:03 +0530)]
Relocate entry function of `rpm/build.py`

RPM build script can be used as a reference for building
a common entry point for both rpm and deb build pipelines.
This commit also creates the new common entry point in
`packages/build.py` for further refactoring.

Change-Id: Idee82deced213ce5963587eb376c19e2c5c2e4ac
Signed-off-by: Alok Anand <alok4nand@gmail.com>
6 years agoRemove submodules removed by I57f71982890f84ba4adc 92/61992/1
Thanh Ha [Fri, 18 Aug 2017 15:22:25 +0000 (11:22 -0400)]
Remove submodules removed by I57f71982890f84ba4adc

The patch I57f71982890f84ba4adc00077963961836ed6799 removed some
submodule configuration but did not actually remove the submodule. This
breaks projects like docs which pulls in packaging and tries to
recursively download submodules but the reference is now missing.

Change-Id: Ibfc1f7b314966ed67743596f7157f5c8ff213f8e
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoDefault to headless Packer builds 48/61548/2
Daniel Farrell [Fri, 11 Aug 2017 14:42:27 +0000 (10:42 -0400)]
Default to headless Packer builds

Builds in CI don't have X and fail with obtuse errors when this is true.

Change-Id: Id6ada81d7cd35a21d0def28744f0a1086ad56f64
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoRemove old ansible/puppet-odl submodules 41/61541/2
Daniel Farrell [Fri, 11 Aug 2017 09:49:04 +0000 (05:49 -0400)]
Remove old ansible/puppet-odl submodules

The ansible-opendaylight and puppet-opendaylight projects have been
imported into ODL-managed repos under Integration/Packaging. Remove the
old git submodules referencing their old GitHub repos.

Change-Id: I57f71982890f84ba4adc00077963961836ed6799
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoMake Packer docker_repo vary by OS 95/61495/3
Daniel Farrell [Thu, 10 Aug 2017 13:08:56 +0000 (09:08 -0400)]
Make Packer docker_repo vary by OS

We have DockerHub repos opendaylight/odl for CentOS (main OS) and
opendaylight/fedora for Fedora. With the docker_repo var in ODL var
file, it required a manual `docker tag` to push Fedora images to the
right repo. Making it vary by OS is more correct, avoids this step.

Change-Id: Ibcdfa2d509427652ac6096104e883316c2c54905
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoUse new become syntax for Packer Ansible provision 98/61498/1
Daniel Farrell [Thu, 10 Aug 2017 13:50:31 +0000 (09:50 -0400)]
Use new become syntax for Packer Ansible provision

The old `sudo: yes` way to do Ansible provisioning as root is
deprecated, throws a depreciation warning.

Change-Id: I4b530fa68aab234c3af21eec504369eb30128fee
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoRemove old Packer OS versions 94/61494/1
Daniel Farrell [Thu, 10 Aug 2017 13:02:19 +0000 (09:02 -0400)]
Remove old Packer OS versions

Debating if should also remove old ODL versions, but I have been
updating them with new OS releases so thinking no for now. Definitely
don't need old OS versions though, no plans to use them again.

Change-Id: Ic0836fa4a279f9ec3920e7dc0f265cb29168e8d1
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoUpdate packages at end of configuration 57/61457/1
Daniel Farrell [Wed, 9 Aug 2017 19:59:15 +0000 (15:59 -0400)]
Update packages at end of configuration

We already do a yum/dnf update at the start of the provisioning in the
Kickstart scripts, but by the end of the process there are additional
packages that should be updated.

Change-Id: I48d38aac680805894a9a21850206d57731a6bd38
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoUse Fedora 26 default in Packer Vagrant helper 36/61436/1
Daniel Farrell [Wed, 9 Aug 2017 17:12:40 +0000 (13:12 -0400)]
Use Fedora 26 default in Packer Vagrant helper

This Vagrantfile is just for testing built boxes, but as we're now
building F26 for new images should use that as default.

Change-Id: Icc16ab83b36acdee21b70665707cb1fd34ba7f0e
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoFix various age-induced Vagrant tutorial errors 71/61171/3
Daniel Farrell [Fri, 4 Aug 2017 13:54:21 +0000 (09:54 -0400)]
Fix various age-induced Vagrant tutorial errors

* Update tutorial Vagrant boxes to Fedora 26
* Remove now-unnecessary SSH config fix.
* Update path of wireshark file
* Update version of ODL installed in L2Switch tutorial
* Remove old doc link

Change-Id: I3d84c5b60714ec62d2d3f5ec5c194d63288bcb5e
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoUse ODL-managed ansible-odl repo in Packer builds 05/61405/1
Daniel Farrell [Wed, 9 Aug 2017 08:13:28 +0000 (04:13 -0400)]
Use ODL-managed ansible-odl repo in Packer builds

Explicitly telling ansible-galaxy that the SCM for Gerrit is git works
around the problem described in #61159 and the upstream issue.

https://github.com/ansible/galaxy-issues/issues/277

Change-Id: I08eb57a579d06cbad589ef721cb82ec41c31415e
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd Boron SR4 Packer var file 19/61119/2
Daniel Farrell [Thu, 3 Aug 2017 14:49:19 +0000 (10:49 -0400)]
Add Boron SR4 Packer var file

Change-Id: Ib7881afa82b569d9672b25eb95b7857df7e07c09
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoUse new ODL ansible-opendaylight repo in Packer 59/61159/1
Daniel Farrell [Fri, 4 Aug 2017 09:47:00 +0000 (05:47 -0400)]
Use new ODL ansible-opendaylight repo in Packer

Using the GitHub mirror of the ODL-hosted ansible-opendaylight repo
because installing roles with ansible-galaxy from upstream repo fails
with what seems to be an Ansible Galaxy bug (reported upstream).

https://github.com/ansible/galaxy-issues/issues/277

Change-Id: I62a0e37dde21b62e5eb03654a8c98381d7287d1f
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd Fedora 26 build support 03/61103/3
Sri Sanketh U [Thu, 3 Aug 2017 10:53:21 +0000 (16:23 +0530)]
Add Fedora 26 build support

Change-Id: Ia134a7f65a1a5a8350722ee0c9d6bcc904092322
Signed-off-by: Sri Sanketh U <sanketh.uppalapati@research.iiit.ac.in>
6 years agoAdd Carbon SR1 Packer var file 00/61100/4
Daniel Farrell [Thu, 3 Aug 2017 10:11:20 +0000 (06:11 -0400)]
Add Carbon SR1 Packer var file

Change-Id: I7e93767adbe6a45e1825e3c132a268fe9ef4479b
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoRemove deprecated rpm_repo_file ansible-odl param 14/61114/2
Daniel Farrell [Thu, 3 Aug 2017 13:04:30 +0000 (09:04 -0400)]
Remove deprecated rpm_repo_file ansible-odl param

Change 60815 to ansible-opendaylight made this var unnecessary.

Change-Id: Ic6c15e9909babb8d92a780e3bfe7ff3d6e7ca428
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoRemove Packer ssh-"fixing" logic 15/61115/1
Daniel Farrell [Thu, 3 Aug 2017 13:14:19 +0000 (09:14 -0400)]
Remove Packer ssh-"fixing" logic

This logic was adding because of a problem with upstream Fedora boxes
that seems to be fixed now (SSH doesn't hang forever without this). Also
this config now breaks because the file it's editing doesn't exist.

Change-Id: I9adb10f5fea7f47d3b4ee95549839c7fd18a0ff1
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd example RPM repo configs for ODL Nexus repos 61/60961/4
Daniel Farrell [Mon, 31 Jul 2017 20:34:13 +0000 (16:34 -0400)]
Add example RPM repo configs for ODL Nexus repos

Add .repo files that will install RPMs from each of the new RPM repos
hosted on ODL's Nexus.

Not adding .repo files for release repos yet as there are no RPMs in
them and trying to install from them errors out.

Not adding 7-devel repo because there are no Nitrogen builds in it yet
and trying to install from it errors out.

Change-Id: Id09048c837d80bf197dde8f2b1fa7ba25c8e93cb
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoRemove old instantiations of spec template 59/60959/2
Daniel Farrell [Mon, 31 Jul 2017 20:20:33 +0000 (16:20 -0400)]
Remove old instantiations of spec template

We are mostly using Jenkins jobs to build RPMs now, so we have moved
away from keeping the spec files that end up getting wrapped in RPMs.

Change-Id: Ib8888d0d114e1eeaa72e22ab5d767f05c40db266
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoIgnore spec files built during RPM builds 58/60958/2
Daniel Farrell [Mon, 31 Jul 2017 19:57:12 +0000 (15:57 -0400)]
Ignore spec files built during RPM builds

When building RPMs locally, the spec template is populated and rolled
into the RPM. Ignore the populated templates.

Change-Id: I0c7c9c0ecefb5d47f12a6435b82dadb700d4a0f4
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoRequire Java >=1.8 for RPMs, vs current >=1.7 52/60952/1
Daniel Farrell [Mon, 31 Jul 2017 19:22:46 +0000 (15:22 -0400)]
Require Java >=1.8 for RPMs, vs current >=1.7

All currently supported versions of ODL require Java 1.8, so make it a
hard requirement in the RPM spec file. Currently installs always happen
to pull down 1.8, but we should force it.

Change-Id: I15a765ff3305de5a9ee6db0af548590a6c3bc37f
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoUpdate service node image for new base 92/60892/2
Matt Welch [Fri, 28 Jul 2017 18:40:19 +0000 (14:40 -0400)]
Update service node image for new base

Moved build collateral into build/ dir. Updates to build files to
reflect new systemd-based container. Added connect_container_to_network
to create veth pairs and bind container to Linux beidges on the host.
Modeled service node files after upstream compute node files.

Change-Id: I3b662a801403f7d25dd134b3281d204d621ab41b
Signed-off-by: Matt Welch <matt.welch@intel.com>
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoUpdate compute build & run for new base 19/60619/4
Matt Welch [Thu, 20 Jul 2017 18:11:36 +0000 (14:11 -0400)]
Update compute build & run for new base

Moved build collateral into build/ dir.
Updates to build files to reflect new systemd-based container.
Added connect_container_to_network to create veth pairs and bind
container to Linux beidges on the host.
Updates to local.conf to enable instance VNC console and use ODL by
default.
Added restart script that can usually be used instead of start.sh.
Updates to run script to reflect new systemd-based container.

Change-Id: I6e3f2d184a222cdb5ae74b2c221b0f132ae47c62
Signed-off-by: Matt Welch <matt.welch@intel.com>
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd necessary iso_checksum variable 24/60824/1
Sri Sanketh U [Thu, 27 Jul 2017 17:00:26 +0000 (22:30 +0530)]
Add necessary iso_checksum variable

Change-Id: I19fe8ca357b7a596896e0004f4cff3d3db56c830
Signed-off-by: Sri Sanketh U <sanketh.uppalapati@research.iiit.ac.in>
6 years agoAdd necessary iso_urls variable 71/60771/1
Sri Sanketh U [Wed, 26 Jul 2017 11:15:01 +0000 (16:45 +0530)]
Add necessary iso_urls variable

Change-Id: I78116a45b7c02937fd2db714071adf4f2d88d057
Signed-off-by: Sri Sanketh U <sanketh.uppalapati@research.iiit.ac.in>
6 years agoAdd Carbon SR1 example RPM repo config 38/60738/1
Daniel Farrell [Tue, 25 Jul 2017 16:26:42 +0000 (12:26 -0400)]
Add Carbon SR1 example RPM repo config

Change-Id: I2094df3add1b805b7a948e7c5f756f45f29829a7
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoFix typo in 60-release example RPM repo config 92/60692/1
Daniel Farrell [Mon, 24 Jul 2017 15:04:17 +0000 (11:04 -0400)]
Fix typo in 60-release example RPM repo config

Just effected the name of the repo, still worked as expected.

Change-Id: Icca37a75ac4fc7ad6d7cb1c1babdb13c309ee6eb
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoenable building of s3p/systemd base container 48/60548/4
Matt Welch [Tue, 18 Jul 2017 19:18:00 +0000 (15:18 -0400)]
enable building of s3p/systemd base container

Build script and Dockerfile to build systemd base container.
Compute and service nodes will be based on this image (FROM).

See https://github.com/matt-welch/docker-devstack/tree/master/systemd
for development history.

Change-Id: I6ff5f8520ae889df81dccac12bf35f3995e5cbd0
Signed-off-by: Matt Welch <matt.welch@intel.com>
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoRemove existing/YAML building logic 08/60308/5
Alok Anand [Thu, 13 Jul 2017 19:54:12 +0000 (01:24 +0530)]
Remove existing/YAML building logic

The building logic is moving towards automated
vars collection and is triggered by Jenkins
jobs.Using old list of builds configs makes it
difficult to refactor a consistent interface for
both rpm and deb piplelines.

Signed-off-by: Alok Anand <alok4nand@gmail.com>
Change-Id: I0cf19c21f2417ce915c850fe4861fe40653f4714
Signed-off-by: Alok Anand <alok4nand@gmail.com>
6 years agoRemove unnecessary docker_repo variable 46/60546/1
Sri Sanketh U [Tue, 18 Jul 2017 16:38:15 +0000 (22:08 +0530)]
Remove unnecessary docker_repo variable

Change-Id: I74dfd7f6a06ba37554d5850810a47657c8dfbcf8
Signed-off-by: Sri Sanketh U <sanketh.uppalapati@research.iiit.ac.in>
6 years agoAdd WriteGoodLintBear support 33/60433/9
Sri Sanketh U [Sun, 16 Jul 2017 14:31:19 +0000 (20:01 +0530)]
Add WriteGoodLintBear support

Fix WriteGood errors where appropriate

Fix readability, inheritance issues in coafile

Change-Id: I7c778e391c05b20326edc04c7a102864dc38ee8a
Signed-off-by: Sri Sanketh U <sanketh.uppalapati@research.iiit.ac.in>
6 years agoAdd Boron SR4 example RPM repo config 84/59484/1
Daniel Farrell [Fri, 23 Jun 2017 19:15:03 +0000 (15:15 -0400)]
Add Boron SR4 example RPM repo config

Change-Id: I0239d02c2192a42b347d170d9843e03a4d06a814
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoVarious minor docs fixes, link additions 70/59470/1
Daniel Farrell [Fri, 23 Jun 2017 14:22:57 +0000 (10:22 -0400)]
Various minor docs fixes, link additions

Change-Id: I8c884c85afbe4113910598e6f01969b23e09ff23
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoMajor docs update 70/58670/4 release/boron-sr4
Daniel Farrell [Sat, 10 Jun 2017 21:30:07 +0000 (17:30 -0400)]
Major docs update

Change-Id: I56396daabbdbe213dee61992533335be38ff70d0
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd Boron SR3 Packer config 50/58550/4
Daniel Farrell [Thu, 8 Jun 2017 20:02:46 +0000 (16:02 -0400)]
Add Boron SR3 Packer config

Change-Id: Id035a7c23ddbf2b76845c4dde81e1aa30cdffc47
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd Carbon Packer config 51/58551/4
Daniel Farrell [Thu, 8 Jun 2017 20:04:13 +0000 (16:04 -0400)]
Add Carbon Packer config

Change-Id: I79a22f3501e1298398142e4d7a1ede957309316b
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoUpdate Packer Vagrantfile for new versions 57/58557/2
Daniel Farrell [Thu, 8 Jun 2017 22:22:33 +0000 (18:22 -0400)]
Update Packer Vagrantfile for new versions

Also refactor with better loops to be more clean.

Also remove F24 and Beryllium entries.

Change-Id: I2d137f68643b2c58c80c2781a95663051fba85a8
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoFix new shellcheck errors caught by latest version 56/58556/2
Daniel Farrell [Thu, 8 Jun 2017 22:22:02 +0000 (18:22 -0400)]
Fix new shellcheck errors caught by latest version

Main new shellcheck rule is related to exiting if cd commands fail. Add
or conditions to exit if they do, per recommendations.

Also make a few shellcheck ignores more explicit.

Change-Id: Ic8e290c1a75891b47b7aa874fe9cff0c3e9fd720
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd example 7-testing RPM repo config 82/58282/2
Daniel Farrell [Mon, 5 Jun 2017 21:39:34 +0000 (17:39 -0400)]
Add example 7-testing RPM repo config

Change-Id: If57b93dde2430a205d7a3c1a26b727f41000c5d7
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd 6-release example RPM repo 83/58283/1
Daniel Farrell [Mon, 5 Jun 2017 21:41:46 +0000 (17:41 -0400)]
Add 6-release example RPM repo

Change-Id: Ic849ca23a4a658d336f2580857ae4d92635c94a2
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoAdd vars for Carbon's .deb build 35/57935/2
Akshita Jha [Sat, 27 May 2017 16:12:25 +0000 (21:42 +0530)]
Add vars for Carbon's .deb build

Change-Id: Ia3fed1e209a780803970c320610511964886413b
Signed-off-by: Akshita Jha <zenith158@gmail.com>
6 years agoPin requests to <2.16 39/57939/1
Daniel Farrell [Sun, 28 May 2017 14:39:06 +0000 (10:39 -0400)]
Pin requests to <2.16

The new requests library pulls in a chardet dependency that is in
conflict with coala packages. Pin the version of requests to ensure
we're pulling in a supported version.

Copied change by Thanh.

Change-Id: I345f37da5b96f40da5dce077635b6e85bb8638ff
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
6 years agoPin coala to 0.11 36/57736/2 release/carbon
Thanh Ha [Wed, 24 May 2017 00:57:40 +0000 (20:57 -0400)]
Pin coala to 0.11

coala-bears 0.11 just released 5 hrs from this patch author date. It
breaks the build because we were pinning coala. It seems coala and
coala-bears versions must match exactly so pin both versions for good
measure.

Change-Id: Ib6c903140895077c0053666cd4203aac88c220a2
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoPin coala version to <0.11 97/57697/1
Thanh Ha [Tue, 23 May 2017 13:41:14 +0000 (09:41 -0400)]
Pin coala version to <0.11

I seems the new 0.11 version breaks us due to dependency conflicts.
Let's pin the version and migrate when we have time to troubleshoot.

Change-Id: I9e3b696746fcbc87e11c413f31096623e5ed0c22
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoRe-add apt-get update to deb/Dockerfile, per OPNFV 70/55770/1
Daniel Farrell [Thu, 20 Apr 2017 19:32:36 +0000 (15:32 -0400)]
Re-add apt-get update to deb/Dockerfile, per OPNFV

OPNFV Fuel is telling me removing this broke them.

https://build.opnfv.org/ci/view/fuel/job/fuel-build-daily-master/2234/console

Change-Id: I165c272d619b21f683d906a14c6412b6ab9a2c71
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
7 years agoAllow long links in git commit messages 69/55769/1
Daniel Farrell [Thu, 20 Apr 2017 19:32:05 +0000 (15:32 -0400)]
Allow long links in git commit messages

Change-Id: I6f5f6737fdc375dff7d4cb80fdca571fe36dac1d
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>