Skip to content

Commit

Permalink
Build image changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrajashree committed Aug 13, 2020
1 parent 863f57d commit c1ffe71
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM alpine
COPY bin/backup /usr/bin/
COPY bin/backup-restore-operator /usr/bin/
CMD ["backup-restore-operator"]
10 changes: 5 additions & 5 deletions scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ mkdir -p bin
if [ "$(uname)" = "Linux" ]; then
OTHER_LINKFLAGS="-extldflags -static -s"
fi
LINKFLAGS="-X github.com/rancher/backup.Version=$VERSION"
LINKFLAGS="-X github.com/rancher/backup.GitCommit=$COMMIT $LINKFLAGS"
CGO_ENABLED=0 go build -ldflags "$LINKFLAGS $OTHER_LINKFLAGS" -o bin/backup
LINKFLAGS="-X github.com/rancher/backup-restore-operator.Version=$VERSION"
LINKFLAGS="-X github.com/rancher/backup-restore-operator.GitCommit=$COMMIT $LINKFLAGS"
CGO_ENABLED=0 go build -ldflags "$LINKFLAGS $OTHER_LINKFLAGS" -o bin/backup-restore-operator
if [ "$CROSS" = "true" ] && [ "$ARCH" = "amd64" ]; then
GOOS=darwin go build -ldflags "$LINKFLAGS" -o bin/backup-darwin
GOOS=windows go build -ldflags "$LINKFLAGS" -o bin/backup-windows
GOOS=darwin go build -ldflags "$LINKFLAGS" -o bin/backup-restore-operator-darwin
GOOS=windows go build -ldflags "$LINKFLAGS" -o bin/backup-restore-operator-windows
fi
4 changes: 2 additions & 2 deletions scripts/package
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ source $(dirname $0)/version
cd $(dirname $0)/..

mkdir -p dist/artifacts
cp bin/backup dist/artifacts/backup${SUFFIX}
cp bin/backup-restore-operator dist/artifacts/backup-restore-operator${SUFFIX}

IMAGE=${REPO}/backup:${TAG}
IMAGE=${REPO}/backup-restore-operator:${TAG}
DOCKERFILE=package/Dockerfile
if [ -e ${DOCKERFILE}.${ARCH} ]; then
DOCKERFILE=${DOCKERFILE}.${ARCH}
Expand Down
2 changes: 1 addition & 1 deletion scripts/version
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fi
SUFFIX="-${ARCH}"

TAG=${TAG:-${VERSION}${SUFFIX}}
REPO=${REPO:-mrajashree}
REPO=${REPO:-rancher}

if echo $TAG | grep -q dirty; then
TAG=dev
Expand Down

0 comments on commit c1ffe71

Please sign in to comment.