mirror of https://github.com/linkerd/linkerd2.git
Build version tags in CI (#1365)
* Build version tags in CI * Simplify clean_head method Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
This commit is contained in:
parent
2971831508
commit
554ffe6a46
|
@ -7,13 +7,14 @@ sudo: false
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
- /^v\d+\.\d+\.[\w-]+$/ # build version tags
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- name: test
|
- name: test
|
||||||
- name: docker-deploy
|
- name: docker-deploy
|
||||||
if: branch = master AND type != pull_request
|
if: type != pull_request
|
||||||
- name: integration-test
|
- name: integration-test
|
||||||
if: branch = master AND type != pull_request
|
if: type != pull_request
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
|
@ -144,7 +145,7 @@ jobs:
|
||||||
(. bin/_gcp.sh ; get_k8s_ctx "$GCP_PROJECT" "$GCP_ZONE" "$GKE_CLUSTER")
|
(. bin/_gcp.sh ; get_k8s_ctx "$GCP_PROJECT" "$GCP_ZONE" "$GKE_CLUSTER")
|
||||||
- |
|
- |
|
||||||
# Install linkerd cli.
|
# Install linkerd cli.
|
||||||
version="git-$(git rev-parse --short=8 HEAD)"
|
version="$(CI_FORCE_CLEAN=1 bin/root-tag)"
|
||||||
image="gcr.io/linkerd-io/cli-bin:$version"
|
image="gcr.io/linkerd-io/cli-bin:$version"
|
||||||
id=$(docker create $image)
|
id=$(docker create $image)
|
||||||
docker cp "$id:/out/linkerd-linux" "./linkerd"
|
docker cp "$id:/out/linkerd-linux" "./linkerd"
|
||||||
|
|
|
@ -11,7 +11,7 @@ go_deps_sha() {
|
||||||
}
|
}
|
||||||
|
|
||||||
clean_head() {
|
clean_head() {
|
||||||
git diff-index --quiet HEAD --
|
[ -n "${CI_FORCE_CLEAN:-}" ] || git diff-index --quiet HEAD --
|
||||||
}
|
}
|
||||||
|
|
||||||
named_tag() {
|
named_tag() {
|
||||||
|
|
Loading…
Reference in New Issue