Skip to content

Commit 38e098b

Browse files
authored
Merge pull request #237 from AbdYsn/add-gitlab-ci
Add gitlab CI yaml file
2 parents fc2bb32 + ce7c6fe commit 38e098b

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed

.gitlab-ci.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
stages:
2+
- build
3+
- deploy
4+
- clean
5+
- fs1-testing
6+
- fs6-testing
7+
8+
variables:
9+
NETWORK_OPERATOR_REPO: harbor.mellanox.com/cloud-orchestration
10+
NETWORK_OPERATOR_IMAGE: network-operator
11+
NETWORK_OPERATOR_TAG: qa
12+
CONTAINER_TEST_IMAGE: $NETWORK_OPERATOR_REPO/$NETWORK_OPERATOR_IMAGE:$NETWORK_OPERATOR_TAG
13+
14+
before_script:
15+
- docker login -u $HARBOR_USERNAME -p $HARBOR_PASSWORD harbor.mellanox.com
16+
17+
after_script:
18+
- docker logout harbor.mellanox.com
19+
20+
# Save helm charts as artifacts to be used in the testing
21+
build:
22+
stage: build
23+
rules:
24+
- if: $CI_PIPELINE_SOURCE == "schedule"
25+
- if: $CI_PIPELINE_SOURCE == "web"
26+
script:
27+
- env
28+
artifacts:
29+
paths:
30+
- ./deployment/network-operator
31+
32+
Docker-image-build:
33+
stage: build
34+
rules:
35+
- if: $CI_PIPELINE_SOURCE == "schedule"
36+
- if: $CI_PIPELINE_SOURCE == "web"
37+
script:
38+
- TAG=$CONTAINER_TEST_IMAGE make image
39+
40+
push-image-to-project-registry:
41+
stage: deploy
42+
rules:
43+
- if: $CI_PIPELINE_SOURCE == "schedule"
44+
- if: $CI_PIPELINE_SOURCE == "web"
45+
script:
46+
- docker push $CONTAINER_TEST_IMAGE
47+
48+
clean-image:
49+
stage: clean
50+
rules:
51+
- if: $CI_PIPELINE_SOURCE == "schedule"
52+
- if: $CI_PIPELINE_SOURCE == "web"
53+
script:
54+
- docker rmi $CONTAINER_TEST_IMAGE
55+
56+
# Roce shared mode with MOFED container
57+
test-fs1-on-qa:
58+
stage: fs1-testing
59+
rules:
60+
- if: $CI_PIPELINE_SOURCE == "schedule"
61+
- if: $CI_PIPELINE_SOURCE == "web"
62+
variables:
63+
NETWORK_OPERATOR_REPO: $NETWORK_OPERATOR_REPO
64+
NETWORK_OPERATOR_IMAGE: $NETWORK_OPERATOR_IMAGE
65+
NETWORK_OPERATOR_TAG: $NETWORK_OPERATOR_TAG
66+
REPO_AS_ARTIFACT: "True"
67+
TEST_FS_VAR: 1
68+
trigger:
69+
project: cloud-orchestration/qa/kubernetes/src
70+
strategy: depend
71+
branch: add-dev-template
72+
73+
# SRIOV with MOFED container
74+
test-fs6-on-qa:
75+
stage: fs6-testing
76+
rules:
77+
- if: $CI_PIPELINE_SOURCE == "schedule"
78+
- if: $CI_PIPELINE_SOURCE == "web"
79+
variables:
80+
NETWORK_OPERATOR_REPO: $NETWORK_OPERATOR_REPO
81+
NETWORK_OPERATOR_IMAGE: $NETWORK_OPERATOR_IMAGE
82+
NETWORK_OPERATOR_TAG: $NETWORK_OPERATOR_TAG
83+
REPO_AS_ARTIFACT: "True"
84+
TEST_FS_VAR: 6
85+
trigger:
86+
project: cloud-orchestration/qa/kubernetes/src
87+
strategy: depend
88+
branch: add-dev-template
89+

0 commit comments

Comments
 (0)