Newer
Older
# cache modules between jobs
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .npm/
## BUILD ##
build:
stage: build
before_script:
- npm ci --cache .npm --prefer-offline --only=production
script:
- cp config.sample.json config.json
- npm run build
artifacts:
when: on_success
expire_in: 1 day
paths:
- dist/
image:
name: cypress/included:7.6.0
entrypoint: [""]
- name: ${CI_REGISTRY_IMAGE}/djangoldp:latest
before_script:
# install missing dependencies
- npm install -g sirv-cli
- npm install cypress-localstorage-commands
# making sure the process is orphan
- sirv dist --port 3000 > /dev/null 2>&1 &
script:
- cypress run -e CYPRESS_baseUrl=http://localhost:3000
include:
project: infra/gitlab
ref: master
file: templates/deploy.ci.yml
url: https://test1.startinblox.com
variables:
ANSIBLE_INVENTORY: inventory/dev/
url: https://test2.startinblox.com
variables:
ANSIBLE_INVENTORY: inventory/dev
stage: integration
environment:
url: https://test3.startinblox.com
variables:
ANSIBLE_INVENTORY: inventory/dev
stage: acceptance
environment:
url: https://stg1.startinblox.com
variables:
ANSIBLE_INVENTORY: inventory/stg
- /^release\/.*/
when: manual
url: https://stg2.startinblox.com
variables:
ANSIBLE_INVENTORY: inventory/stg
- /^release\/.*/
when: manual
## RELEASE TAGGING ##
publish:
stage: release
image: ${CI_REGISTRY}/infra/docker/jsrelease:latest
script:
- semantic-release
only:
- master
tags:
- deploy
variables:
ANSIBLE_INVENTORY: inventory/prd