Skip to content

Commit

Permalink
(#77) created and updated build scripts for new base image
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffle committed Oct 29, 2020
1 parent 373a28f commit 907ab4d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 31 deletions.
24 changes: 24 additions & 0 deletions build-base.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash

set -ex

NODE_VERSION=${1:-lts/erbium}

echo "node version: $NODE_VERSION"

echo "Running obfuscator"
npm --prefix ./license-validator ci
echo "Removing possible leftovers"
rm -rf ./src/common/env
mkdir -p ./src/common/env
echo "Copy files"
cp -rf ./license-validator/dist/index.js ./src/common/env/startup.js
cp -rf ./license-validator/node_modules ./src/common/env/node_modules

docker build \
--pull \
--no-cache \
-t taconsol/sakuli-base \
-f Dockerfile.sakuli-base . \
--build-arg=NODE_VERSION=${NODE_VERSION} \
--build-arg=BUILD_DATE=$(date +"%F")
17 changes: 2 additions & 15 deletions build-latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,19 @@ set -ex

SAKULI_VERSION=${1:-next}
NPM_TOKEN=${2:-549ada59-bb56-4c22-ac54-1d3ec05d6a4d}
NODE_VERSION=${3:-lts/erbium}

echo "Sakuli version: $SAKULI_VERSION"
echo "npm token: $NPM_TOKEN"
echo "node version: $NODE_VERSION"

echo "Running obfuscator"
npm --prefix ./license-validator ci
echo "Removing possible leftovers"
rm -rf ./src/common/env
mkdir -p ./src/common/env
echo "Copy files"
cp -rf ./license-validator/dist/index.js ./src/common/env/startup.js
cp -rf ./license-validator/node_modules ./src/common/env/node_modules

docker build \
--pull \
--no-cache \
-t taconsol/sakuli \
-f Dockerfile.sakuli-ubuntu-openbox . \
-f Dockerfile.sakuli . \
--build-arg=SAKULI_VERSION=${SAKULI_VERSION} \
--build-arg=NPM_ACCESS_TOKEN=${NPM_TOKEN} \
--build-arg=NODE_VERSION=${NODE_VERSION} \
--build-arg=BUILD_DATE=$(date +"%F")

cd ./.test/
chmod u+x test.sh
./test.sh
cd -
cd -
20 changes: 4 additions & 16 deletions build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,21 @@

set -ex

SAKULI_VERSION=${1:-2.3.0}
SAKULI_VERSION=${1:-2.4.0}
NPM_TOKEN=${2:-549ada59-bb56-4c22-ac54-1d3ec05d6a4d}
NODE_VERSION=${3:-lts/erbium}

echo "Sakuli version: $SAKULI_VERSION"
echo "npm token: $NPM_TOKEN"
echo "node version: $NODE_VERSION"

echo "Running obfuscator"
npm --prefix ./license-validator ci
echo "Removing possible leftovers"
rm -rf ./src/common/env
mkdir -p ./src/common/env
echo "Copy files"
cp -rf ./license-validator/dist/index.js ./src/common/env/startup.js
cp -rf ./license-validator/node_modules ./src/common/env/node_modules

docker build \
--pull \
--no-cache \
-t taconsol/sakuli:${SAKULI_VERSION} \
-f Dockerfile.sakuli-ubuntu-openbox . \
-f Dockerfile.sakuli . \
--build-arg=SAKULI_VERSION=${SAKULI_VERSION} \
--build-arg=NPM_ACCESS_TOKEN=${NPM_TOKEN} \
--build-arg=NODE_VERSION=${NODE_VERSION} \
--build-arg=BUILD_DATE=$(date +"%F")

cd ./.test/
sh test.sh ${SAKULI_VERSION}
chmod u+x test.sh
./test.sh
cd -

0 comments on commit 907ab4d

Please sign in to comment.