ghdl / docker

Scripts to build and use docker images including GHDL
40 stars 10 forks source link

Packing artifacts #2

Open eine opened 6 years ago

eine commented 6 years ago

From ghdl/ghdl#477

Packing, integration with Appveyor and RTD

There is no built-in feature in travis to merge all the artifacts and deploy to github just once, instead of having each job edits the release. An external storage service is required, such as S3, to have all of them merged in a dir and the deploy all at once. See https://docs.travis-ci.com/user/build-stages/#Data-persistence-between-stages-and-jobs Luckily, #489 includes using DockerHub, and we can reuse it in replacement of S3. This avoids the requirement to handle credentials for a fourth service. The scheme is as follows:

Travis stage 3, named Pack artifacts

This stage mimicks the nested loops of stage 0 (see #489). However, instead of building anything, it pulls `ghdl/pkg` images which were created in the modified stage 1 and merges all the tarballs in a single directory. Then, a single deploy can be triggered in this stage.

This stage is especially useful for the following reasons:

Related to nightly builds mentioned in USE_CASES.md, `ghdl/pkg` images will always have tarballs corresponding to the latest succesful build. It is kind of stupid to require docker in order to download a tarball, even if a 3-4 line long shell script can be used to make it straightforward. Once again, play-with-docker can be used to execute the script, but this requires a Docker ID. Yet, adquiring the tgz is just a hopefully useful side effect, not the main feature.