Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
ee62c99e
Commit
ee62c99e
authored
8 years ago
by
Antoine Legrand
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #785 from bogdando/pipelines
Add gitlab CI auto builds for triggers
parents
843d4398
8d5da5cf
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+158
-52
158 additions, 52 deletions
.gitlab-ci.yml
docs/test_cases.md
+11
-12
11 additions, 12 deletions
docs/test_cases.md
scripts/gen_matrix.sh
+5
-5
5 additions, 5 deletions
scripts/gen_matrix.sh
with
174 additions
and
69 deletions
.gitlab-ci.yml
+
158
−
52
View file @
ee62c99e
...
@@ -47,7 +47,6 @@ before_script:
...
@@ -47,7 +47,6 @@ before_script:
GS_ACCESS_KEY_ID
:
$GS_KEY
GS_ACCESS_KEY_ID
:
$GS_KEY
GS_SECRET_ACCESS_KEY
:
$GS_SECRET
GS_SECRET_ACCESS_KEY
:
$GS_SECRET
ANSIBLE_KEEP_REMOTE_FILES
:
"
1"
ANSIBLE_KEEP_REMOTE_FILES
:
"
1"
CLUSTER_MODE
:
default
BOOTSTRAP_OS
:
none
BOOTSTRAP_OS
:
none
LOG_LEVEL
:
"
-vv"
LOG_LEVEL
:
"
-vv"
...
@@ -129,33 +128,127 @@ before_script:
...
@@ -129,33 +128,127 @@ before_script:
-e inventory_path=${PWD}/inventory/inventory.ini
-e inventory_path=${PWD}/inventory/inventory.ini
-e cloud_region=${CLOUD_REGION}
-e cloud_region=${CLOUD_REGION}
# Test matrix. Leave the comments for markup scripts.
.coreos_calico_sep_variables
:
&coreos_calico_sep_variables
# stage: deploy-gce-part1
KUBE_NETWORK_PLUGIN
:
calico
CLOUD_IMAGE
:
coreos-stable
CLOUD_REGION
:
us-west1-b
CLUSTER_MODE
:
separated
BOOTSTRAP_OS
:
coreos
.debian8_canal_ha_variables
:
&debian8_canal_ha_variables
# stage: deploy-gce-part1
KUBE_NETWORK_PLUGIN
:
canal
CLOUD_IMAGE
:
debian-8-kubespray
CLOUD_REGION
:
us-east1-b
CLUSTER_MODE
:
ha
.rhel7_weave_variables
:
&rhel7_weave_variables
# stage: deploy-gce-part1
KUBE_NETWORK_PLUGIN
:
weave
CLOUD_IMAGE
:
rhel-7
CLOUD_REGION
:
europe-west1-b
CLUSTER_MODE
:
default
.centos7_flannel_variables
:
¢os7_flannel_variables
# stage: deploy-gce-part2
KUBE_NETWORK_PLUGIN
:
flannel
CLOUD_IMAGE
:
centos-7
CLOUD_REGION
:
us-west1-a
CLUSTER_MODE
:
default
.debian8_calico_variables
:
&debian8_calico_variables
# stage: deploy-gce-part2
KUBE_NETWORK_PLUGIN
:
calico
CLOUD_IMAGE
:
debian-8-kubespray
CLOUD_REGION
:
us-central1-b
CLUSTER_MODE
:
default
.coreos_canal_variables
:
&coreos_canal_variables
# stage: deploy-gce-part2
KUBE_NETWORK_PLUGIN
:
canal
CLOUD_IMAGE
:
coreos-stable
CLOUD_REGION
:
us-east1-b
CLUSTER_MODE
:
default
BOOTSTRAP_OS
:
coreos
.rhel7_canal_sep_variables
:
&rhel7_canal_sep_variables
# stage: deploy-gce-special
KUBE_NETWORK_PLUGIN
:
canal
CLOUD_IMAGE
:
rhel-7
CLOUD_REGION
:
us-east1-b
CLUSTER_MODE
:
separated
.ubuntu_weave_sep_variables
:
&ubuntu_weave_sep_variables
# stage: deploy-gce-special
KUBE_NETWORK_PLUGIN
:
weave
CLOUD_IMAGE
:
ubuntu-1604-xenial
CLOUD_REGION
:
us-central1-b
CLUSTER_MODE
:
separated
.centos7_calico_ha_variables
:
¢os7_calico_ha_variables
# stage: deploy-gce-special
KUBE_NETWORK_PLUGIN
:
calico
CLOUD_IMAGE
:
centos-7
CLOUD_REGION
:
europe-west1-b
CLUSTER_MODE
:
ha
# Builds for PRs only (auto)
coreos-calico-sep
:
coreos-calico-sep
:
stage
:
deploy-gce-part1
stage
:
deploy-gce-part1
<<
:
*job
<<
:
*job
<<
:
*gce
<<
:
*gce
variables
:
variables
:
<<
:
*gce_variables
<<
:
*gce_variables
KUBE_NETWORK_PLUGIN
:
calico
<<
:
*coreos_calico_sep_variables
CLOUD_IMAGE
:
coreos-stable
CLOUD_REGION
:
us-west1-b
CLUSTER_MODE
:
separated
BOOTSTRAP_OS
:
coreos
when
:
on_success
when
:
on_success
except
:
[
'
triggers'
]
except
:
[
'
triggers'
]
only
:
[
/^pr-.*$/
]
only
:
[
/^pr-.*$/
]
centos7-flannel
:
stage
:
deploy-gce-part2
<<
:
*job
<<
:
*gce
variables
:
<<
:
*gce_variables
<<
:
*centos7_flannel_variables
when
:
on_success
except
:
[
'
triggers'
]
only
:
[
/^pr-.*$/
]
ubuntu-weave-sep
:
stage
:
deploy-gce-special
<<
:
*job
<<
:
*gce
variables
:
<<
:
*gce_variables
<<
:
*ubuntu_weave_sep_variables
when
:
on_success
except
:
[
'
triggers'
]
only
:
[
/^pr-.*$/
]
# More builds for PRs/merges (manual) and triggers (auto)
debian8-canal-ha
:
debian8-canal-ha
:
stage
:
deploy-gce-part1
stage
:
deploy-gce-part1
<<
:
*job
<<
:
*job
<<
:
*gce
<<
:
*gce
variables
:
variables
:
<<
:
*gce_variables
<<
:
*gce_variables
KUBE_NETWORK_PLUGIN
:
canal
<<
:
*debian8_canal_ha_variables
CLOUD_IMAGE
:
debian-8-kubespray
CLOUD_REGION
:
us-east1-b
CLUSTER_MODE
:
ha
when
:
manual
when
:
manual
only
:
[
'
master'
,
/^pr-.*$/
,
'
triggers'
]
except
:
[
'
triggers'
]
only
:
[
'
master'
,
/^pr-.*$/
]
debian8-canal-ha-triggers
:
stage
:
deploy-gce-part1
<<
:
*job
<<
:
*gce
variables
:
<<
:
*gce_variables
<<
:
*debian8_canal_ha_variables
when
:
on_success
only
:
[
'
triggers'
]
rhel7-weave
:
rhel7-weave
:
stage
:
deploy-gce-part1
stage
:
deploy-gce-part1
...
@@ -163,26 +256,20 @@ rhel7-weave:
...
@@ -163,26 +256,20 @@ rhel7-weave:
<<
:
*gce
<<
:
*gce
variables
:
variables
:
<<
:
*gce_variables
<<
:
*gce_variables
KUBE_NETWORK_PLUGIN
:
weave
<<
:
*rhel7_weave_variables
CLOUD_IMAGE
:
rhel-7
CLOUD_REGION
:
europe-west1-b
CLUSTER_MODE
:
default
when
:
manual
when
:
manual
only
:
[
'
master'
,
/^pr-.*$/
,
'
triggers'
]
except
:
[
'
triggers'
]
only
:
[
'
master'
,
/^pr-.*$/
]
centos7-flannel
:
rhel7-weave-triggers
:
stage
:
deploy-gce-part
2
stage
:
deploy-gce-part
1
<<
:
*job
<<
:
*job
<<
:
*gce
<<
:
*gce
variables
:
variables
:
<<
:
*gce_variables
<<
:
*gce_variables
KUBE_NETWORK_PLUGIN
:
flannel
<<
:
*rhel7_weave_variables
CLOUD_IMAGE
:
centos-7
CLOUD_REGION
:
us-west1-a
CLUSTER_MODE
:
default
when
:
on_success
when
:
on_success
except
:
[
'
triggers'
]
only
:
[
'
triggers'
]
only
:
[
/^pr-.*$/
]
debian8-calico
:
debian8-calico
:
stage
:
deploy-gce-part2
stage
:
deploy-gce-part2
...
@@ -190,12 +277,20 @@ debian8-calico:
...
@@ -190,12 +277,20 @@ debian8-calico:
<<
:
*gce
<<
:
*gce
variables
:
variables
:
<<
:
*gce_variables
<<
:
*gce_variables
KUBE_NETWORK_PLUGIN
:
calico
<<
:
*debian8_calico_variables
CLOUD_IMAGE
:
debian-8-kubespray
CLOUD_REGION
:
us-central1-b
CLUSTER_MODE
:
default
when
:
manual
when
:
manual
only
:
[
'
master'
,
/^pr-.*$/
,
'
triggers'
]
except
:
[
'
triggers'
]
only
:
[
'
master'
,
/^pr-.*$/
]
debian8-calico-triggers
:
stage
:
deploy-gce-part2
<<
:
*job
<<
:
*gce
variables
:
<<
:
*gce_variables
<<
:
*debian8_calico_variables
when
:
on_success
only
:
[
'
triggers'
]
coreos-canal
:
coreos-canal
:
stage
:
deploy-gce-part2
stage
:
deploy-gce-part2
...
@@ -203,13 +298,20 @@ coreos-canal:
...
@@ -203,13 +298,20 @@ coreos-canal:
<<
:
*gce
<<
:
*gce
variables
:
variables
:
<<
:
*gce_variables
<<
:
*gce_variables
KUBE_NETWORK_PLUGIN
:
canal
<<
:
*coreos_canal_variables
CLOUD_IMAGE
:
coreos-stable
CLOUD_REGION
:
us-east1-b
CLUSTER_MODE
:
default
BOOTSTRAP_OS
:
coreos
when
:
manual
when
:
manual
only
:
[
'
master'
,
/^pr-.*$/
,
'
triggers'
]
except
:
[
'
triggers'
]
only
:
[
'
master'
,
/^pr-.*$/
]
coreos-canal-triggers
:
stage
:
deploy-gce-part2
<<
:
*job
<<
:
*gce
variables
:
<<
:
*gce_variables
<<
:
*coreos_canal_variables
when
:
on_success
only
:
[
'
triggers'
]
rhel7-canal-sep
:
rhel7-canal-sep
:
stage
:
deploy-gce-special
stage
:
deploy-gce-special
...
@@ -217,26 +319,20 @@ rhel7-canal-sep:
...
@@ -217,26 +319,20 @@ rhel7-canal-sep:
<<
:
*gce
<<
:
*gce
variables
:
variables
:
<<
:
*gce_variables
<<
:
*gce_variables
KUBE_NETWORK_PLUGIN
:
canal
<<
:
*rhel7_canal_sep_variables
CLOUD_IMAGE
:
rhel-7
CLOUD_REGION
:
us-east1-b
CLUSTER_MODE
:
separated
when
:
manual
when
:
manual
only
:
[
'
master'
,
/^pr-.*$/
,
'
triggers'
]
except
:
[
'
triggers'
]
only
:
[
'
master'
,
/^pr-.*$/
,]
ubuntu-weave-sep
:
rhel7-canal-sep-triggers
:
stage
:
deploy-gce-special
stage
:
deploy-gce-special
<<
:
*job
<<
:
*job
<<
:
*gce
<<
:
*gce
variables
:
variables
:
<<
:
*gce_variables
<<
:
*gce_variables
KUBE_NETWORK_PLUGIN
:
weave
<<
:
*rhel7_canal_sep_variables
CLOUD_IMAGE
:
ubuntu-1604-xenial
CLOUD_REGION
:
us-central1-b
CLUSTER_MODE
:
separated
when
:
on_success
when
:
on_success
except
:
[
'
triggers'
]
only
:
[
'
triggers'
]
only
:
[
/^pr-.*$/
]
centos7-calico-ha
:
centos7-calico-ha
:
stage
:
deploy-gce-special
stage
:
deploy-gce-special
...
@@ -244,12 +340,22 @@ centos7-calico-ha:
...
@@ -244,12 +340,22 @@ centos7-calico-ha:
<<
:
*gce
<<
:
*gce
variables
:
variables
:
<<
:
*gce_variables
<<
:
*gce_variables
KUBE_NETWORK_PLUGIN
:
calico
<<
:
*centos7_calico_ha_variables
CLOUD_IMAGE
:
centos-7
CLOUD_REGION
:
europe-west1-b
CLUSTER_MODE
:
ha
when
:
manual
when
:
manual
only
:
[
'
master'
,
/^pr-.*$/
,
'
triggers'
]
except
:
[
'
triggers'
]
only
:
[
'
master'
,
/^pr-.*$/
]
centos7-calico-ha-triggers
:
stage
:
deploy-gce-special
<<
:
*job
<<
:
*gce
variables
:
<<
:
*gce_variables
<<
:
*centos7_calico_ha_variables
when
:
on_success
only
:
[
'
triggers'
]
#TODO(bogdando) add coreos-weave and *triggers
syntax-check
:
syntax-check
:
<<
:
*job
<<
:
*job
...
...
This diff is collapsed.
Click to expand it.
docs/test_cases.md
+
11
−
12
View file @
ee62c99e
...
@@ -38,17 +38,16 @@ Gitlab CI test matrix
...
@@ -38,17 +38,16 @@ Gitlab CI test matrix
GCE instances
GCE instances
-------------
-------------
| Stage| Network plugin| OS type| GCE region| Nodes layout
| When|
|
Stage|
Network plugin|
OS type|
GCE region|
Nodes layout
|------------------
|----------------
--|------------------|------------------|------------------
|
------------------|
|--------------------|
--
------------------|------------------
--
|------------------
--|--
------------------|
| part1| calico| coreos-stable| us-west1-b| separated|
on_success|
|
part1|
calico|
coreos-stable|
us-west1-b|
separated|
| part1| canal|debian-8-kubespray| us-east1-b| ha
| manual
|
|
part1|
canal|
debian-8-kubespray|
us-east1-b|
ha|
| part1| weave| rhel-7| europe-west1-b| default|
manual|
|
part1|
weave|
rhel-7|
europe-west1-b|
default|
| part2| flannel| centos-7| us-west1-a| default|
on_success|
|
part2|
flannel|
centos-7|
us-west1-a|
default|
| part2| calico|debian-8-kubespray| us-central1-b| default|
manual|
|
part2|
calico|
debian-8-kubespray|
us-central1-b|
default|
| part2| canal| coreos-stable| us-east1-b| default|
manual|
|
part2|
canal|
coreos-stable|
us-east1-b|
default|
| special| canal| rhel-7| us-east1-b| separated|
manual|
|
special|
canal|
rhel-7|
us-east1-b|
separated|
| special| weave|ubuntu-1604-xenial| us-central1-b| separated|
on_success|
|
special|
weave|
ubuntu-1604-xenial|
us-central1-b|
separated|
| special| calico| centos-7| europe-west1-b| ha
| manual
|
|
special|
calico|
centos-7|
europe-west1-b|
ha|
The "Stage" means a build step of the build pipeline. The steps are ordered as
`part1->part2->special`
.
The "Stage" means a build step of the build pipeline. The steps are ordered as
`part1->part2->special`
.
The "When" stands for the build step trigger condition.
This diff is collapsed.
Click to expand it.
scripts/gen_matrix.sh
+
5
−
5
View file @
ee62c99e
...
@@ -12,13 +12,13 @@ for i in `echo $a`; do
...
@@ -12,13 +12,13 @@ for i in `echo $a`; do
done
done
echo
echo
a
=
$(
perl
-ne
'/^\s
{2}(
stage:\sdeploy-gce-
|when:\s)
(\S+)$/ && print "$
2
\n";/^\s{
4
}(CLOUD_IMAGE|KUBE_NETWORK_PLUGIN|CLOUD_REGION|CLUSTER_MODE):\s(\S+)$/ && print "$2\n"'
.gitlab-ci.yml
)
a
=
$(
perl
-ne
'/^
#
\sstage:\sdeploy-gce-(\S+)$/ && print "$
1
\n";/^\s{
2
}(CLOUD_IMAGE|KUBE_NETWORK_PLUGIN|CLOUD_REGION|CLUSTER_MODE):\s(\S+)$/ && print "$2\n"'
.gitlab-ci.yml
)
echo
Gitlab-CI
echo
Gitlab-CI
printf
"|%
18
s|%
18s|%18
s|%
18
s|%
18
s|%
18s|
\n
"
"Stage"
"Network plugin"
"OS type"
"GCE region"
"Nodes layout"
"When"
printf
"|%
20
s|%
20
s|%
20
s|%
20
s|%
20s
\n
"
"Stage"
"Network plugin"
"OS type"
"GCE region"
"Nodes layout"
echo
"|------------------
|----------------
--|------------------|------------------|------------------
|
------------------|"
echo
"|--------------------|
--
------------------|------------------
--
|------------------
--|--
------------------|"
c
=
0
c
=
0
for
i
in
`
echo
$a
`
;
do
for
i
in
`
echo
$a
`
;
do
printf
"|%
18
s"
$i
printf
"|%
20
s"
$i
[
$((
$c
%
6
))
-eq
5
]
&&
printf
"|
\n
"
[
$((
$c
%
5
))
-eq
4
]
&&
printf
"|
\n
"
c
=
$((
c
+
1
))
c
=
$((
c
+
1
))
done
done
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment