Skip to content

Commit

Permalink
Allow declaration of client key and secret via env variables
Browse files Browse the repository at this point in the history
If PIPELINE2_AUTH_CLIENTKEY and/or PIPELINE2_AUTH_CLIENTSECRET are
defined in the environment, when starting the pipeline, use those
values. This simplyfies dockerization of the pipeline.
  • Loading branch information
egli authored and bertfrees committed Oct 9, 2017
1 parent fbced57 commit 36ed956
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/main/resources/bin/pipeline2
Expand Up @@ -355,23 +355,22 @@ init() {

run() {
if [ "x$PIPELINE2_AUTH" = "x" ]; then
PIPELINE2_AUTH="-Dorg.daisy.pipeline.ws.authentication=false"
export PIPELINE2_AUTH
OPTS="$OPTS -Dorg.daisy.pipeline.ws.authentication=false"
else
PIPELINE2_AUTH="-Dorg.daisy.pipeline.ws.authentication=$PIPELINE2_AUTH"
export PIPELINE2_AUTH

OPTS="$OPTS -Dorg.daisy.pipeline.ws.authentication=$PIPELINE2_AUTH"
fi
if [ "x$PIPELINE2_LOCAL" = "x" ]; then
PIPELINE2_LOCAL="-Dorg.daisy.pipeline.ws.localfs=true"
export PIPELINE2_LOCAL
OPTS="$OPTS -Dorg.daisy.pipeline.ws.localfs=true"
else
PIPELINE2_LOCAL="-Dorg.daisy.pipeline.ws.localfs=$PIPELINE2_LOCAL"
export PIPELINE2_LOCAL

OPTS="$OPTS -Dorg.daisy.pipeline.ws.localfs=$PIPELINE2_LOCAL"
fi
if [ "x$PIPELINE2_AUTH_CLIENTKEY" != "x" ]; then
OPTS="$OPTS -Dorg.daisy.pipeline.ws.authentication.key=$PIPELINE2_AUTH_CLIENTKEY"
fi
if [ "x$PIPELINE2_AUTH_CLIENTSECRET" != "x" ]; then
OPTS="$OPTS -Dorg.daisy.pipeline.ws.authentication.secret=$PIPELINE2_AUTH_CLIENTSECRET"
fi
MAIN=org.apache.felix.main.Main
OPTS="$PIPELINE2_LOCAL $PIPELINE2_AUTH"
MODE=" -Dorg.daisy.pipeline.main.mode=webservice"

case "$1" in
Expand Down

0 comments on commit 36ed956

Please sign in to comment.