-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.gitlab-ci.yml
95 lines (90 loc) · 2.07 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# This file is a template, and might need editing before it works on your project.
# Template project: https://gitlab.com/pages/jekyll
# Docs: https://docs.gitlab.com/ce/pages/
variables:
JEKYLL_ENV: production
LC_ALL: C.UTF-8
stages:
- test
- build
- deploy
behat:
stage: test
# when: manual
# Select image from https://hub.docker.com/_/php/
image: php:7.3.11
rules:
- if: $CI_MERGE_REQUEST_ID
when: never
- if: '$CI_COMMIT_TAG'
when: never
- when: always
before_script:
- apt-get update
- curl -sL https://deb.nodesource.com/setup_10.x | bash -
- apt-get --yes install git zip unzip nodejs
- nodejs --version
- npm --version
- npm install
- ./node_modules/.bin/drakov --stealthmode -f "./spec/*.apib" -p 3000&
- php -v
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
- php composer-setup.php
- php -r "unlink('composer-setup.php');"
- php composer.phar install
script:
- vendor/bin/behat --suite=core
allow_failure: false
cache:
key: behat
paths:
- node_modules/
- vendor/
build-docs:
stage: build
image: ruby:2.6
rules:
- if: $CI_MERGE_REQUEST_ID
when: never
- if: '$CI_COMMIT_TAG'
when: always
- when: on_success
before_script:
- apt-get update
- curl -sL https://deb.nodesource.com/setup_10.x | bash -
- apt-get --yes install git zip unzip nodejs
- nodejs --version
- npm --version
- npm install
- cd docs
- gem install bundler
- bundle -v
- bundle config path 'vendor'
- bundle install
- echo $(date -u)
script:
- bundle exec jekyll build --future --destination ../public/
- cd ..
- chmod +x ./bin/parse_apib.sh
- ./bin/parse_apib.sh
cache:
key: build
paths:
- docs/vendor
artifacts:
paths:
- public
pages:
stage: deploy
allow_failure: true
rules:
- if: $CI_MERGE_REQUEST_ID
when: never
- if: '$CI_COMMIT_TAG'
when: on_success
- when: manual
script:
- ls -al
artifacts:
paths:
- public