continuous integration - Gitlabs artifact of one project used in further projects -
question
- what best way carry artifacts (jar, class, war) among projects when using docker containers in ci phase.
let me explain issue in details, please don't stop reading... =)
gitlabs project1
- unit tests
- etc...
- package
gitlabs project2
- unit test
- etc...
- build (failing)
- here need 1 artifact (jar) generated in project1
current scenario / comments
- i'm using dockers in each .gitlab-ci.yml i'll have independent containers
- all working fine in project1
- if use "shell" instead of dockers in .gitlab-ci.yml can keep jar file project1 in disk , use when project2 kicks build
- today trigger on call project2 when project1 finish working nicely
- my artifact not rpm i'll not add repo
possible solutions
- i can commit artifact of project1 , checkout when need build project2
- i need study if cache feature gitlabs designed purpose (gitlab 8.2.1, how use cache in .gitlab-ci.yml)
hello must take @ script named get-last-successful-build-artifact.sh
, developed morph027
.
https://gitlab.com/morph027/gitlab-ci-helpers
this script allow download artifact , unzip in project root. use gitlab api retrieve latest successful build , download corresponding artifact. can combine multiple artifacts , unzip wherever want updating script little.
i'm starting php library handle build artifacts it's in stage , tied laravel moment.
for moment there no easy way handle artifact usage between projects, must build own using tools.
i think using shell executor not right solution, it's dangerous because can't verify file on server used during build !
hope :)
Comments
Post a Comment