Skip to content
GitLab
Explore
Sign in
Commits on Source (2)
add environments setups
· 274ec7b4
Björn Bartels
authored
Nov 05, 2018
274ec7b4
Merge branch 'environments' into 'master'
· d34f10ec
Björn Bartels
authored
Nov 05, 2018
add environments setups See merge request
!3
d34f10ec
Show whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
d34f10ec
...
...
@@ -29,7 +29,7 @@ init:
#- node
#- php
before_script
:
-
export BUILD_LABEL=$(TZ=Europe/Berlin date +%Y%m%d-%H%M)
-
export BUILD_LABEL=$(TZ=Europe/Berlin date +%Y%m%d-%H%M
-$CI_COMMIT_REF_NAME
)
script
:
# save timestamp to file
-
echo $BUILD_LABEL > ${BUILD_LABEL_TMPFILE}
...
...
@@ -168,12 +168,15 @@ src-lint-javascript:
-
${BUILD_TARGET}
# ftp to dev host
ftp
-dev
:
deploy
-dev
:
stage
:
deploy
tags
:
-
kunden-web
dependencies
:
-
app-build
environment
:
name
:
development
url
:
https://$FTP_HOST_DEV
before_script
:
#- no action for now...
script
:
...
...
@@ -181,24 +184,48 @@ ftp-dev:
-
npm run deploy
# ftp to host
-
'
which
lftp
||
(
apt-get
update
-qq
&&
apt-get
install
-y
-qq
lftp
)'
-
lftp -c "set ftp:ssl-allow no; open -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST; mirror -Rev ${BUILD_TARGET}/ ./$FTP_PATH/${BUILD_TARGET} --parallel=10 --exclude-glob .git* --exclude .git/"
-
lftp -c "set ftp:ssl-allow no; open -u $FTP_USERNAME
_DEV
,$FTP_PASSWORD
_DEV
$FTP_HOST
_DEV
; mirror -Rev ${BUILD_TARGET}/ ./$FTP_PATH
_DEV
/${BUILD_TARGET} --parallel=10 --exclude-glob .git* --exclude .git/"
except
:
refs
:
-
master
-
tags
-
release
when
:
manual
artifacts
:
paths
:
-
${BUILD_TARGET}
# ftp to production/live host
ftp-prod
:
deploy-staging
:
stage
:
deploy
tags
:
-
kunden-web
dependencies
:
-
app-build
environment
:
name
:
staging
url
:
https://$FTP_HOST_TEST
before_script
:
#- no action for now...
script
:
# deploy files
-
npm run deploy
# ftp to host
-
'
which
lftp
||
(
apt-get
update
-qq
&&
apt-get
install
-y
-qq
lftp
)'
-
lftp -c "set ftp:ssl-allow no; open -u $FTP_USERNAME_TEST,$FTP_PASSWORD_TEST $FTP_HOST_TEST; mirror -Rev ${BUILD_TARGET}/ ./$FTP_PATH_TEST/${BUILD_TARGET} --parallel=10 --exclude-glob .git* --exclude .git/"
only
:
refs
:
-
master
# ftp to production/live host
deploy-prod
:
stage
:
deploy
tags
:
-
kunden-web
dependencies
:
-
app-build
environment
:
name
:
production
url
:
https://$FTP_HOST_PROD
before_script
:
#- no action for now...
script
:
...
...