chore(gitlab-ci): add backend jobs
This commit is contained in:
parent
93cbea6bd9
commit
6f392396b9
@ -107,6 +107,67 @@ push frontend image:
|
|||||||
# - docker image tag
|
# - docker image tag
|
||||||
- docker push frontend
|
- docker push frontend
|
||||||
|
|
||||||
|
backend image:
|
||||||
|
stage: build images
|
||||||
|
script:
|
||||||
|
# TODO: define make target for this?
|
||||||
|
- make -- --docker-build-backend-build FRADRIVE_SERVICE=backend
|
||||||
|
- docker image save backend | gzip > docker/backend/image.tar.gz
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- docker/backend/image.tar.gz
|
||||||
|
|
||||||
|
backend build:
|
||||||
|
stage: compile
|
||||||
|
needs:
|
||||||
|
- job: backend image
|
||||||
|
artifacts: true
|
||||||
|
- job: frontend build
|
||||||
|
artifacts: true
|
||||||
|
script:
|
||||||
|
- &load-backend-image zcat docker/backend/image.tar.gz | docker image load
|
||||||
|
- make -- --docker-run-backend-build FRADRIVE_SERVICE=backend
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- /fradrive/.stack/
|
||||||
|
- /fradrive/.stack-work/
|
||||||
|
|
||||||
|
backend lint:
|
||||||
|
stage: lint
|
||||||
|
needs:
|
||||||
|
- job: backend image
|
||||||
|
artifacts: true
|
||||||
|
script:
|
||||||
|
- *load-backend-image
|
||||||
|
- make -- --docker-run-backend-lint FRADRIVE_SERVICE=backend
|
||||||
|
cache: *backend-cache
|
||||||
|
|
||||||
|
backend test:
|
||||||
|
stage: test
|
||||||
|
needs:
|
||||||
|
- job: backend image
|
||||||
|
artifacts: true
|
||||||
|
- job: backend build
|
||||||
|
artifacts: true
|
||||||
|
script:
|
||||||
|
- *load-backend-image
|
||||||
|
- make -- --docker-run-backend-test FRADRIVE_SERVICE=backend
|
||||||
|
|
||||||
|
cache: *backend-cache
|
||||||
|
|
||||||
|
push backend image:
|
||||||
|
stage: push images
|
||||||
|
needs:
|
||||||
|
- job: backend image
|
||||||
|
artifacts: true
|
||||||
|
- job: backend build
|
||||||
|
artifacts: false
|
||||||
|
- job: backend test
|
||||||
|
artifacts: false
|
||||||
|
script:
|
||||||
|
- *load-backend-image
|
||||||
|
- docker push backend
|
||||||
|
|
||||||
# frontend dependencies:
|
# frontend dependencies:
|
||||||
# stage: setup
|
# stage: setup
|
||||||
# cache:
|
# cache:
|
||||||
|
|||||||
Reference in New Issue
Block a user