blob: 8b97ff37f21bcd4f20765edc2e931acf916328b5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
stages:
- build
- container
build_and_test:
image: rust:alpine3.16
variables:
CARGO_HOME: ${CI_PROJECT_DIR}/.cargo
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- target/
- .cargo/bin
- .cargo/registry/index
- .cargo/registry/cache
stage: build
before_script:
- apk add openssl openssl-dev musl-dev sqlite
script:
- cargo build
- cargo test
container:
image: docker:stable
stage: container
script:
- docker build . -t $CI_REGISTRY_IMAGE
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push $CI_REGISTRY_IMAGE
|