Skip to content

Commit

Permalink
PMM-12899 add a flag to skip building server docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Apr 3, 2024
1 parent f28202a commit a0f7b50
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions build/local/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ UPDATE_ONLY=0
NO_CLIENT=0
NO_CLIENT_DOCKER=0
NO_SERVER_RPM=0
NO_SERVER_DOCKER=0
START_TIME=$(date +%s)
LOG_FILE="/tmp/build.log"

Expand All @@ -24,8 +25,19 @@ while test "$#" -gt 0; do
NO_CLIENT_DOCKER=1
;;
--no-server-rpm)
if [ "$NO_SERVER_DOCKER" -eq 1 ]; then
echo "Cannot disable both server RPM and server Docker"
exit 1
fi
NO_SERVER_RPM=1
;;
--no-server-docker)
if [ "$NO_SERVER_RPM" -eq 1 ]; then
echo "Cannot disable both server RPM and server Docker"
exit 1
fi
NO_SERVER_DOCKER=1
;;
--log-file)
shift
if [ -z "$1" ]; then
Expand Down Expand Up @@ -311,9 +323,11 @@ main() {
build_with_logs build-server-rpm grafana
fi

export DOCKER_TAG=local/pmm-server:${GIT_COMMIT}
export DOCKERFILE=Dockerfile.el9
build_with_logs build-server-docker
if [ "$NO_SERVER_DOCKER" -eq 0 ]; then
export DOCKER_TAG=local/pmm-server:${GIT_COMMIT}
export DOCKERFILE=Dockerfile.el9
build_with_logs build-server-docker
fi

echo
echo "Done building PMM artifacts."
Expand Down

0 comments on commit a0f7b50

Please sign in to comment.