engine: Implement change dependency handling 83/5283/6
authorFatih Degirmenci <fatih.degirmenci@est.tech>
Mon, 6 Jul 2020 07:14:17 +0000 (07:14 +0000)
committerFatih Degirmenci <fatih.degirmenci@est.tech>
Mon, 6 Jul 2020 09:14:44 +0000 (09:14 +0000)
commit6cd44a7fea816effd76c19fd95ea7cdcf21c1536
tree798a5c5fa2c1d6cf79b45c46bb44326ca58f1cbd
parent929e8b0365627e764ef799d1ab2293f1f11e098a
engine: Implement change dependency handling

The new functionality enables specifying dependency between open
changes sent for different projects on Gerrit. When this functionality
is used, the generate-change-metadata.sh determines the change properties
such as change project, revision, and refspec and sets the variables
accordingly for the framework to use.

In order to use this feature, the dependent change needs to be specified
in commit message as below.

Depends-On: <Change-Id of dependent change>

For example

Depends-On: Iea9c21b9898f3733aa5486932ca6d5abffd8b803

Additional notes about the feature are
- the format to specify dependent change must follow the above example
- the dependent change must be specified on its own line
- the dependent change must be specified at the beginning of the line
- only single dependency can be specified at the moment but this can
be improved further if it is deemed necessary
- the specified change must be open (not merged or abandoned)
- only the current/latest patchset can be used (as the earlier patchsets are
already outdated)
- dependent change must not be on same repository as the change under test

See the generate-change-metadata.sh determine_dependency function for
how things work.

Change-Id: I2e5cfa23fb4a46ff49a4bdf137054b11202d39eb
jjb/engine/scripts/deploy.sh
jjb/engine/scripts/generate-change-metadata.sh
jjb/engine/scripts/package.sh
jjb/engine/verify-jobs/engine-verify-tox.yaml
jjb/engine/verify-jobs/ironic-verify-tox.yaml
jjb/engine/verify-jobs/kubernetes-verify-tox.yaml
jjb/engine/verify-jobs/onap-verify-tox.yaml
jjb/engine/verify-jobs/openstack-verify-tox.yaml