-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
59 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
echo ">>> Making barman" | ||
|
||
for VALS in "BARMAN_VERSION=2.3;BARMAN_PACKAGE_VERSION=2.3-2.pgdg80+1;PG_CLIENT_MAJOR_VERSION=9.6;PG_CLIENT_VERSION=9.6;PG_CLIENT_PACKAGE_VERSION=9.6" \ | ||
"BARMAN_VERSION=2.3;BARMAN_PACKAGE_VERSION=2.3-2.pgdg80+1;PG_CLIENT_MAJOR_VERSION=10.2;PG_CLIENT_VERSION=10;PG_CLIENT_PACKAGE_VERSION=10.2"; do | ||
for VALS in "BARMAN_VERSION=2.3 BARMAN_PACKAGE_VERSION=2.3-2.pgdg80+1 PG_CLIENT_MAJOR_VERSION=9.6 PG_CLIENT_VERSION=9.6 PG_CLIENT_PACKAGE_VERSION=9.6" \ | ||
"BARMAN_VERSION=2.3 BARMAN_PACKAGE_VERSION=2.3-2.pgdg80+1 PG_CLIENT_MAJOR_VERSION=10.2 PG_CLIENT_VERSION=10 PG_CLIENT_PACKAGE_VERSION=10.2"; do | ||
eval $VALS | ||
echo ">>>>>> Making $VALS" | ||
|
||
FILE_FROM="./src/includes/dockerfile/Barman-$BARMAN_VERSION.part.Dockerfile" | ||
FILE_TO="./src/Barman-$BARMAN_VERSION-Postgres-$PG_CLIENT_MAJOR_VERSION.Dockerfile" | ||
|
||
flush $FILE_TO | ||
template $FILE_FROM $FILE_TO $VALS | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,42 @@ | ||
# Script to build final Dockerfile-s for different versions of components | ||
set -e | ||
|
||
BUILD_NUMBER=`date` | ||
|
||
function flush { | ||
MARKER_LINE="BUILD_NUMBER=$BUILD_NUMBER" | ||
FILE="$1" | ||
echo ' | ||
if [[ `grep "$MARKER_LINE" $FILE | wc -l | tr -d ' '` == "0" ]]; then | ||
echo " | ||
########################################################################## | ||
## AUTO-GENERATED FILE ## | ||
## $MARKER_LINE ## | ||
########################################################################## | ||
' > $FILE | ||
|
||
" > $FILE | ||
fi | ||
} | ||
|
||
function template { | ||
TEMPLATE_FILE_FROM="$1" | ||
TEMPLATE_FILE_TO="$2" | ||
CONFIGS="$3" | ||
TMP_FILE="/tmp/make.postdock.tmp" | ||
TMP_FILE_PART="/tmp/make.postdock.tmp.part" | ||
|
||
cp -f $TEMPLATE_FILE_FROM $TMP_FILE | ||
CONFIGS="${@:3}" | ||
flush $TEMPLATE_FILE_TO | ||
|
||
IFS=';' read -ra CONFIG_PAIRS <<< "$CONFIGS" | ||
for CONFIG_PAIR in "${CONFIG_PAIRS[@]}" | ||
do | ||
IFS='=' read -ra CONFIG <<< "$CONFIG_PAIR" | ||
VAR="${CONFIG[0]}" | ||
VAL="${CONFIG[1]}" | ||
sed -e "s/{{\ *$VAR\ *}}/$VAL/g" $TMP_FILE > $TMP_FILE_PART | ||
mv -f $TMP_FILE_PART ${TMP_FILE} | ||
done | ||
|
||
cat $TMP_FILE >> $TEMPLATE_FILE_TO | ||
rm -f $TMP_FILE | ||
echo ">>>>>> $CONFIGS" | ||
eval "$CONFIGS" ./tmp/mo $TEMPLATE_FILE_FROM >> $TEMPLATE_FILE_TO | ||
} | ||
|
||
# Getting templates processor | ||
if [ ! -f "tmp/mo" ]; then | ||
echo "> Getting Mustache template processor Mo" | ||
mkdir tmp | ||
curl -sSL https://git.io/get-mo > tmp/mo | ||
chmod +x tmp/mo | ||
. ./tmp/mo | ||
fi | ||
|
||
# Making | ||
for SYSTEM in `find ./make/* -maxdepth 1 -type d`; do | ||
echo "> Processing $SYSTEM" | ||
source $SYSTEM/make.sh | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
echo ">>> Making pgpool" | ||
|
||
for VALS in "PGPOOL_VERSION=3.3;PGPOOL_PACKAGE_VERSION=3.3.4;PG_CLIENT_MAJOR_VERSION=9.6;PG_CLIENT_VERSION=9.6;PG_CLIENT_PACKAGE_VERSION=9.6" \ | ||
"PGPOOL_VERSION=3.3;PGPOOL_PACKAGE_VERSION=3.3.4;PG_CLIENT_MAJOR_VERSION=10.2;PG_CLIENT_VERSION=10;PG_CLIENT_PACKAGE_VERSION=10.2" \ | ||
"PGPOOL_VERSION=3.6;PGPOOL_PACKAGE_VERSION=3.6;PG_CLIENT_MAJOR_VERSION=9.6;PG_CLIENT_VERSION=9.6;PG_CLIENT_PACKAGE_VERSION=9.6" \ | ||
"PGPOOL_VERSION=3.6;PGPOOL_PACKAGE_VERSION=3.6;PG_CLIENT_MAJOR_VERSION=10.2;PG_CLIENT_VERSION=10;PG_CLIENT_PACKAGE_VERSION=10.2"; do | ||
for VALS in "PGPOOL_VERSION=3.3 PGPOOL_PACKAGE_VERSION=3.3.4 PG_CLIENT_MAJOR_VERSION=9.6 PG_CLIENT_VERSION=9.6 PG_CLIENT_PACKAGE_VERSION=9.6" \ | ||
"PGPOOL_VERSION=3.3 PGPOOL_PACKAGE_VERSION=3.3.4 PG_CLIENT_MAJOR_VERSION=10.2 PG_CLIENT_VERSION=10 PG_CLIENT_PACKAGE_VERSION=10.2" \ | ||
"PGPOOL_VERSION=3.6 PGPOOL_PACKAGE_VERSION=3.6 PG_CLIENT_MAJOR_VERSION=9.6 PG_CLIENT_VERSION=9.6 PG_CLIENT_PACKAGE_VERSION=9.6" \ | ||
"PGPOOL_VERSION=3.6 PGPOOL_PACKAGE_VERSION=3.6 PG_CLIENT_MAJOR_VERSION=10.2 PG_CLIENT_VERSION=10 PG_CLIENT_PACKAGE_VERSION=10.2"; do | ||
eval $VALS | ||
echo ">>>>>> Making $VALS" | ||
|
||
FILE_FROM="./src/includes/dockerfile/Pgpool-$PGPOOL_VERSION.part.Dockerfile" | ||
FILE_TO="./src/Pgpool-$PGPOOL_VERSION-Postgres-$PG_CLIENT_MAJOR_VERSION.Dockerfile" | ||
|
||
flush $FILE_TO | ||
template $FILE_FROM $FILE_TO $VALS | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters