Docker: use remote opam image by default
This commit is contained in:
parent
322fc1e353
commit
040d99b673
@ -9,7 +9,6 @@ cd "$src_dir"
|
|||||||
|
|
||||||
. "$script_dir"/version.sh
|
. "$script_dir"/version.sh
|
||||||
|
|
||||||
export build_dir=${build_dir:-_docker_build}
|
|
||||||
tmp_dir=$(mktemp -dt tezos.opam.tezos.XXXXXXXX)
|
tmp_dir=$(mktemp -dt tezos.opam.tezos.XXXXXXXX)
|
||||||
|
|
||||||
cleanup () {
|
cleanup () {
|
||||||
@ -25,7 +24,9 @@ base_image_name="${3-${image_name}_deps:${image_version}}"
|
|||||||
|
|
||||||
cat <<EOF > "$src_dir"/Dockerfile
|
cat <<EOF > "$src_dir"/Dockerfile
|
||||||
FROM $base_image_name
|
FROM $base_image_name
|
||||||
COPY . tezos
|
COPY Makefile tezos/
|
||||||
|
COPY src tezos/src/
|
||||||
|
COPY vendors tezos/vendors/
|
||||||
RUN sudo chown -R opam tezos && \
|
RUN sudo chown -R opam tezos && \
|
||||||
opam exec -- make -C tezos all build-test
|
opam exec -- make -C tezos all build-test
|
||||||
EOF
|
EOF
|
||||||
|
@ -9,7 +9,6 @@ cd "$src_dir"
|
|||||||
|
|
||||||
. "$script_dir"/version.sh
|
. "$script_dir"/version.sh
|
||||||
|
|
||||||
export build_dir=${build_dir:-_docker_build}
|
|
||||||
tmp_dir=$(mktemp -dt tezos.build_deps.tezos.XXXXXXXX)
|
tmp_dir=$(mktemp -dt tezos.build_deps.tezos.XXXXXXXX)
|
||||||
|
|
||||||
cleanup () {
|
cleanup () {
|
||||||
|
@ -8,22 +8,40 @@ cd "$src_dir"
|
|||||||
|
|
||||||
. "$script_dir"/version.sh
|
. "$script_dir"/version.sh
|
||||||
|
|
||||||
export build_dir=$(mktemp -dt tezos.docker.XXXXXXXX)
|
if [ "$1" = "--build-opam" ] ; then
|
||||||
|
build_opam=yes
|
||||||
|
shift 1
|
||||||
|
fi
|
||||||
image_name="${1:-tezos}"
|
image_name="${1:-tezos}"
|
||||||
image_version="${2:-latest}"
|
image_version="${2:-latest}"
|
||||||
|
build_dir="${3:-$src_dir/_docker_build}"
|
||||||
opam_image_name="${image_name}_opam"
|
opam_image_name="${image_name}_opam"
|
||||||
build_image_name="${image_name}_build"
|
build_image_name="${image_name}_build"
|
||||||
build_deps_image_name="${image_name}_build_deps"
|
build_deps_image_name="${image_name}_build_deps"
|
||||||
|
|
||||||
"$script_dir"/ci/create_docker_image.opam.sh \
|
if [ -n "$build_opam" ] ; then
|
||||||
"$opam_image_name" "$image_version"
|
|
||||||
|
export build_dir
|
||||||
|
|
||||||
|
"$script_dir"/ci/create_docker_image.opam.sh \
|
||||||
|
"$opam_image_name" "$image_version"
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
docker pull registry.gitlab.com/tezos/tezos/opam:latest
|
||||||
|
docker tag registry.gitlab.com/tezos/tezos/opam:latest \
|
||||||
|
"$opam_image_name:$image_version"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
"$script_dir"/ci/create_docker_image.build_deps.sh \
|
"$script_dir"/ci/create_docker_image.build_deps.sh \
|
||||||
"$build_deps_image_name" "$image_version" "$opam_image_name:$image_version"
|
"$build_deps_image_name" "$image_version" \
|
||||||
|
"$opam_image_name:$image_version"
|
||||||
|
|
||||||
|
|
||||||
"$script_dir"/ci/create_docker_image.build.sh \
|
"$script_dir"/ci/create_docker_image.build.sh \
|
||||||
"$build_image_name" "$image_version" "$build_deps_image_name"
|
"$build_image_name" "$image_version" \
|
||||||
|
"$build_deps_image_name"
|
||||||
|
|
||||||
"$script_dir"/ci/create_docker_image.minimal.sh \
|
"$script_dir"/ci/create_docker_image.minimal.sh \
|
||||||
"$image_name" "$image_version" "$build_image_name"
|
"$image_name" "$image_version" "$build_image_name"
|
||||||
|
Loading…
Reference in New Issue
Block a user