ligo/scripts/create_docker_image.sh
Grégoire Henry 55db2dbf18 CI: improve pipeline duration
- do not use a intermediate docker image between 'build' and 'test'
- in 'build_deps', avoid downloading the cached image
- in 'prepare', use `opam bundle` to:
  - embedded the sources of dependency
  - reduce the embedded opam repository to the needed package

Other changes:

- reintroduced 'sudo' in the base image, it is needed by `opam depext`
  and the job 'publish:doc'
- moved the docker script used by the CI in `scripts/ci/`
2018-01-28 20:03:31 +01:00

30 lines
832 B
Bash
Executable File

#! /bin/sh
set -e
script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
src_dir="$(dirname "$script_dir")"
cd "$src_dir"
. "$script_dir"/version.sh
export build_dir=$(mktemp -dt tezos.docker.XXXXXXXX)
image_name="${1:-tezos}"
image_version="${2:-latest}"
opam_image_name="${image_name}_opam"
build_image_name="${image_name}_build"
build_deps_image_name="${image_name}_build_deps"
"$script_dir"/ci/create_docker_image.opam.sh \
"$opam_image_name" "$image_version"
"$script_dir"/ci/create_docker_image.build_deps.sh \
"$build_deps_image_name" "$image_version" "$opam_image_name:$image_version"
"$script_dir"/ci/create_docker_image.build.sh \
"$build_image_name" "$image_version" "$build_deps_image_name"
"$script_dir"/ci/create_docker_image.minimal.sh \
"$image_name" "$image_version" "$build_image_name"