-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
68 lines (61 loc) · 3.04 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
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" ]; then
if [ "$BASE_URL" == "https://gitlab.cncf.ci" ]; then
export CROSS_CLOUD_YML="https://raw.githubusercontent.com/CrossCloudCI/cncf-configuration/production/cross-cloud.yml"
elif [ "$BASE_URL" == "https://gitlab.staging.cncf.ci" ]; then
export CROSS_CLOUD_YML="https://raw.githubusercontent.com/CrossCloudCI/cncf-configuration/staging/cross-cloud.yml"
elif [ "$BASE_URL" == "https://gitlab.cidev.cncf.ci" ]; then
export CROSS_CLOUD_YML="https://raw.githubusercontent.com/CrossCloudCI/cncf-configuration/integration/cross-cloud.yml"
else
export CROSS_CLOUD_YML="https://raw.githubusercontent.com/CrossCloudCI/cncf-configuration/master/cross-cloud.yml"
fi
else
export CROSS_CLOUD_YML="$CROSS_CLOUD_YML"
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
./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"
elif [ "$BASE_URL" == "https://gitlab.staging.cncf.ci" ]; then
echo curl -f -X GET "https://stagingapi.cncf.ci/ciproxy/v1/ci_status_build/commit_ref?project=${CI_PROJECT_NAME}&ref=${CI_COMMIT_SHA}&arch=$ARCH"
curl -f -X GET "https://stagingapi.cncf.ci/ciproxy/v1/ci_status_build/commit_ref?project=${CI_PROJECT_NAME}&ref=${CI_COMMIT_SHA}&arch=$ARCH"
elif [ "$BASE_URL" == "https://gitlab.cidev.cncf.ci" ]; then
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"
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'