- Removing broken build job build-json-api

Issue seemed to be that artifacts were not being preserved properly.
This was causing failures in test stages where it was basicallly impossible to debug
"real" issues

- Removing artifacting (json-api) for now
They'll be re-added when there's a good way of verifying the quality of builds.
For now they're gone because the mock test stage is doing a lot of work already

+ mock-test job now builds json-api
This fixes the first issue this patches intends on fixing however it's kinda
cheesy and should probably be replaced at some point with a better fix
This commit is contained in:
shockrah 2021-05-12 16:04:58 -07:00
parent 7ae975e7c1
commit f952b91a32

View File

@ -26,31 +26,6 @@ before_script:
- export PATH="$CARGO_HOME/bin:$PATH" - export PATH="$CARGO_HOME/bin:$PATH"
build-json-api:
# This is easily the most expensive stage since cargo sucks so we try to cache
# everything we can between jobs here
stage: build
only:
refs:
- master
script:
- cd json-api/
- cargo build --release
# primarily used to cache between jobs
# expirey time overwritten later for weekly builds
artifacts:
paths:
- json-api/target/
- $CARGO_HOME
expire_in: 30 mins
build-rtc-server: build-rtc-server:
stage: build stage: build
only: only:
@ -121,16 +96,10 @@ build-wiki:
# Test routines past this point # Test routines past this point
cargo-test-json-api: cargo-test-json-api:
stage: test stage: test
needs:
- build-json-api
only: only:
refs: refs:
- master - master
dependencies:
- build-json-api
variables: variables:
HMAC_PATH: "../hmac.secret" HMAC_PATH: "../hmac.secret"
WSS_HMAC_PATH: "../wss-hmac.secret" WSS_HMAC_PATH: "../wss-hmac.secret"
@ -142,23 +111,15 @@ cargo-test-json-api:
- cd json-api/ - cd json-api/
- cargo test --release -- --nocapture - cargo test --release -- --nocapture
artifacts:
paths:
- json-api/target/release/json-api
expire_in: 1 week
name: json-api
full-mock-tests: full-mock-tests:
stage: test stage: test
needs: needs:
- build-json-api
- build-rtc-server - build-rtc-server
only: only:
refs: refs:
- master - master
dependencies: dependencies:
- build-json-api
- build-rtc-server - build-rtc-server
# Note: the command line flags below are probably redundant/pointless but # Note: the command line flags below are probably redundant/pointless but
@ -167,8 +128,13 @@ full-mock-tests:
before_script: before_script:
- export HMAC_PATH="../hmac.secret" - export HMAC_PATH="../hmac.secret"
- export WSS_HMAC_PATH="../wss-hmac.secret" - export WSS_HMAC_PATH="../wss-hmac.secret"
- export DATABASE_URL="mysql://freechat_dev:password@localhost:3306/freechat"
script: script:
# Building here because cargo caching has ruined 2 many pipelines :(
- pushd json-api/
- cargo build --release
- popd
# Setup some dummy keys # Setup some dummy keys
- head --bytes=32 > hmac.secret - head --bytes=32 > hmac.secret
- head --bytes=32 > wss-hmac.secret - head --bytes=32 > wss-hmac.secret
@ -181,15 +147,12 @@ full-mock-tests:
# It's typically safer to turn on the rtc-server first all it does is provide # It's typically safer to turn on the rtc-server first all it does is provide
# data for listeners, the api-server is the one that talks to this server mostly # data for listeners, the api-server is the one that talks to this server mostly
# See https://freechat.shockrah.xyz/#rtc-auth for the intra-network architecture # See https://freechat.shockrah.xyz/#rtc-auth for the intra-network architecture
- pushd rtc-server/
- npm run autotest& - npm run autotest&
- popd - popd
- pushd json-api/ - pushd json-api/
# Yes i know this looks kinda wack but hopefully cargo won't try to reuild if just # Yes i know this looks kinda wack but hopefully cargo won't try to reuild if just
# use the binary directly
- cargo run --release -- -H ../hmac.secret -w ../wss-hmac.secret -s& - cargo run --release -- -H ../hmac.secret -w ../wss-hmac.secret -s&
- popd - popd
- sleep 5 - sleep 5
# TODO: do some kind of more intelligent logging here (maybe some integrations or something idk) - pushd json-api/ && source client-tests/bin/activate && python client-tests/main.py
- pushd json-api/client-tests && source bin/activate && python main.py