-
Notifications
You must be signed in to change notification settings - Fork 27
/
.gitlab-ci.yml
40 lines (35 loc) · 990 Bytes
/
.gitlab-ci.yml
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
32
33
34
35
36
37
38
39
40
stages:
- prepare
- build
- test
variables:
DOCKER_FILE: Dockerfile
DOCKER_TAG: latest
DOCKER_IMAGE: ${CI_REGISTRY_IMAGE}
GIT_SUBMODULE_STRATEGY: normal
.prepare:docker: &prepare_docker
stage: prepare
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [ "" ]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"username\":\"${CI_REGISTRY_USER}\",\"password\":\"${CI_REGISTRY_PASSWORD}\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context ${CI_PROJECT_DIR} --dockerfile ${CI_PROJECT_DIR}/${DOCKER_FILE} --destination ${DOCKER_IMAGE}:${DOCKER_TAG} --snapshotMode=redo --cache=true
when: manual
prepare:docker:
<<: *prepare_docker
build:kernel:
stage: build
image: ${CI_REGISTRY_IMAGE}
script:
- cargo build
artifacts:
paths:
- target/x86_64-eduos/debug/eduos-rs
test:kernel:
stage: test
dependencies:
- build:kernel
image: ${CI_REGISTRY_IMAGE}
script: ./test.sh