Commit Graph

19 Commits

Author SHA1 Message Date
Luigi Toscano 9459f44cb5 Replace git.openstack.org URLs with opendev.org URLs
Thorough replacement of git.openstack.org URLs with their opendev.org
counterparts.

Port of the present changes are needed to fix some errors in legacy jobs when
opendev.org is used as git base URL, as devstack-gate tries to clone
openstack-dev/devstack and it fails (the redirect works only when
git.openstack.org is used).

Change-Id: I81f6e00aa10ef7f93d0dead2f76369035a18a81b
2019-04-20 14:52:19 +02:00
Ian Wienand 0f3e44d726 Fix bashate "local hides exit status" warnings
Promote "local hides exit status" (E042) to error and fix issues found
(this is inline with what we do in devstack).

Change-Id: Idd784af066db80bb67792da3dd0aa0ae4c8475db
2018-03-26 09:46:56 +02:00
Sam Betts 11fa676ceb Add fallback to -eol tag if stable branch doesn't exists
In order to support continued testing against EOL version of projects,
the setup_project function needs to be able to understand checking out
to an eol tag.

Change-Id: I1b2d030df8cb2a850bf9248595171d96a813d381
2017-11-27 15:20:41 +00:00
James E. Blair 438f5bd1bc Remove JOB_NAME from reproduce
Zuul v3 doesn't make a job-specific directory for the workspace,
instead we're using the home directory.  Change reproduce.sh to
just use PWD as the workspace.

Change-Id: Ie3573437f79beeb46cf16e69415e08996eb4ffae
2017-08-28 11:33:13 -07:00
Clark Boylan 4b70a09636 Make sure the d-g hooks end up in reproduce.sh
Currently we don't have any handling for devstack-gate hooks in the
reproduce.sh script so jobs that rely on them don't generate accurate
reproduce.sh scripts. Fix this by explicitly adding each of the three
hooks to the reproduce.sh script if they are defined.

Change-Id: Iae6191dfc2dab81e7ca172762728ede2946f5f62
2016-10-07 14:27:10 -07:00
Yolanda Robla 589ca4f1c2 Fix bug in populating multiline env vars on reproduce
The script to populate reproduce.sh is failing when populating
multi-line env vars. That is the case of the enable_plugin lines,
when more than one plugin is enabled.
Add this workaround to properly populate all needed settings.

Also add a test to ensure that reproduce method is working
as expected.

Change-Id: I5287098a47162321efadbde7d069fa2a4e7eabf7
2016-03-16 13:06:28 +01:00
fumihiko kakuma e4ca0a16b2 Allow for git base override
This patch allows us to override a git base to repository of a project
specified by OVERRIDE_${PROJECT}_GIT_BASE.
If specify OVERRIDE_DEVSTACK_GATE_GIT_BASE=https://github.com,
devstack-gate project will be accessed using https://github.com
as git base.

Change-Id: I7354f9957be2faec800d448473fdc743cb55a91e
2015-08-20 05:25:11 +00:00
Matthew Treinish 52c97ccb8c
Fix the setup_workspace to handle missing ZUUL_BRANCH
This commit adds logic to the setup_workspace function to be able to
handle the case where the var ZUUL_BRANCH isn't set. This is what
apparently happens during periodic jobs and causes those to fail.
If ZUUL_BRANCH isn't set we just use the fallback zuul ref which is
what the expected behavior would be if the function didn't explode.

Change-Id: I77b98b8a8d8602da0092a5250cc0ce49de9215db
2015-06-23 19:48:45 -04:00
Sean Dague 57be7c262e actually save hook logs
We've not been saving the hook logs because we are attempting to do
the save without enough permissions.

example:

http://logs.openstack.org/94/156594/1/check/check-swift-dsvm-functional/310e7a6//console.html#_2015-02-17_14_38_21_451

All other logs are moved with sudo, we should do that here as well.

For test purposes we make SUDO overridable for this call. In the
future we can consider what other SUDO calls are possibly overridable.

Change-Id: I6d4a378edd65cbe54243f8089ed9d0bc2b1a6478
2015-02-17 11:57:04 -05:00
Ramy Asselin 1ba5b62550 Refactor the hook logic into a reusable function
Hook logic exists twice. Let's refactor it into a function
so that it can be reused for more hooks.

Include some test cases.

Test cases don't like doing 'sudo mv', so let's not use it if not necessary.

Change-Id: I84d2fd66265c8e2e77faf16ce03e92790f2f51b8
2015-01-26 08:57:30 -08:00
Attila Fazekas 0a87ef43de Sanity check in setup_workspace
setup_workspace called with unquoted variables,
which could lead to wrong argument moved into wrong variable,
when one of the variables was empty string or contained space.

This change quotas the parameters for setup_workspace,
and also validates the
OVERRIDE_ZUUL_BRANCH, GRENADE_OLD_BRANCH, GRENADE_NEW_BRANCH are
not empty strings when they are used.

Change-Id: I13d1458c9cebd83b0ca700b3153f6645b2931c0d
2014-11-10 12:19:19 +01:00
Sean Dague 5a1407c9c7 localize variables
there was coupling between tests because of variables that might get
set in one test and still exist in following ones (but not be declared
there). By localizing all our variables we can isolate ourselves.

To prove that we did this correctly, scramble the test order at the
end (more specifically alphabetize it), so that it has no relation
to the declare order.

Change-Id: I6a52b85b909e54d692abe6d2cc2223dc2e9154e4
2014-05-20 15:50:16 -07:00
Sean Dague 28990e132a usability improvements to test-functions.sh
instead of dying at the first error found, run all the tests
and show all the errors. This makes it simpler to debug as you
can address more than one issue at once.

add the use of the bash 'caller' function to automatically print
out the name of the function and line number on both successful
and failing asserts. This ensures it's easy to get to the issue
at hand.

Change-Id: If15f50c6c41aa3940682d41c776589407a42bf4f
2014-04-17 17:49:35 -04:00
Sean Dague 6287ca6c9f allow for generic branch overrides
This allows us to specify project specific branch overrides in
jjb definitions. For instance, OVERRIDE_TEMPEST_PROJECT_BRANCH=master
to always test with tempest master.

Now with support for projects like oslo.foo

Change-Id: Ic259c5b60a307b87771514849a6a78eb1bc32c75
2014-04-09 07:43:42 -04:00
James E. Blair ea089da7f5 Add ZUUL_PROJECT to periodic test
To demonstrate that it is now safe to not unset it (because the
ZUUL_REF checkout check has been removed).

Change-Id: I4f88485fa2f9307ce80e0dd845f865e60c22f9f6
2013-12-26 08:32:57 -08:00
James E. Blair a8aabdb966 Fix workspace setup
Stable branch overrides for client testing, devstack-gate alternate-branch
testing, and grenade old/new branch selection are all actually the same
thing.  Update setup_project to reflect that, fixing all known bugs in
the process.  Note that some jobs will need to be updated to pass in
OVERRIDE_ZUUL_BRANCH.

This is an update to the previously reverted change to add testing and a fix
for an issue seen in production.  The resulting code is actually simpler, but
it is worth noting that the check to ensure that at some point the ZUUL_REF
for the project was checked out has been removed.

Change-Id: Ie0c4b30878896684cc2faf02dee1ea222594ae6d
2013-12-26 08:12:26 -08:00
James E. Blair 830cf239cd Revert "Fix workspace setup"
This reverts commit 4d2f0e7c85
2013-12-25 16:15:38 +00:00
James E. Blair 4d2f0e7c85 Fix workspace setup
Stable branch overrides for client testing, devstack-gate alternate-branch
testing, and grenade old/new branch selection are all actually the same
thing.  Update setup_project to reflect that, fixing all known bugs in
the process.  Note that some jobs will need to be updated to pass in
OVERRIDE_ZUUL_BRANCH.

Change-Id: I6613715439bed9914b8444e335fac5eab4d14075
2013-12-24 14:54:55 -08:00
James E. Blair b3d93e5995 Move workspace setup to functions.sh
And add a test script that exercises the logic of the git repo
checkout functions.  Current test errors are annotated and commented
out.

Change-Id: I2e04787999a64cd8aaa238ce0374898032a9d8bd
2013-12-24 11:53:39 -08:00