mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
adding deploy doc stage
This commit is contained in:
parent
8e6f2d4355
commit
7763bddc80
@ -11,10 +11,10 @@
|
||||
|
||||
|
||||
stages:
|
||||
- build-doc
|
||||
- deploy-doc
|
||||
- test
|
||||
- deploy
|
||||
- build-doc
|
||||
- deploy-doc
|
||||
|
||||
|
||||
|
||||
@ -31,6 +31,18 @@ test:php-7:
|
||||
image: chill/ci-image:php-7
|
||||
script: phpunit
|
||||
|
||||
|
||||
deploy-packagist:
|
||||
stage: deploy
|
||||
image: chill/ci-image:php-7
|
||||
before_script:
|
||||
# test that PACKAGIST USERNAME and PACKAGIST_TOKEN variable are set
|
||||
- if [ -z ${PACKAGIST_USERNAME+x} ]; then echo "Please set PACKAGIST_USERNAME variable"; exit -1; fi
|
||||
- if [ -z ${PACKAGIST_TOKEN+x} ]; then echo "Please set PACKAGIST_TOKEN variable"; exit -1; fi
|
||||
script:
|
||||
- STATUSCODE=$(curl -XPOST -H'content-type:application/json' "https://packagist.org/api/update-package?username=$PACKAGIST_USERNAME&apiToken=$PACKAGIST_TOKEN" -d"{\"repository\":{\"url\":\"$CI_PROJECT_URL.git\"}}" --silent --output /dev/stderr --write-out "%{http_code}")
|
||||
- if [ $STATUSCODE = "202" ]; then exit 0; else exit $STATUSCODE; fi
|
||||
|
||||
# deploy documentation
|
||||
api-doc-build:
|
||||
stage: build-doc
|
||||
@ -47,14 +59,4 @@ api-doc-build:
|
||||
only:
|
||||
- master
|
||||
- tags
|
||||
|
||||
deploy-packagist:
|
||||
stage: deploy
|
||||
image: chill/ci-image:php-7
|
||||
before_script:
|
||||
# test that PACKAGIST USERNAME and PACKAGIST_TOKEN variable are set
|
||||
- if [ -z ${PACKAGIST_USERNAME+x} ]; then echo "Please set PACKAGIST_USERNAME variable"; exit -1; fi
|
||||
- if [ -z ${PACKAGIST_TOKEN+x} ]; then echo "Please set PACKAGIST_TOKEN variable"; exit -1; fi
|
||||
script:
|
||||
- STATUSCODE=$(curl -XPOST -H'content-type:application/json' "https://packagist.org/api/update-package?username=$PACKAGIST_USERNAME&apiToken=$PACKAGIST_TOKEN" -d"{\"repository\":{\"url\":\"$CI_PROJECT_URL.git\"}}" --silent --output /dev/stderr --write-out "%{http_code}")
|
||||
- if [ $STATUSCODE = "202" ]; then exit 0; else exit $STATUSCODE; fi
|
||||
|
||||
|
@ -6,7 +6,7 @@ source:
|
||||
|
||||
exclude:
|
||||
- vendor/*
|
||||
- Resource/test/*
|
||||
- Resources/test/*
|
||||
|
||||
title: Chill EventBundle
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user