Commit 0fd08458 authored by TonyFord's avatar TonyFord
Browse files

improvements

parent 5a7d0d6a
...@@ -3,16 +3,38 @@ ...@@ -3,16 +3,38 @@
export RUNNER_UID=`id -u` export RUNNER_UID=`id -u`
export RUNNER_GID=`id -g` export RUNNER_GID=`id -g`
# link to gitlab-runner env files if exists ####
CI_PROJECT_NAME=${PWD##*/} CI_PROJECT_NAME=${PWD##*/}
F=`ls -p ../${CI_PROJECT_NAME}.tmp | grep -v /` F=`ls -p ./env | grep -v /`
for f in $F for f in $F
do do
# export ${f}=${PWD}/../${CI_PROJECT_NAME}.tmp/${f} v=`echo -n ${!f}`
echo ${f}=${PWD}/../${CI_PROJECT_NAME}.tmp/${f} > ./env/${f} if [ "${!f}" != "" ]
then
echo "${f}=${!f}" > ./env/${f}
fi
done done
if [[ -d "./env_file" ]]
then
F=`ls -p ./env_file | grep -v /`
for f in $F
do
echo ${f}=./env_file/${f} > ./env/${f}
done
fi
# link to gitlab-runner env files if exists ####
if [[ -d "../${CI_PROJECT_NAME}.tmp" ]]
then
F=`ls -p ../${CI_PROJECT_NAME}.tmp | grep -v /`
for f in $F
do
echo ${f}=${PWD}/../${CI_PROJECT_NAME}.tmp/${f} > ./env/${f}
done
fi
# export env vars # export env vars
export `cat ./env/*` export `cat ./env/*`
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment