Skip to content

Commit

Permalink
add env vars for dev building images (percona#1029)
Browse files Browse the repository at this point in the history
  • Loading branch information
defbin authored Oct 29, 2021
1 parent 4a49ec1 commit 4ab6102
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/.github/
/adopters/
/deploy/
/docs/
/e2e-tests/
16 changes: 10 additions & 6 deletions e2e-tests/build
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ test_dir="$(dirname $0)"
src_dir="$(realpath ${test_dir}/..)"
IMAGE=$(echo "$IMAGE" | sed -e 's#percona/#perconalab/#')

if [[ ${DOCKER_NOCACHE:-1} == 1 ]]; then
no_cache="--no-cache"
fi
if [[ ${DOCKER_SQUASH:-1} == 1 ]]; then
squash="--squash"
fi

build_operator() {
if [ "${RELEASE:-1}" = 0 ]; then
GO_LDFLAGS="-race"
Expand All @@ -21,8 +28,8 @@ build_operator() {
--build-arg GIT_BRANCH=$GIT_BRANCH \
--build-arg BUILD_TIME=$BUILD_TIME \
--build-arg GO_LDFLAGS="$GO_LDFLAGS" \
--squash \
--no-cache \
$squash \
$no_cache \
--progress plain \
-t "${IMAGE}" -f build/Dockerfile .
popd
Expand All @@ -33,8 +40,5 @@ if [[ $BUILD == "0" ]]; then
exit 0
fi

until docker ps; do
sleep 1
done

until docker ps; do sleep 1; done
build_operator

0 comments on commit 4ab6102

Please sign in to comment.