mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 10:02:56 +01:00
scripts: Fix pgbouncer install script not reporting errors
The install-pgbouncer script is not currently reporting any build errors to the caller, except if the final `rm -rf` fails. Fix the issue by executing `set -xeuo pipefail` to properly report errors of any unchecked commands and chaining commands with `&&`'s. While the latter shouldn't be necessary anymore because of changed options, it's easy enough to do for this script. With this change, we now properly notice that building pgbouncer fails currently because of a missing libevent dependency. This failure is fixed in a subsequent commit.
This commit is contained in:
parent
3b889f72ed
commit
9e8f7b973a
1 changed files with 12 additions and 13 deletions
|
|
@ -1,19 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -xeuo pipefail
|
||||
|
||||
PGBOUNCER_VERSION=${1}
|
||||
PGBOUNCER_DOWNLOAD_SHA256=${2}
|
||||
|
||||
PGBOUNCER_DOWNLOAD_URL="https://pgbouncer.github.io/downloads/files/$PGBOUNCER_VERSION/pgbouncer-$PGBOUNCER_VERSION.tar.gz"
|
||||
|
||||
curl -o pgbouncer.tar.gz -fsSL $PGBOUNCER_DOWNLOAD_URL
|
||||
echo "${PGBOUNCER_DOWNLOAD_SHA256} pgbouncer.tar.gz" | sha256sum -c -
|
||||
|
||||
tar xfz pgbouncer.tar.gz
|
||||
rm -f pgbouncer.tar.gz
|
||||
cd pgbouncer-${PGBOUNCER_VERSION}
|
||||
./configure --prefix=/usr/local
|
||||
make
|
||||
cp pgbouncer /usr/local/bin
|
||||
|
||||
cd ..
|
||||
rm -rf pgbouncer-${PGBOUNCER_VERSION}
|
||||
curl -o pgbouncer.tar.gz -fsSL $PGBOUNCER_DOWNLOAD_URL \
|
||||
&& echo "${PGBOUNCER_DOWNLOAD_SHA256} pgbouncer.tar.gz" | sha256sum -c - \
|
||||
&& tar xfz pgbouncer.tar.gz \
|
||||
&& rm -f pgbouncer.tar.gz \
|
||||
&& cd pgbouncer-${PGBOUNCER_VERSION} \
|
||||
&& ./configure --prefix=/usr/local \
|
||||
&& make \
|
||||
&& cp pgbouncer /usr/local/bin \
|
||||
&& cd .. \
|
||||
&& rm -rf pgbouncer-${PGBOUNCER_VERSION}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue