CI: allow to build custom docker image on alternate repo
This commit is contained in:
parent
5b28e08f93
commit
0b86503537
@ -2,7 +2,7 @@
|
|||||||
variables:
|
variables:
|
||||||
opam_image: ${CI_REGISTRY_IMAGE}/opam
|
opam_image: ${CI_REGISTRY_IMAGE}/opam
|
||||||
build_deps_image: ${CI_REGISTRY_IMAGE}/build_deps
|
build_deps_image: ${CI_REGISTRY_IMAGE}/build_deps
|
||||||
public_docker_image: docker.io/tezos/tezos
|
public_docker_image: docker.io/${CI_PROJECT_PATH}
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- prepare
|
- prepare
|
||||||
@ -56,9 +56,7 @@ build_deps:
|
|||||||
.build_deps_template: &build_deps_definition
|
.build_deps_template: &build_deps_definition
|
||||||
image: ${build_deps_image}:${CI_COMMIT_SHA}
|
image: ${build_deps_image}:${CI_COMMIT_SHA}
|
||||||
before_script:
|
before_script:
|
||||||
- if [ "${CI_PROJECT_PATH}" = "tezos/tezos" ] ; then
|
- ./scripts/apply_patch.sh "${CI_COMMIT_REF_NAME}"
|
||||||
./scripts/apply_patch.sh "${CI_COMMIT_REF_NAME}" ;
|
|
||||||
fi
|
|
||||||
- opam list
|
- opam list
|
||||||
tags:
|
tags:
|
||||||
- gitlab-org
|
- gitlab-org
|
||||||
@ -69,7 +67,9 @@ build:
|
|||||||
<<: *build_deps_definition
|
<<: *build_deps_definition
|
||||||
stage: build
|
stage: build
|
||||||
except:
|
except:
|
||||||
- master@tezos/tezos
|
- master
|
||||||
|
- alphanet
|
||||||
|
- zeronet
|
||||||
script:
|
script:
|
||||||
- make all
|
- make all
|
||||||
- make build-test
|
- make build-test
|
||||||
@ -84,7 +84,9 @@ build:
|
|||||||
<<: *build_deps_definition
|
<<: *build_deps_definition
|
||||||
stage: test
|
stage: test
|
||||||
except:
|
except:
|
||||||
- master@tezos/tezos
|
- master
|
||||||
|
- alphanet
|
||||||
|
- zeronet
|
||||||
dependencies:
|
dependencies:
|
||||||
- build
|
- build
|
||||||
|
|
||||||
@ -200,7 +202,7 @@ test:proto:sandbox:
|
|||||||
stage: opam
|
stage: opam
|
||||||
dependencies: []
|
dependencies: []
|
||||||
only:
|
only:
|
||||||
- master@tezos/tezos
|
- master
|
||||||
- /^.*opam.*$/
|
- /^.*opam.*$/
|
||||||
script:
|
script:
|
||||||
- ./scripts/opam-pin.sh
|
- ./scripts/opam-pin.sh
|
||||||
@ -450,13 +452,11 @@ publish:docker:minimal:
|
|||||||
<<: *dind_definition
|
<<: *dind_definition
|
||||||
stage: publish
|
stage: publish
|
||||||
only:
|
only:
|
||||||
- master@tezos/tezos
|
- master
|
||||||
- alphanet@tezos/tezos
|
- alphanet
|
||||||
- zeronet@tezos/tezos
|
- zeronet
|
||||||
script:
|
script:
|
||||||
- if [ "${CI_PROJECT_PATH}" = "tezos/tezos" ] ; then
|
- ./scripts/apply_patch.sh "${CI_COMMIT_REF_NAME}" ;
|
||||||
./scripts/apply_patch.sh "${CI_COMMIT_REF_NAME}" ;
|
|
||||||
fi
|
|
||||||
- ./scripts/ci/create_docker_image.build.sh
|
- ./scripts/ci/create_docker_image.build.sh
|
||||||
"tezos_build" "${CI_COMMIT_REF_NAME}"
|
"tezos_build" "${CI_COMMIT_REF_NAME}"
|
||||||
"${build_deps_image}:${CI_COMMIT_SHA}"
|
"${build_deps_image}:${CI_COMMIT_SHA}"
|
||||||
@ -481,9 +481,7 @@ publish:github:
|
|||||||
- echo "${CI_PK_GITHUB}" > ~/.ssh/id_rsa
|
- echo "${CI_PK_GITHUB}" > ~/.ssh/id_rsa
|
||||||
- chmod 400 ~/.ssh/id_rsa
|
- chmod 400 ~/.ssh/id_rsa
|
||||||
- rm -fr .git/refs/original
|
- rm -fr .git/refs/original
|
||||||
- if [ "${CI_PROJECT_PATH}" = "tezos/tezos" ] ; then
|
- ./scripts/apply_patch.sh "${CI_COMMIT_REF_NAME}" ;
|
||||||
./scripts/apply_patch.sh "${CI_COMMIT_REF_NAME}" ;
|
|
||||||
fi
|
|
||||||
- sudo apk add --no-cache openssh
|
- sudo apk add --no-cache openssh
|
||||||
- git push git@github.com:tezos/tezos.git -f HEAD:${CI_COMMIT_REF_NAME}
|
- git push git@github.com:tezos/tezos.git -f HEAD:${CI_COMMIT_REF_NAME}
|
||||||
tags:
|
tags:
|
||||||
|
Loading…
Reference in New Issue
Block a user