baseui/.gitlab-ci.yml

85 lines
2.0 KiB
YAML
Raw Normal View History

2017-08-24 11:16:07 +02:00
stages:
- build
# - test
2017-09-06 11:11:21 +02:00
- deploy
2017-08-24 11:16:07 +02:00
2017-08-31 20:43:08 +02:00
build_ui:
2017-08-31 20:24:37 +02:00
image: node
2017-08-31 19:40:42 +02:00
tags:
- docker
2017-08-24 11:16:07 +02:00
stage: build
script:
2017-08-31 20:24:37 +02:00
- git submodule update --init
- npm install
2017-08-24 11:16:07 +02:00
- npm run build
2017-08-31 22:58:06 +02:00
cache:
paths:
- node_modules/
2017-08-31 20:43:08 +02:00
artifacts:
name: "basispanel-ui-$CI_COMMIT_REF_NAME"
2017-08-31 20:52:15 +02:00
expire_in: 1h
2017-08-31 20:43:08 +02:00
paths:
- assets
- build
- conf
- index.html
2017-08-31 20:24:37 +02:00
2017-09-06 11:01:15 +02:00
start_review:
2017-08-31 23:09:32 +02:00
image: mwienk/docker-lftp
tags:
- docker
dependencies:
- build_ui
2017-09-06 11:11:21 +02:00
stage: deploy
2017-08-31 23:09:32 +02:00
script:
2017-09-01 17:55:01 +02:00
- cat index.html
2017-08-31 23:09:32 +02:00
- mkdir _for_upload
- mv assets build conf index.html _for_upload
2017-09-01 18:43:46 +02:00
- 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"
2017-08-31 23:09:32 +02:00
environment:
2017-09-06 10:39:21 +02:00
name: review/$CI_COMMIT_REF_NAME
2017-08-31 23:09:32 +02:00
url: http://ui.basispanel.de/$CI_COMMIT_REF_NAME/
2017-09-06 11:01:15 +02:00
on_stop: stop_review
stop_review:
image: mwienk/docker-lftp
tags:
- docker
2017-09-06 11:11:21 +02:00
stage: deploy
2017-09-06 11:01:15 +02:00
variables:
GIT_STRATEGY: none
script:
- echo stopping env
environment:
name: review/$CI_COMMIT_REF_NAME
action: stop
when: manual
2017-08-31 23:09:32 +02:00
2017-09-06 11:12:33 +02:00
fullsync_review:
2017-08-31 20:24:37 +02:00
image: mwienk/docker-lftp
tags:
- docker
2017-08-31 20:43:08 +02:00
dependencies:
- build_ui
2017-09-06 11:12:33 +02:00
stage: deploy
2017-08-31 20:24:37 +02:00
script:
2017-08-31 21:17:36 +02:00
- mkdir _for_upload
- mv assets build conf index.html _for_upload
2017-09-01 18:43:46 +02:00
- 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"
2017-08-31 23:09:32 +02:00
when: manual
2017-08-31 21:17:36 +02:00
2017-09-07 11:29:06 +02:00
docker_test:
tags:
- shell
dependencies:
- build_ui
stage: deploy
script:
2017-09-07 23:15:14 +02:00
- mkdir _for_docker
2017-09-07 23:17:37 +02:00
- mv assets build conf index.html _for_docker
2017-09-07 23:45:41 +02:00
- docker-compose -p ${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME} up -d --build