提交 976c68ad 编写于 作者: R runzexia

Merge branch 'master' into devops2

......@@ -24,6 +24,6 @@ script:
deploy:
skip_cleanup: true
provider: script
script: bash hack/docker_build.sh && bash hack/docker_push.sh
script: bash hack/docker_build.sh
on:
branch: master
#!/usr/bin/env bash
docker build -f build/ks-apigateway/Dockerfile -t kubespheredev/ks-apigateway:latest .
docker build -f build/ks-apiserver/Dockerfile -t kubespheredev/ks-apiserver:latest .
docker build -f build/ks-iam/Dockerfile -t kubespheredev/ks-account:latest .
set -ex
set -o pipefail
docker build -f build/controller-manager/Dockerfile -t kubespheredev/ks-controller-manager:latest .
REPO=kubespheredev
TAG=latest
docker build -f ./pkg/db/Dockerfile -t kubespheredev/ks-devops:flyway ./pkg/db/
# check if build was triggered by a travis cronjob
if [[ ! -v TRAVIS_EVENT_TYPE ]]; then
echo "TRAVIS_EVENT_TYPE is not set, treat as regular build"
elif [[ -z "$TRAVIS_EVENT_TYPE" ]]; then
echo "TRAVIS_EVENT_TYPE is empty, also normaly build"
elif [ $TRAVIS_EVENT_TYPE == "cron" ]; then
TAG=dev-$(date +%Y%m%d)
fi
docker build -f build/ks-apigateway/Dockerfile -t $REPO/ks-apigateway:$TAG .
docker build -f build/ks-apiserver/Dockerfile -t $REPO/ks-apiserver:$TAG .
docker build -f build/ks-iam/Dockerfile -t $REPO/ks-account:$TAG .
docker build -f build/ks-controller-manager/Dockerfile -t $REPO/ks-controller-manager:$TAG .
docker build -f ./pkg/db/Dockerfile -t $REPO/ks-devops:flyway-$TAG ./pkg/db/
# Push image to dockerhub, need to support multiple push
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push $REPO/ks-apigateway:$TAG
docker push $REPO/ks-apiserver:$TAG
docker push $REPO/ks-account:$TAG
docker push $REPO/ks-controller-manager:$TAG
docker push $REPO/ks-devops:flyway-$TAG
#!/usr/bin/env bash
# Push image to dockerhub, need to support multiple push
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push kubespheredev/ks-apigateway:latest
docker push kubespheredev/ks-apiserver:latest
docker push kubespheredev/ks-account:latest
docker push kubespheredev/ks-controller-manager:latest
docker push kubespheredev/ks-devops:flyway
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册