Gitlabs artifact of one project used in further projects

前端 未结 5 1294
忘了有多久
忘了有多久 2020-12-30 08:29

Question

  • What is the best way to carry artifacts (jar, class, war) among projects when using docker containers in CI phase.

Let me explain my

5条回答
  •  無奈伤痛
    2020-12-30 09:12

    Hello you must take a look at a script named get-last-successful-build-artifact.sh and developed by morph027.

    https://gitlab.com/morph027/gitlab-ci-helpers

    This script allow to download an artifact and unzip it in the project root. It use Gitlab API to retrieve latest successful build and download corresponding artifact. You can combine multiple artifacts and unzip wherever you want just by updating the script a little.

    I'm also currently starting a PHP library to handle build artifacts but it's in a very early stage and tied with laravel for the moment.

    For the moment there is no easy way to handle artifact usage between projects, you must build your own using that tools.

    I think using shell executor is not the right solution, it's very dangerous because you can't verify the file on the server used during the build !

    Hope this help :)

提交回复
热议问题