.gitlab-ci.yml 650 Bytes
Newer Older
Wolfgang Knopki's avatar
Wolfgang Knopki committed
1
2
variables:
  EXPORT_DIR: "/var/www/html/pages"
GitLab's avatar
GitLab committed
3

4
5
6
7
8
9
10
stages:
    - test
    - deploy
  
pages-test:
  stage: test
  script:
Wolfgang Knopki's avatar
Wolfgang Knopki committed
11
    - echo "Teste, ob Projektname gesetzt ist..."
12
    - (! grep 'projektname= ""' public/settings.js)
Wolfgang Knopki's avatar
Wolfgang Knopki committed
13
    - echo "Teste, ob Projektseitenlink gesetzt ist..."
14
    - (! grep 'projektseitenlink= ""' public/settings.js)
Wolfgang Knopki's avatar
Wolfgang Knopki committed
15
    - echo "Teste, ob Kontaktperson gesetzt ist..."
16
    - (! grep 'Max Mustermann' public/kontakt.html)
Wolfgang Knopki's avatar
Wolfgang Knopki committed
17
18
  only:
    - master
19
  
Wolfgang Knopki's avatar
Wolfgang Knopki committed
20
pages-master:
GitLab's avatar
GitLab committed
21
22
  stage: deploy
  script:
Wolfgang Knopki's avatar
Wolfgang Knopki committed
23
    - mkdir -p "$EXPORT_DIR/$CI_PROJECT_NAME"	
Wolfgang Knopki's avatar
Wolfgang Knopki committed
24
25
26
27
28
    - cp -r public/* "$EXPORT_DIR/$CI_PROJECT_NAME"
  tags: 
    - production
  only: 
    - master