baseui/.gitlab-ci.yml
Sebastian Frank a89e6d1351 stop review
2017-09-06 11:01:15 +02:00

74 lines
1.7 KiB
YAML

stages:
- build
# - test
- review
build_ui:
image: node
tags:
- docker
stage: build
script:
- git submodule update --init
- npm install
- npm run build
cache:
paths:
- node_modules/
artifacts:
name: "basispanel-ui-$CI_COMMIT_REF_NAME"
expire_in: 1h
paths:
- assets
- build
- conf
- index.html
start_review:
image: mwienk/docker-lftp
tags:
- docker
dependencies:
- build_ui
stage: review
script:
- cat index.html
- mkdir _for_upload
- mv assets build conf index.html _for_upload
- lftp -c "set sftp:auto-confirm yes; open -u intern_basispanel_ui,$FTP_PASSWORD sftp://ftp.basehosts.de;mkdir -f /$CI_COMMIT_REF_NAME; mirror -v -n -e -R -L _for_upload/ /$CI_COMMIT_REF_NAME"
environment:
name: review/$CI_COMMIT_REF_NAME
url: http://ui.basispanel.de/$CI_COMMIT_REF_NAME/
on_stop: stop_review
stop_review:
image: mwienk/docker-lftp
tags:
- docker
stage: review
variables:
GIT_STRATEGY: none
script:
- echo stopping env
environment:
name: review/$CI_COMMIT_REF_NAME
action: stop
when: manual
review_fullsync:
image: mwienk/docker-lftp
tags:
- docker
dependencies:
- build_ui
stage: review
script:
- mkdir _for_upload
- mv assets build conf index.html _for_upload
- lftp -c "set sftp:auto-confirm yes; open -u intern_basispanel_ui,$FTP_PASSWORD sftp://ftp.basehosts.de;mkdir -f /$CI_COMMIT_REF_NAME; mirror -v --transfer-all -e -R -L _for_upload/ /$CI_COMMIT_REF_NAME"
when: manual