mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-11 15:30:34 +00:00
Compare commits
24 Commits
plugin-int
...
v1.2.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
703f96dcff | ||
|
|
215d4cd1b6 | ||
|
|
4aeead626b | ||
|
|
878247fb36 | ||
|
|
ee761952bb | ||
|
|
026afd4d6d | ||
|
|
03e4e78dce | ||
|
|
24ab715247 | ||
|
|
415a6322cb | ||
|
|
04a6208b0c | ||
|
|
9bb547562a | ||
|
|
576bc9e0c3 | ||
|
|
49fce11121 | ||
|
|
78c2775a04 | ||
|
|
11ac3dd3f9 | ||
|
|
179e42f200 | ||
|
|
7e5df27a07 | ||
|
|
07edee471b | ||
|
|
63ae23458c | ||
|
|
54a5dee1e3 | ||
|
|
1d16a36bfb | ||
|
|
32c99d9e3b | ||
|
|
6e3209e6e3 | ||
|
|
eccaa81af5 |
19
.travis.yml
19
.travis.yml
@@ -1,3 +1,4 @@
|
||||
dist: xenial
|
||||
language: go
|
||||
|
||||
go:
|
||||
@@ -8,4 +9,20 @@ sudo: required
|
||||
services:
|
||||
- docker
|
||||
|
||||
script: hack/ci-check.sh
|
||||
script:
|
||||
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
|
||||
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$TRAVIS_PULL_REQUEST, BRANCH=$BRANCH"
|
||||
- hack/ci-check.sh
|
||||
|
||||
# gcloud sdk is needed to upload docker images
|
||||
before_deploy:
|
||||
- if [ ! -d ${HOME}/google-cloud-sdk ]; then curl https://sdk.cloud.google.com | bash
|
||||
/dev/stdin --disable-prompts; fi
|
||||
|
||||
deploy:
|
||||
- provider: script
|
||||
skip_cleanup: true
|
||||
script: hack/gcr-push.sh
|
||||
on:
|
||||
repo: nrb/velero
|
||||
all_branches: true
|
||||
|
||||
16
Makefile
16
Makefile
@@ -21,7 +21,7 @@ BIN ?= velero
|
||||
PKG := github.com/heptio/velero
|
||||
|
||||
# Where to push the docker image.
|
||||
REGISTRY ?= gcr.io/heptio-images
|
||||
REGISTRY ?= gcr.io/nolanb-vmware
|
||||
|
||||
# Which architecture to build - see $(ALL_ARCH) for options.
|
||||
# if the 'local' rule is being run, detect the ARCH from 'go env'
|
||||
@@ -140,10 +140,10 @@ build-fsfreeze:
|
||||
|
||||
push-fsfreeze: BIN = fsfreeze-pause
|
||||
push-fsfreeze:
|
||||
@docker push $(IMAGE):$(VERSION)
|
||||
@gcloud docker -- push $(IMAGE):$(VERSION)
|
||||
ifeq ($(TAG_LATEST), true)
|
||||
docker tag $(IMAGE):$(VERSION) $(IMAGE):latest
|
||||
docker push $(IMAGE):latest
|
||||
gcloud docker -- tag $(IMAGE):$(VERSION) $(IMAGE):latest
|
||||
gcloud docker -- push $(IMAGE):latest
|
||||
endif
|
||||
@docker images -q $(REGISTRY)/fsfreeze-pause:$(VERSION) > .container-$(DOTFILE_IMAGE)
|
||||
|
||||
@@ -152,7 +152,7 @@ all-containers:
|
||||
$(MAKE) container BIN=velero-restic-restore-helper
|
||||
$(MAKE) build-fsfreeze
|
||||
|
||||
container: verify test .container-$(DOTFILE_IMAGE) container-name
|
||||
container: .container-$(DOTFILE_IMAGE) container-name
|
||||
.container-$(DOTFILE_IMAGE): _output/bin/$(GOOS)/$(GOARCH)/$(BIN) $(DOCKERFILE)
|
||||
@cp $(DOCKERFILE) _output/.dockerfile-$(BIN)-$(GOOS)-$(GOARCH)
|
||||
@docker build --pull -t $(IMAGE):$(VERSION) -f _output/.dockerfile-$(BIN)-$(GOOS)-$(GOARCH) _output
|
||||
@@ -169,10 +169,10 @@ all-push:
|
||||
|
||||
push: .push-$(DOTFILE_IMAGE) push-name
|
||||
.push-$(DOTFILE_IMAGE): .container-$(DOTFILE_IMAGE)
|
||||
@docker push $(IMAGE):$(VERSION)
|
||||
@gcloud docker -- push $(IMAGE):$(VERSION)
|
||||
ifeq ($(TAG_LATEST), true)
|
||||
docker tag $(IMAGE):$(VERSION) $(IMAGE):latest
|
||||
docker push $(IMAGE):latest
|
||||
gcloud docker -- tag $(IMAGE):$(VERSION) $(IMAGE):latest
|
||||
gcloud docker -- push $(IMAGE):latest
|
||||
endif
|
||||
@docker images -q $(IMAGE):$(VERSION) > $@
|
||||
|
||||
|
||||
65
hack/gcr-push.sh
Executable file
65
hack/gcr-push.sh
Executable file
@@ -0,0 +1,65 @@
|
||||
#!/bin/bash
|
||||
|
||||
set +x
|
||||
|
||||
if [[ -z "$TRAVIS" ]]; then
|
||||
echo "This script is intended to be run only on Travis." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Return value is written into HIGHEST
|
||||
HIGHEST=""
|
||||
function highest_release() {
|
||||
# Loop through the tags since pre-release versions come before the actual versions.
|
||||
# Iterate til we find the first non-pre-release
|
||||
|
||||
# This is not necessarily the most recently made tag; instead, we want it to be the highest semantic version.
|
||||
# The most recent tag could potentially be a lower semantic version, made as a point release for a previous series.
|
||||
# As an example, if v1.3.0 exists and we create v1.2.2, v1.3.0 should still be `latest`.
|
||||
# `git describe --tags $(git rev-list --tags --max-count=1)` would return the most recently made tag.
|
||||
|
||||
for t in $(git tag -l --sort=-v:refname);
|
||||
do
|
||||
# If the tag has alpha, beta or rc in it, it's not "latest"
|
||||
if [[ "$t" == *"beta"* || "$t" == *"alpha"* || "$t" == *"rc"* ]]; then
|
||||
continue
|
||||
fi
|
||||
HIGHEST="$t"
|
||||
break
|
||||
done
|
||||
}
|
||||
|
||||
if [ "$BRANCH" == "master" ]; then
|
||||
VERSION="$BRANCH"
|
||||
elif [ ! -z "$TRAVIS_TAG" ]; then
|
||||
VERSION="$TRAVIS_TAG"
|
||||
else
|
||||
# If we're not on master and we're not building a tag, exit early.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Calculate the latest release
|
||||
highest_release
|
||||
|
||||
# Assume we're not tagging `latest` by default.
|
||||
TAG_LATEST=false
|
||||
if [[ "$TRAVIS_TAG" == "$HIGHEST" ]]; then
|
||||
TAG_LATEST=true
|
||||
fi
|
||||
openssl aes-256-cbc -K $encrypted_f58ab4413c21_key -iv $encrypted_f58ab4413c21_iv -in nolanb-vmware-55ce4993acec.json.enc -out nolanb-vmware-55ce4993acec.json -d
|
||||
gcloud auth activate-service-account --key-file nolanb-vmware-55ce4993acec.json
|
||||
#openssl aes-256-cbc -K $encrypted_f58ab4413c21_key -iv $encrypted_f58ab4413c21_iv -in heptio-images-fac92d2303ac.json.enc -out heptio-images-fac92d2303ac.json -d
|
||||
#gcloud auth activate-service-account --key-file heptio-images-fac92d2303ac.json
|
||||
unset GIT_HTTP_USER_AGENT
|
||||
|
||||
echo "DIAGNOSTICS"
|
||||
ls -al .
|
||||
ls -al /home/travis/.docker
|
||||
cat /home/travis/.docker/config.json
|
||||
docker --version
|
||||
gcloud --version
|
||||
echo "END DIAGNOSTICS"
|
||||
|
||||
echo "Building and pushing container images."
|
||||
|
||||
VERSION="$VERSION" TAG_LATEST="$TAG_LATEST" make all-containers all-push
|
||||
BIN
heptio-images-fac92d2303ac.json.enc
Normal file
BIN
heptio-images-fac92d2303ac.json.enc
Normal file
Binary file not shown.
BIN
nolanb-vmware-55ce4993acec.json.enc
Normal file
BIN
nolanb-vmware-55ce4993acec.json.enc
Normal file
Binary file not shown.
Reference in New Issue
Block a user