.gitlab-ci.yml 1019 Bytes
Newer Older
1
2
# This file is a template, and might need editing before it works on your project.
# Full project: https://gitlab.com/pages/plain-html
3
4
5
6
7

variables:
  EXPORT_PAGES_DIR: "/opt/tomcat9/webapps/ROOT/"

pages-master:    
8
  stage: deploy
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  script:
    - echo $EXPORT_PAGES_DIR
    - mkdir .public
    - cp -r css .public
    - cp -r images .public
    - cp -r js .public
    - cp -r includes .public
    - cp *.html .public
    - mv .public public
    - cp -r public/* "$EXPORT_PAGES_DIR"
  artifacts:
    paths:
      - public
  only:
    - master
24

25
26
pages-devel:    
  stage: deploy
27
28
29
30
31
32
33
34
35
  script:
    - echo $EXPORT_PAGES_DIR
    - mkdir .public
    - cp -r css .public
    - cp -r images .public
    - cp -r js .public
    - cp -r includes .public
    - cp *.html .public
    - mv .public public
36
37
38
    - cd public
    - jar -cvf ROOT.war *
    - curl --upload-file ROOT.war -u tomcat:$TOMCATPASS "https://m4lab.hft-stuttgart.de/manager/text/deploy?path=/ROOT&update=true"
39
40
41
42
43
  artifacts:
    paths:
      - public
  only:
    - devel