baseui/.gitlab-ci.yml

104 lines
2.5 KiB
YAML
Raw Normal View History

2017-08-24 11:16:07 +02:00
stages:
- build
# - test
2017-09-08 12:23:34 +02:00
- review
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-09-08 12:23:34 +02:00
- Dockerfile
- docker-compose.yml
#start_review:
# image: mwienk/docker-lftp
# tags:
# - docker
# dependencies:
# - build_ui
# stage: deploy
# 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: deploy
# variables:
# GIT_STRATEGY: none
# script:
# - echo stopping env
# environment:
# name: review/$CI_COMMIT_REF_NAME
# action: stop
# when: manual
#
#
#
#fullsync_review:
# image: mwienk/docker-lftp
# tags:
# - docker
# dependencies:
# - build_ui
# stage: deploy
# 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
2017-08-31 20:43:08 +02:00
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
tags:
2017-09-08 12:23:34 +02:00
- shell
2017-08-31 23:09:32 +02:00
dependencies:
- build_ui
2017-09-08 12:23:34 +02:00
stage: review
2017-08-31 23:09:32 +02:00
script:
2017-09-08 12:23:34 +02:00
- mkdir _for_docker
- mv assets build conf index.html _for_docker
- docker-compose -p ${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME} up -d --build
2017-08-31 23:09:32 +02:00
environment:
2017-09-06 10:39:21 +02:00
name: review/$CI_COMMIT_REF_NAME
2017-09-08 12:23:34 +02:00
url: http://${CI_COMMIT_REF_NAME}.${CI_PROJECT_NAME}.dev.basehosts.de/
2017-09-06 11:01:15 +02:00
on_stop: stop_review
2017-09-08 12:23:34 +02:00
2017-09-06 11:01:15 +02:00
stop_review:
tags:
2017-09-08 12:23:34 +02:00
- shell
2017-09-06 11:01:15 +02:00
variables:
GIT_STRATEGY: none
2017-09-08 12:23:34 +02:00
stage: review
when: manual
2017-09-06 11:01:15 +02:00
script:
2017-09-08 12:23:34 +02:00
- docker-compose -p ${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME} down
2017-09-06 11:01:15 +02:00
environment:
name: review/$CI_COMMIT_REF_NAME
action: stop