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
c187ae22
Commit
c187ae22
authored
7 years ago
by
Antoine Legrand
Browse files
Options
Downloads
Patches
Plain Diff
Force to /usr/bin/python in CI
parent
cb202a76
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+6
-4
6 additions, 4 deletions
.gitlab-ci.yml
Dockerfile
+9
-10
9 additions, 10 deletions
Dockerfile
tests/Makefile
+2
-3
2 additions, 3 deletions
tests/Makefile
tests/requirements.txt
+1
-0
1 addition, 0 deletions
tests/requirements.txt
with
18 additions
and
17 deletions
.gitlab-ci.yml
+
6
−
4
View file @
c187ae22
...
...
@@ -16,7 +16,7 @@ variables:
GS_ACCESS_KEY_ID
:
$GS_KEY
GS_SECRET_ACCESS_KEY
:
$GS_SECRET
CONTAINER_ENGINE
:
docker
SSH_USER
:
$GCE_USER
SSH_USER
:
root
GCE_PREEMPTIBLE
:
"
false"
ANSIBLE_KEEP_REMOTE_FILES
:
"
1"
ANSIBLE_CONFIG
:
./tests/ansible.cfg
...
...
@@ -34,14 +34,14 @@ variables:
# us-west1-a
before_script
:
-
pip install -r tests/requirements.txt
-
/usr/bin/python -m
pip install -r tests/requirements.txt
-
mkdir -p /.ssh
.job
:
&job
tags
:
-
kubernetes
-
docker
image
:
quay.io/kubespray/kubespray:
master
image
:
quay.io/kubespray/kubespray:
latest
.docker_service
:
&docker_service
services
:
...
...
@@ -61,6 +61,7 @@ before_script:
.do_variableS
:
&do_variables
PRIVATE_KEY
:
$DO_PRIVATE_KEY
CI_PLATFORM
:
"
do"
SSH_USER
:
root
.testcases
:
&testcases
...
...
@@ -73,7 +74,8 @@ before_script:
-
$HOME/.cache
before_script
:
-
docker info
-
pip install -r tests/requirements.txt
-
/usr/bin/python -m pip install -r requirements.txt
-
/usr/bin/python -m pip install -r tests/requirements.txt
-
mkdir -p /.ssh
-
mkdir -p $HOME/.ssh
-
ansible-playbook --version
...
...
This diff is collapsed.
Click to expand it.
Dockerfile
+
9
−
10
View file @
c187ae22
FROM
python:2.7.14-stretch
FROM
ubuntu:16.04
RUN
mkdir
/kubespray
WORKDIR
/kubespray
RUN
apt update
-y
&&
\
apt
install
-y
\
libssl-dev python-dev sshpass apt-transport-https
\
ca-certificates curl gnupg2 software-properties-common
RUN
curl
-fsSL
https://download.docker.com/linux/
$(
.
/etc/os-release
;
echo
"
$ID
"
)
/gpg | apt-key add -
&&
\
add-apt-repository
\
"deb [arch=amd64] https://download.docker.com/linux/
$(
.
/etc/os-release
;
echo
"
$ID
"
)
\
$(
lsb_release
-cs
)
\
stable"
\
&&
apt update
-y
&&
apt-get
install
docker-ce
-y
ca-certificates curl gnupg2 software-properties-common python-pip
RUN
curl
-fsSL
https://download.docker.com/linux/ubuntu/gpg | apt-key add -
&&
\
add-apt-repository
\
"deb [arch=amd64] https://download.docker.com/linux/ubuntu
\
$(
lsb_release
-cs
)
\
stable"
\
&&
apt update
-y
&&
apt-get
install
docker-ce
-y
COPY
. .
RUN
pip
install
-r
tests/requirements.txt
&&
pip
install
-r
requirements.txt
RUN
/usr/bin/python
-m
pip
install
pip
-U
&&
/usr/bin/python
-m
pip
install
-r
tests/requirements.txt
&&
python
-m
pip
install
-r
requirements.txt
This diff is collapsed.
Click to expand it.
tests/Makefile
+
2
−
3
View file @
c187ae22
...
...
@@ -5,10 +5,9 @@ $(HOME)/.ssh/id_rsa:
init-gce
:
$(HOME)/.ssh/id_rsa
# echo
$(
GCE_PEM_FILE
)
|
base64
-d
>
$(
HOME
)
/.ssh/gce
echo
"
$(
GCE_CREDENTIALS_B64
)
"
>
$(
HOME
)
/.ssh/gce.json
echo
"
$(
GCE_CREDENTIALS_B64
)
"
|
base64
-d
>
$(
HOME
)
/.ssh/gce.json
init-do
:
$(HOME)/.ssh/id_rsa
pip
install
dopy
==
0.3.5
echo
$(
DO_PRIVATE_KEY
)
|
base64
-d
>
$(
HOME
)
/.ssh/id_rsa
create-gce
:
init-gce
...
...
@@ -43,7 +42,7 @@ create-do: init-do
delete-do
:
ansible-playbook
-i
../inventory/sample/hosts.ini cloud_playbooks/create-do.yml
-c
local
\
$LOG_LEVEL
\
$
(
LOG_LEVEL
)
\
-e
@
"files/
${
CI_JOB_NAME
}
.yml"
\
-e
state
=
absent
\
-e
test_id
=
${
TEST_ID
}
\
...
...
This diff is collapsed.
Click to expand it.
tests/requirements.txt
+
1
−
0
View file @
c187ae22
...
...
@@ -3,3 +3,4 @@ yamllint
apache-libcloud==2.2.1
boto==2.9.0
tox
dopy
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