Skip to content
Snippets Groups Projects
Commit 2c53c01c authored by Dylan Aïssi's avatar Dylan Aïssi Committed by Andrej Shadura
Browse files

Use SOURCE_RESULTS_URL instead of BUILD_RESULTS_URL to download the debian source package


While BUILD_RESULTS_URL refers to the artifact from the obs-capture job,
SOURCE_RESULTS_URL refers to the artifact from the build-source job.
To avoid capturing duplicated files on gitlab side, the debian source
package will no longer be captured by obs-capture since it's already
captured by build-source.

Moreover, for native packages, SOURCE_RESULTS_URL refers to the main
tarball instead of the *.debian.tar.* tarball which doesn't exist for
native package.

Signed-off-by: default avatarDylan Aïssi <dylan.aissi@collabora.com>
parent 7f773b66
No related branches found
No related tags found
1 merge request!591Fix token usage for private git repositories and retrieve source package from the build-source job instead of obs-capture
Pipeline #667479 passed
......@@ -49,12 +49,13 @@ job_name: Run {% raw %}{{job.PACKAGE}}{% endraw %}-in-{{image_name}}
steps:
- |
curl -H "JOB-TOKEN: {% raw %}{{job.CI_JOB_TOKEN}}{% endraw %}" \
-O {% raw %}{{job.BUILD_RESULTS_URL}}{% endraw %}/artifacts-list.txt
- DEBTAR_PATH=$(grep -m 1 "{% raw %}{{job.PACKAGE}}{% endraw %}.*\.debian\.tar\.xz$" artifacts-list.txt)
-O {% raw %}{{job.SOURCE_RESULTS_URL}}{% endraw %}
- |
curl -H "JOB-TOKEN: {% raw %}{{job.CI_JOB_TOKEN}}{% endraw %}" \
--output {% raw %}{{job.PACKAGE}}{% endraw %}.debian.tar.xz {% raw %}{{job.BUILD_RESULTS_URL}}{% endraw %}/${DEBTAR_PATH}
- tar -xf {% raw %}{{job.PACKAGE}}{% endraw %}.debian.tar.xz
find . -name "{% raw %}{{job.PACKAGE}}{% endraw %}_*.debian.tar.*" -type f \
-exec tar -xvf {} \;
- |
find . -name "{% raw %}{{job.PACKAGE}}{% endraw %}_*.tar.*" -not -name "*.debian.*" -type f \
-exec tar -xvf {} --strip-components=1 \;
- mkdir -p debian/tests/
- cd debian/tests/
- {{ PKG_TEST_CMD }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment