Skip to content
Snippets Groups Projects
Commit cc4d1e19 authored by TonyFord's avatar TonyFord
Browse files

add env

parent c2ad7df7
No related branches found
No related tags found
No related merge requests found
Pipeline #50577 failed
......@@ -8,7 +8,7 @@ services:
command: jekyll serve
restart: always
ports:
- 4990:4000
- ${LH_PORT:-4990}:4000
environment:
JEKYLL_UID: ${RUNNER_UID:-1000}
JEKYLL_GID: ${RUNNER_GID:-1000}
......
LH_PORT=4990
setenv 0 → 100644
#!/bin/bash
export RUNNER_UID=`id -u`
export RUNNER_GID=`id -g`
CI_PROJECT_NAME=${PWD##*/}
F=`ls -p ./env | grep -v /`
for f in $F
do
v=`echo -n ${!f}`
if [ "${!f}" != "" ]
then
echo "${f}=${!f}" > ./env/${f}
fi
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 `cat ./env/*`
# set executable to console and deployment commands
chmod +x console/jekyll
chmod +x console/help
chmod +x console/ps
chmod +x deploy/help
chmod +x deploy/start
chmod +x deploy/jekyll_debug
chmod +x deploy/update
chmod +x deploy/stop
chmod +x deploy/uninstall
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment