Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xavier Thompson
slapos.buildout
Commits
0df9bb06
Commit
0df9bb06
authored
May 05, 2021
by
Godefroid Chapelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: pip 21.1 complains when run as root
Solution: run tests as another user
parent
642e3023
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
26 deletions
+42
-26
.github/workflows/Dockerfile
.github/workflows/Dockerfile
+12
-7
.github/workflows/Dockerfile-debian
.github/workflows/Dockerfile-debian
+12
-7
.github/workflows/Dockerfile-debian-system
.github/workflows/Dockerfile-debian-system
+11
-6
Makefile
Makefile
+3
-3
builds/centos_containers/ci_build.sh
builds/centos_containers/ci_build.sh
+1
-1
builds/debian_containers/ci_build.sh
builds/debian_containers/ci_build.sh
+1
-1
builds/debian_sys_container/ci_build.sh
builds/debian_sys_container/ci_build.sh
+1
-1
dev.py
dev.py
+1
-0
No files found.
.github/workflows/Dockerfile
View file @
0df9bb06
FROM
centos as centos-python
RUN
yum
install
-y
make gcc openssl-devel libffi-devel sqlite-devel glibc-langpack-en
RUN
useradd
-ms
/bin/bash buildout
USER
buildout
ARG
PYTHON_VER
ENV
LC_ALL C.UTF-8
RUN
mkdir
buildout
WORKDIR
/
buildout
COPY
Makefile Makefile.configure /
buildout
/
RUN
mkdir
/home/buildout/sandbox
WORKDIR
/
home/buildout/sandbox
COPY
Makefile Makefile.configure /
home/buildout/sandbox
/
RUN
make
PYTHON_VER
=
${
PYTHON_VER
}
download_python
RUN
make
PYTHON_VER
=
${
PYTHON_VER
}
python
FROM
centos-python
ARG
PYTHON_VER
COPY
doc /buildout/doc
COPY
src /buildout/src
COPY
zc.recipe.egg_ /buildout/zc.recipe.egg_
COPY
setup.* dev.py *.rst *.txt buildout.cfg .coveragerc /buildout/
COPY
doc /home/buildout/sandbox/doc
COPY
src /home/buildout/sandbox/src
COPY
zc.recipe.egg_ /home/buildout/sandbox/zc.recipe.egg_
COPY
setup.* dev.py *.rst *.txt buildout.cfg .coveragerc /home/buildout/sandbox/
USER
root
RUN
chown
-R
buildout:buildout
*
USER
buildout
RUN
make
PYTHON_VER
=
${
PYTHON_VER
}
build
.github/workflows/Dockerfile-debian
View file @
0df9bb06
FROM debian:stable-slim as debian-python
RUN apt-get update
RUN apt-get install -y make gcc openssl libffi-dev curl zlib1g-dev libssl-dev libsqlite3-dev
RUN useradd -ms /bin/bash buildout
USER buildout
ARG PYTHON_VER
ENV LANG C.UTF-8
RUN mkdir
buildout
WORKDIR /
buildout
COPY Makefile Makefile.configure /
buildout
/
RUN mkdir
/home/buildout/sandbox
WORKDIR /
home/buildout/sandbox
COPY Makefile Makefile.configure /
home/buildout/sandbox
/
RUN make PYTHON_VER=${PYTHON_VER} download_python
RUN make PYTHON_VER=${PYTHON_VER} python
FROM debian-python
ARG PYTHON_VER
COPY doc /buildout/doc
COPY src /buildout/src
COPY zc.recipe.egg_ /buildout/zc.recipe.egg_
COPY setup.* dev.py *.rst *.txt buildout.cfg .coveragerc /buildout/
COPY doc /home/buildout/sandbox/doc
COPY src /home/buildout/sandbox/src
COPY zc.recipe.egg_ /home/buildout/sandbox/zc.recipe.egg_
COPY setup.* dev.py *.rst *.txt buildout.cfg .coveragerc /home/buildout/sandbox/
USER root
RUN chown -R buildout:buildout *
USER buildout
RUN make PYTHON_VER=${PYTHON_VER} build
.github/workflows/Dockerfile-debian-system
View file @
0df9bb06
FROM debian:stable-slim as debian-python
RUN apt-get update
RUN apt-get install -y gcc python3-dev python3-certifi
RUN mkdir buildout
WORKDIR /buildout
RUN useradd -ms /bin/bash buildout
USER buildout
RUN mkdir /home/buildout/sandbox
WORKDIR /home/buildout/sandbox
FROM debian-python
ARG PYTHON_VER
COPY doc /buildout/doc
COPY src /buildout/src
COPY zc.recipe.egg_ /buildout/zc.recipe.egg_
COPY setup.* dev.py *.rst *.txt buildout.cfg .coveragerc /buildout/
COPY doc /home/buildout/sandbox/doc
COPY src /home/buildout/sandbox/src
COPY zc.recipe.egg_ /home/buildout/sandbox/zc.recipe.egg_
COPY setup.* dev.py *.rst *.txt buildout.cfg .coveragerc /home/buildout/sandbox/
USER root
RUN chown -R buildout:buildout *
USER buildout
RUN python3 dev.py
Makefile
View file @
0df9bb06
...
...
@@ -131,15 +131,15 @@ all_test:
docker
:
docker build
-f
.github/workflows/Dockerfile
--tag
centos_buildout:python
${PYTHON_VER}
--build-arg
PYTHON_VER
=
${PYTHON_VER}
.
docker run centos_buildout:python
${PYTHON_VER}
/bin/bash
-c
'RUN_COVERAGE= COVERAGE_REPORT= /
buildout
/bin/test -c -vvv -t abi'
docker run centos_buildout:python
${PYTHON_VER}
/bin/bash
-c
'RUN_COVERAGE= COVERAGE_REPORT= /
home/buildout/sandbox
/bin/test -c -vvv -t abi'
docker_deb
:
docker build
-f
.github/workflows/Dockerfile-debian
--tag
debian_buildout:python
${PYTHON_VER}
--build-arg
PYTHON_VER
=
${PYTHON_VER}
.
docker run debian_buildout:python
${PYTHON_VER}
/bin/bash
-c
'RUN_COVERAGE= COVERAGE_REPORT= /
buildout
/bin/test -c -vvv -t abi'
docker run debian_buildout:python
${PYTHON_VER}
/bin/bash
-c
'RUN_COVERAGE= COVERAGE_REPORT= /
home/buildout/sandbox
/bin/test -c -vvv -t abi'
docker_deb_sys
:
docker build
-f
.github/workflows/Dockerfile-debian-system
--tag
debian_system_buildout .
docker run debian_system_buildout /bin/bash
-c
'RUN_COVERAGE= COVERAGE_REPORT= /
buildout
/bin/test -c -vvv -t abi'
docker run debian_system_buildout /bin/bash
-c
'RUN_COVERAGE= COVERAGE_REPORT= /
home/buildout/sandbox
/bin/test -c -vvv -t abi'
clean
:
rm
-rf
$(HERE)
/venvs
$(PYTHON_BUILD_DIR)
$(HERE)
/pythons
builds/centos_containers/ci_build.sh
View file @
0df9bb06
...
...
@@ -5,4 +5,4 @@ set -e
cd
../..
docker build
-f
.github/workflows/Dockerfile
--tag
centos_buildout:python
${
PYTHON_VER
}
--build-arg
PYTHON_VER
=
${
PYTHON_VER
}
.
docker run centos_buildout:python
${
PYTHON_VER
}
/bin/bash
-c
'RUN_COVERAGE= COVERAGE_REPORT= /
buildout
/bin/test -c -vvv'
docker run centos_buildout:python
${
PYTHON_VER
}
/bin/bash
-c
'RUN_COVERAGE= COVERAGE_REPORT= /
home/buildout/sandbox
/bin/test -c -vvv'
builds/debian_containers/ci_build.sh
View file @
0df9bb06
...
...
@@ -5,4 +5,4 @@ set -e
cd
../..
docker build
-f
.github/workflows/Dockerfile-debian
--tag
debian_buildout:python
${
PYTHON_VER
}
--build-arg
PYTHON_VER
=
${
PYTHON_VER
}
.
docker run debian_buildout:python
${
PYTHON_VER
}
/bin/bash
-c
'RUN_COVERAGE= COVERAGE_REPORT= /
buildout
/bin/test -c -vvv'
docker run debian_buildout:python
${
PYTHON_VER
}
/bin/bash
-c
'RUN_COVERAGE= COVERAGE_REPORT= /
home/buildout/sandbox
/bin/test -c -vvv'
builds/debian_sys_container/ci_build.sh
View file @
0df9bb06
...
...
@@ -5,4 +5,4 @@ set -e
cd
../..
docker build
-f
.github/workflows/Dockerfile-debian-system
--tag
debian_system_buildout
.
docker run debian_system_buildout /bin/bash
-c
'RUN_COVERAGE= COVERAGE_REPORT= /
buildout
/bin/test -c -vvv'
docker run debian_system_buildout /bin/bash
-c
'RUN_COVERAGE= COVERAGE_REPORT= /
home/buildout/sandbox
/bin/test -c -vvv'
dev.py
View file @
0df9bb06
...
...
@@ -38,6 +38,7 @@ if os.path.isfile(bin_buildout):
if
os
.
path
.
isdir
(
'build'
):
shutil
.
rmtree
(
'build'
)
print
(
"Current directory %s"
%
os
.
getcwd
())
#######################################################################
def
install_pip
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment