This repository has been archived by the owner on Jun 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 87
/
.gitlab-ci.yml
103 lines (81 loc) · 3.02 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#
# Copyright (c) 2020 Seagate Technology LLC and/or its Affiliates
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# For any questions about this software or licensing,
# please email [email protected] or [email protected].
#
# Globals ----------------------------------------------------------------- {{{1
#
variables:
GIT_DEPTH: 2 # clone only the current commit and its parent
# (parent is needed to satisfy `git clang-format --diff --commit HEAD~1`)
GIT_STRATEGY: clone # make a fresh `git clone` of the repo for every new CI job
GIT_SUBMODULE_STRATEGY: normal # init and check out submodules
CENTOS_RELEASE: cortx
M0_VG_NO_SYMLINKS: 'true'
WORKSPACE_NAME: "${CI_PROJECT_NAME}${CI_PIPELINE_ID}"
WORKSPACE_DIR: "/home/gitlab-runner/workspaces/${CI_PROJECT_NAME}${CI_PIPELINE_ID}"
stages:
- build
before_script:
- date -u -Isec
- git --no-pager log -1 --pretty=fuller
- printenv
after_script:
- date -u -Isec
# Build ------------------------------------------------------------------- {{{1
#
build:
stage: build
tags: [ docker-build ]
except: [ main, tags ]
image: registry.gitlab.mero.colo.seagate.com/motr/s3server:$CENTOS_RELEASE
script:
- export LATEST_RELEASE_DIR="$(ls -td /releases/main/B* | head -n1)"
- yum install -y $LATEST_RELEASE_DIR/cortx-motr{,-devel}-[0-9]*.rpm
- time ./rebuildall.sh --no-install
rpmbuild:s3server:
stage: build
tags: [ docker-build ]
except: [ main, tags ]
image: registry.gitlab.mero.colo.seagate.com/motr/s3server:$CENTOS_RELEASE
script:
- export LATEST_RELEASE_DIR="$(ls -td /releases/main/B* | head -n1)"
- yum install -y $LATEST_RELEASE_DIR/cortx-motr{,-devel}-[0-9]*.rpm
# disable this nasty script that tries to update submodules and expects
# the source dir to be a real git repo
- echo '#!/bin/bash' > refresh_thirdparty.sh
- time python3_other_pkgversion=36 ./rpms/s3/buildrpm.sh -P $PWD
# Docker images ----------------------------------------------------------- {{{1
#
docker:rebuild-images:
stage: build
tags: [ docker-image-build ]
when: manual
except: [ schedules ]
variables:
DOCKER_IMAGE_TAG: 7
script:
- make -C scripts/docker/ docker-image-$DOCKER_IMAGE_TAG
- make -C scripts/docker/ push tag="${DOCKER_IMAGE_TAG}*"
docker:rebuild-images:76:
extends: docker:rebuild-images
variables:
DOCKER_IMAGE_TAG: '7.6'
docker:rebuild-images:cortx:
extends: docker:rebuild-images
variables:
DOCKER_IMAGE_TAG: cortx
# vim: foldmethod=marker shiftwidth=2 tabstop=2 expandtab