pipeline: # Download the cache from S3 restore-cache: image: plugins/s3-cache pull: true endpoint: https://s3.roosens.me root: build-cache/ restore: true secrets: [ cache_s3_access_key, cache_s3_secret_key ] # =====BUILDING===== build-frontend: image: node:15-alpine3.13 pull: true group: build commands: - cd web - yarn install - yarn run build build-backend: image: chewingbever/fej-builder:latest pull: true group: build environment: - CARGO_HOME=.cargo commands: - cargo build # =====TESTING===== test-backend: image: chewingbever/fej-builder:latest environment: - CARGO_HOME=.cargo commands: - cargo test # =====LINTING===== lint-frontend: image: node:15-alpine3.13 group: lint commands: - cd web - yarn run lint lint-backend: image: chewingbever/fej-builder:latest group: lint environment: - CARGO_HOME=.cargo commands: - cargo fmt -- --check # This is run here because it requires compilation - cargo clippy --all-targets -- -D warnings # =====REBUILD & FLUSH CACHE===== rebuild-cache: image: plugins/s3-cache endpoint: https://s3.roosens.me root: build-cache/ rebuild: true mount: - target - .cargo - web/node_modules secrets: [ cache_s3_access_key, cache_s3_secret_key ] # Push the cache, even on failure when: status: [ success, failure ] flush-cache: image: plugins/s3-cache endpoint: https://s3.roosens.me root: build-cache/ flush: true # Delete cache older than 30 days (might lower this) flush_age: 14 secrets: [ cache_s3_access_key, cache_s3_secret_key ] # Push the cache, even on failure when: status: [ success, failure ]