-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
67 lines (55 loc) · 1.3 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# This file is a template, and might need editing before it works on your project.
# see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options
# you can delete this line if you're not using Docker
stages:
- build
- test
# - package
- release
# before_script:
# after_script:
# - echo "After script section"
# - echo "For example you might do some cleanup here"
variables:
RELEASE_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
BASE_IMAGE: registry.gitlab.com/kosay/xnat/core:1.1
build_code:
image: $BASE_IMAGE
stage: build
script:
- make -j
artifacts:
name: $CI_JOB_NAME-$CI_COMMIT_REF_NAME
paths:
- bin/
- script/
- test/
- Dockerfile
expire_in: 1 day
# build_image:
# stage: package
# image: docker:19.03.1
# services:
# - docker:19.03.1-dind
# script:
# - echo "gitlab registry login"
# - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# - docker build . --cache-from $BASE_IMAGE -t $RELEASE_IMAGE
# - docker push $RELEASE_IMAGE
code_analysis:
stage: test
image: $BASE_IMAGE
script:
- ./script/code_analysis.sh
test:
stage: test
image: $BASE_IMAGE
script:
- ./test/test.sh
release:
stage: release
image: $BASE_IMAGE
script:
- pwd
- ls
- bin/xnat --help