Skip to content
Snippets Groups Projects
Commit 9404d1e9 authored by Bastien Abadie's avatar Bastien Abadie
Browse files

ci: Specify different API_BASE_URL on default branche & MR

parent 3a9562b6
No related branches found
No related tags found
No related merge requests found
......@@ -7,23 +7,31 @@ stages:
before_script:
- npm ci
frontend-test:
.test:
stage: test
only:
# Default "only" + merge_requests
- branches
- tags
- merge_requests
frontend-test:
extends: .test
script:
- npm run test
frontend-lint:
stage: test
extends: .test
script:
- npm run lint
frontend-audit:
stage: test
extends: .test
script:
- npm audit --parseable
allow_failure: true
frontend-build:
.build:
stage: build
artifacts:
paths:
......@@ -33,16 +41,33 @@ frontend-build:
script:
- npm run production
frontend-build-mr:
extends: .build
only:
- merge_requests
variables:
# On merge requests we build using preprod to be able
# to test on surge.sh
API_BASE_URL: https://arkindex.dev.teklia.com/api/v1
frontend-build-default:
extends: .build
except:
- merge_requests
variables:
# On default branches we build using a relative API Url
API_BASE_URL: /api/v1
deploy-surge:
stage: deploy
# Do not deploy master !
except:
refs:
- master
# Only deploy merge requests on surge
only:
- merge_requests
before_script:
- npm install -g surge
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment