Skip to content

Create tezos-specific docker image, add a helpful entrypoint script

Arvid Jakobsson requested to merge arvid@docker-tezos into master
  • Update the included tezos/tezos-specific settings file to align with the current set of pipelines used in that repo.
  • Build and push a new image with the -tezos suffix. This image has the tezos/tezos-specific environments preloaded, simplifying usage of commands and utilities that use environments.
  • Add a wrapper entrypoint script to the Docker images, simplifying usage of utility scripts.

Testing

You can run the new tezos-specific docker image built on this branch like this:

alias gci-tezos='docker run --pull always --tty --volume $(pwd):$(pwd) --workdir $(pwd) registry.gitlab.com/nomadic-labs/gitlab-ci-inspector/tezos:arvid_docker_tezos'

With this alias set, calling gci-tezos will now have the pipelines types you know and love preloaded:

gci-tezos show environments

You should see a list of environments that correspond one-to-one with the pipeline types defined for the tezos/tezos repo.

For instance, try:

gci-tezos simulate pipeline in master_branch

Using the utility scripts in utils/*.sh through Docker used to be quite cumbersome. The entrypoint script added in this MR makes this easier. When the gci-tezos alias is called if the arguments correspond to a utility script, then the utility is called. Otherwise, the gci binary directly, lie in the above example. To see the list of available utilities, try gci-tezos --help.

For instance, to check the tag used by all jobs on release_tag pipelines, run:

gci-tezos field-per-job -e release_tag tags

For more info on this utility, try gci-tezos field-per-job --help.

Another example. The utility script diff-full-config use useful to review MRs modifying the CI configuration. For instance, to check the difference between the fully merged configuration in all environments the last 10 commits, run:

gci-tezos diff-full-config HEAD~10 HEAD all-envs

If you're reviewing a topic branch, you might want to compare the master branch with the current working tree, which you can do like this:

gci-tezos diff-full-config master . all-envs

For more info on this utility, try gci-tezos diff-full-config --help.

Edited by Arvid Jakobsson

Merge request reports