-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
41 lines (39 loc) · 1.14 KB
/
.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
41
default:
tags:
- saas-linux-medium-amd64
meta-build-image:
timeout: 2h
image: docker:stable
services:
- docker:dind
stage: build
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- export DOCKER_CLI_EXPERIMENTAL=enabled
# Get a hash of the files that affect the build image
- export BUILD_IMAGE_HASH=$(echo -n "$(cat Cargo.toml .meta/build-image/Dockerfile gradle/libs.versions.toml)" | md5sum | cut -c1-8)
- export BUILD_IMAGE=$CI_REGISTRY_IMAGE/build-image:$BUILD_IMAGE_HASH
# Write BUILD_IMAGE to build.env
- echo "BUILD_IMAGE=$BUILD_IMAGE" > build.env
- >
if ! docker manifest inspect $BUILD_IMAGE; then
docker build -t $BUILD_IMAGE -f ./.meta/build-image/Dockerfile .
docker push $BUILD_IMAGE
fi
artifacts:
reports:
dotenv: build.env
build-all:
timeout: 2h
image: $BUILD_IMAGE
stage: test
script:
- cargo build --verbose
- cargo test --verbose
- ./gradlew :build-logic:gradle-plugin:test
- ./gradlew build
- ./gradlew clean
artifacts:
when: always
reports:
junit: '**/test-results/*Test/*.xml'