New pipeline script for master branch updated to support new project structure
This commit is contained in:
parent
eb338e03a0
commit
8dd42606bd
@ -1,35 +1,48 @@
|
||||
image: shockrah/freechat:0.3
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
|
||||
variables:
|
||||
CARGO_HOME: $CI_PROJECT_DIR/.cargo
|
||||
|
||||
cache:
|
||||
key: "$CI_JOB_NAME"
|
||||
untracked: true
|
||||
paths:
|
||||
- $CARGO_HOME
|
||||
- $CI_PROJECT_DIR/server/target
|
||||
|
||||
|
||||
before_script:
|
||||
- export PATH="$CARGO_HOME/bin:$PATH"
|
||||
|
||||
build-release:
|
||||
|
||||
build-json-api:
|
||||
# Literally so expensive that I realy just don't wanna deal with it
|
||||
stage: build
|
||||
only:
|
||||
- testing
|
||||
when: manual
|
||||
only: [ "master" ]
|
||||
|
||||
script:
|
||||
- cd server/
|
||||
- diesel setup --database-url $DATABASE_URL
|
||||
- cd json-api/
|
||||
- cargo build --release
|
||||
|
||||
|
||||
# primarily used to cache between jobs
|
||||
# expirey time overwritten later for weekly builds
|
||||
artifacts:
|
||||
paths:
|
||||
- json-api/target/release/json-api
|
||||
expire_in: 15 mins
|
||||
|
||||
api-test:
|
||||
|
||||
test-json-api:
|
||||
stage: test
|
||||
needs: ["build-release"]
|
||||
only:
|
||||
- testing
|
||||
needs:
|
||||
- build-json-api
|
||||
|
||||
script:
|
||||
- cd server/
|
||||
- cd json-api/
|
||||
- cargo test --release
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- json-api/target/release/json-api
|
||||
expire_in: 1 week
|
||||
name: json-api
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user