-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
53 lines (48 loc) · 1.81 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
stages:
- Build
- Package
before_script:
- export BASE_URL=${BASE_URL:-$(echo $CI_PROJECT_URL | cut -d'/' -f1-3)}
- export CI_COMMIT_SHA_SHORT=$(echo ${CI_COMMIT_SHA} | cut -c -8)
- >
if [ -z "$CROSS_CLOUD_YML" ] && [ -z "$DASHBOARD_API_HOST_PORT" ]; then
export CROSS_CLOUD_YML="https://raw.githubusercontent.com/CrossCloudCI/cncf-configuration/master/cross-cloud.yml"
export DASHBOARD_API_HOST_PORT="devapi.cncf.ci"
fi
- >
if ruby -v ; then
echo 'Ruby found, not using rvm'
cp -a /opt/local/dashboard /dashboard
pushd /dashboard
source /opt/local/.env
bundle install
./bin/update_dashboard
popd
else
source /opt/local/etc/rvmrc
source /opt/local/etc/profile.d/rvm.sh
cp -a /opt/local/dashboard /dashboard
pushd /dashboard
source /opt/local/.env
rvm use ruby-2.6.3
bundle install
./bin/update_dashboard
popd
fi
compile:
stage: Build
image: "crosscloudci/debian-ruby-docker"
script:
- >
if [ "$BASE_URL" == "https://gitlab.cncf.ci" ]; then
echo curl -f -X GET "https://productionapi.cncf.ci/ciproxy/v1/ci_status_build/commit_ref?project=${CI_PROJECT_NAME}&ref=${CI_COMMIT_SHA}&arch=$ARCH"
curl -f -X GET "https://productionapi.cncf.ci/ciproxy/v1/ci_status_build/commit_ref?project=${CI_PROJECT_NAME}&ref=${CI_COMMIT_SHA}&arch=$ARCH"
else
echo curl -f -X GET "https://devapi.cncf.ci/ciproxy/v1/ci_status_build/commit_ref?project=${CI_PROJECT_NAME}&ref=${CI_COMMIT_SHA}&arch=$ARCH"
curl -f -X GET "https://devapi.cncf.ci/ciproxy/v1/ci_status_build/commit_ref?project=${CI_PROJECT_NAME}&ref=${CI_COMMIT_SHA}&arch=$ARCH"
fi
container:
stage: Package
image: crosscloudci/debian-docker
script:
- echo 'Dummy Job'