diff --git a/.travis.yml b/.travis.yml index c895b6135b6..5892d2c7025 100644 --- a/.travis.yml +++ b/.travis.yml @@ -68,9 +68,9 @@ jobs: deploy: skip_cleanup: true provider: script - script: contrib/hack/ci/publish-svc-cat-release.sh --arch amd64 + script: contrib/hack/ci/publish-svc-cat.sh --arch amd64 on: - repo: kubernetes-sigs/service-catalog + repo: awalach-org/service-catalog all_branches: true condition: $DEPLOY_TYPE == release - stage: deploy @@ -79,9 +79,9 @@ jobs: deploy: skip_cleanup: true provider: script - script: contrib/hack/ci/publish-svc-cat-release.sh --arch arm + script: contrib/hack/ci/publish-svc-cat.sh --arch arm on: - repo: kubernetes-sigs/service-catalog + repo: awalach-org/service-catalog all_branches: true condition: $DEPLOY_TYPE == release - stage: deploy @@ -90,9 +90,9 @@ jobs: deploy: skip_cleanup: true provider: script - script: contrib/hack/ci/publish-svc-cat-release.sh --arch arm64 + script: contrib/hack/ci/publish-svc-cat.sh --arch arm64 on: - repo: kubernetes-sigs/service-catalog + repo: awalach-org/service-catalog all_branches: true condition: $DEPLOY_TYPE == release - stage: deploy @@ -101,9 +101,9 @@ jobs: deploy: skip_cleanup: true provider: script - script: contrib/hack/ci/publish-svc-cat-release.sh --arch ppc64le + script: contrib/hack/ci/publish-svc-cat.sh --arch ppc64le on: - repo: kubernetes-sigs/service-catalog + repo: awalach-org/service-catalog all_branches: true condition: $DEPLOY_TYPE == release - stage: deploy @@ -112,9 +112,9 @@ jobs: deploy: skip_cleanup: true provider: script - script: contrib/hack/ci/publish-svc-cat-release.sh --arch s390x + script: contrib/hack/ci/publish-svc-cat.sh --arch s390x on: - repo: kubernetes-sigs/service-catalog + repo: awalach-org/service-catalog all_branches: true condition: $DEPLOY_TYPE == release # Deploy service-catalog after merge to master @@ -124,9 +124,9 @@ jobs: deploy: skip_cleanup: true provider: script - script: contrib/hack/ci/publish-svc-cat-master.sh + script: contrib/hack/ci/publish-svc-cat.sh on: - repo: kubernetes-sigs/service-catalog + repo: awalach-org/service-catalog all_branches: true condition: $DEPLOY_TYPE == master # Deploy svcat on release @@ -138,7 +138,7 @@ jobs: provider: script script: contrib/hack/ci/publish-svcat-cli.sh on: - repo: kubernetes-sigs/service-catalog + repo: awalach-org/service-catalog all_branches: true - stage: push-chart script: diff --git a/contrib/hack/ci/publish-svc-cat-master.sh b/contrib/hack/ci/publish-svc-cat-master.sh deleted file mode 100755 index 676394e407a..00000000000 --- a/contrib/hack/ci/publish-svc-cat-master.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# Copyright 2017 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -o errexit -set -o nounset -set -o pipefail -echo "DEPLOY_TYPE ${DEPLOY_TYPE}" -readonly CURRENT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -readonly REPO_ROOT_DIR=${CURRENT_DIR}/../../../ - -source "${CURRENT_DIR}/lib/utilities.sh" || { echo 'Cannot load CI utilities.'; exit 1; } - -export REGISTRY=${REGISTRY:-quay.io/kubernetes-service-catalog/} - -docker login -u "${QUAY_USERNAME}" -p "${QUAY_PASSWORD}" quay.io - -pushd ${REPO_ROOT_DIR} -shout "Pushing Service Catalog amd64 images with default tags (git sha and 'canary')." -make push - -popd diff --git a/contrib/hack/ci/publish-svc-cat-release.sh b/contrib/hack/ci/publish-svc-cat.sh similarity index 78% rename from contrib/hack/ci/publish-svc-cat-release.sh rename to contrib/hack/ci/publish-svc-cat.sh index 81d4bd7b981..5ab01d9be3b 100755 --- a/contrib/hack/ci/publish-svc-cat-release.sh +++ b/contrib/hack/ci/publish-svc-cat.sh @@ -61,10 +61,16 @@ if [[ "$#" -ne 0 ]]; then set -- ${POSITIONAL[@]+"${POSITIONAL[@]}"} fi - pushd ${REPO_ROOT_DIR} echo ${RELEASE_ARCH} -shout "Pushing Service Catalog ${RELEASE_ARCH} images with tags '${TRAVIS_TAG}' and 'latest'." -TAG_VERSION="${TRAVIS_TAG}" VERSION="${TRAVIS_TAG}" MUTABLE_TAG="latest" make release-push${RELEASE_ARCH} +if [[ "${DEPLOY_TYPE}" == "release" ]]; then + shout "Pushing Service Catalog ${RELEASE_ARCH} images with tags '${TRAVIS_TAG}' and 'latest'." + TAG_VERSION="${TRAVIS_TAG}" VERSION="${TRAVIS_TAG}" MUTABLE_TAG="latest" make release-push${RELEASE_ARCH} +elif [[ "${DEPLOY_TYPE}" == "master" ]]; then + shout "Pushing Service Catalog ${RELEASE_ARCH} images with default tags (git sha and 'canary')." + make push +else + shout "Skip Service Catalog ${RELEASE_ARCH} deploy" +fi popd