CICD Upgrade #72

Merged
Jef Roosens merged 20 commits from 45-cicd into develop 2021-05-13 10:44:17 +02:00
Showing only changes of commit cd4075d294 - Show all commits

View file

@ -1,24 +1,78 @@
pipeline: pipeline:
# Download the cache from S3
restore-cache:
image: plugins/drone-s3-cache
pull: true
endpoint: $S3_ENDPOINT
access_key: $S3_USER
secret_key: $S3_PASSWORD
root: fej_build-cache
restore: true
secrets: [ s3_endpoint, s3_user, s3_password ]
# =====LINTING=====
lint-frontend:
image: node:15-alpine3.13
group: lint
commands:
- cd web
- yarn run lint
lint-backend:
image: chewingbever/fej-builder:latest
pull: true
group: lint
commands:
- cargo fmt -- --check
# =====BUILDING=====
build-frontend: build-frontend:
image: node:15-alpine3.13 image: node:15-alpine3.13
pull: true
commands: commands:
- cd web - cd web
- yarn install - yarn install
- yarn run build - yarn run build
lint-frontend:
image: node:15-alpine3.13
commands:
- cd web
- yarn run lint
# This doesn't require compiling anything build-backend:
lint-backend:
image: chewingbever/fej-builder:latest image: chewingbever/fej-builder:latest
pull: true
commands: commands:
- cargo fmt -- --check - cargo build
# =====TESTING=====
test-backend:
image: chewingbever/fej-builder:latest
commands:
# This is run here because it requires compilation
- cargo clippy -- --no-deps -D warnings
- cargo test
# =====REBUILD CACHE=====
rebuild-cache:
image: plugins/drone-s3-cache
endpoint: $S3_ENDPOINT
access_key: $S3_USER
secret_key: $S3_PASSWORD
root: fej_build-cache
rebuild: true
flush: true
# Delete cache older than 30 days (might lower this)
flush_age: 30
mount:
- target
- web/node_modules
secrets: [ s3_endpoint, s3_user, s3_password ]
# Push the cache, even on failure
when: [ success, failure ]
# publish-builder: # publish-builder:
# image: plugins/docker # image: plugins/docker