Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for OpenSUSE Leap 15.3 #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added support for OpenSUSE Leap 15.3
  • Loading branch information
CPete88 committed Dec 5, 2021
commit ceb7293ec3924352e5846739446336128124b034
6 changes: 6 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -104,6 +104,12 @@ test-arch:
- job: make-image-arch
image: $CI_REGISTRY_IMAGE/archlinux:branch-$CI_COMMIT_REF_SLUG

test-opensuse-leap-153:
extends: test-deb
needs:
- job: make-image-arch
image: $CI_REGISTRY_IMAGE/opensuse-leap-153:branch-$CI_COMMIT_REF_SLUG

test-fed33:
extends: test-deb
needs:
50 changes: 50 additions & 0 deletions Dockerfile.opensuse-leap-153
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
FROM IMAGE_URL_OPENSUSE_LEAP_153
RUN zypper update -y

RUN zypper install -y \
gcc \
sudo \
rpm-build \
rpm-devel \
rpmlint \
make \
python3 \
python3-pip \
bash \
coreutils \
diffutils \
patch \
rpmdevtools \
rpm \
vim \
openssl-1_1 \
libopenssl-1_1-devel

RUN zypper install -y \
python3-requests \
python3-pyOpenSSL \
python3-bcrypt \
python3-python-gnupg

RUN zypper install -y \
python3-pytest \
python3-pytest-cov

RUN zypper install -y \
system-group-wheel \
system-user-mail

RUN groupadd user
RUN useradd -ms /bin/bash user
RUN usermod -a -G user user
RUN usermod -a -G wheel user
RUN echo '%wheel ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

COPY docker_entry.sh /usr/local/bin
COPY . /home/user/proton-python-client

RUN chown -R user:user /home/user/
USER user
WORKDIR /home/user/proton-python-client

ENTRYPOINT ["/usr/local/bin/docker_entry.sh"]
32 changes: 26 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -17,8 +17,9 @@ IMAGE_URL_FED33 = fedora:33
IMAGE_URL_FED34 = fedora:34
IMAGE_URL_FED35 = fedora:35
IMAGE_URL_ARCH = archlinux:latest
IMAGE_URL_OPENSUSE_LEAP_153 = opensuse/leap:15.3

base: image-deb image-fed33 image-fed34 image-fed35 image-arch
base: image-deb image-fed33 image-fed34 image-fed35 image-arch image-opensuse-leap-153

# Create the image based on ubuntu
image-deb: image
@@ -30,6 +31,11 @@ image-arch: image
image-arch: DOCKER_FILE_SOURCE = Dockerfile.arch
image-arch: src = archlinux

# Create the image based on opensuse leap 15.3
image-arch: image
image-arch: DOCKER_FILE_SOURCE = Dockerfile.opensuse-leap-153
image-arch: src = opensuse-leap-153

# Create the image based on fedora 33
image-fed33: image
image-fed33: DOCKER_FILE_SOURCE = Dockerfile.fed33
@@ -53,7 +59,7 @@ image: requirements.txt docker-source

## We host our own copy of the image ubuntu:latest
docker-source:
sed "s|IMAGE_URL_FED33|$(IMAGE_URL_FED33)|; s|IMAGE_URL_FED34|$(IMAGE_URL_FED34)|; s|IMAGE_URL_FED35|$(IMAGE_URL_FED35)|; s|IMAGE_URL_DEB|$(IMAGE_URL_DEB)|; s|IMAGE_URL_ARCH|$(IMAGE_URL_ARCH)|" $(DOCKER_FILE_SOURCE) > /tmp/Dockerfile.image
sed "s|IMAGE_URL_FED33|$(IMAGE_URL_FED33)|; s|IMAGE_URL_FED34|$(IMAGE_URL_FED34)|; s|IMAGE_URL_FED35|$(IMAGE_URL_FED35)|; s|IMAGE_URL_DEB|$(IMAGE_URL_DEB)|; s|IMAGE_URL_OPENSUSE_LEAP_153|$(IMAGE_URL_OPENSUSE_LEAP_153)|; s|IMAGE_URL_ARCH|$(IMAGE_URL_ARCH)|" $(DOCKER_FILE_SOURCE) > /tmp/Dockerfile.image

requirements.txt:
@ touch requirements.txt
@@ -71,7 +77,7 @@ local: docker-source
@ rm -rf __SOURCE_APP || true
local: NAME_IMAGE = proton-python-client:latest

local-base: local-deb local-fed33 local-fed34 local-fed35 local-arch
local-base: local-deb local-fed33 local-fed34 local-fed35 local-arch image-opensuse-leap-153

local-deb: local
local-deb: DOCKER_FILE_SOURCE = Dockerfile.deb
@@ -85,6 +91,9 @@ local-fed34: DOCKER_FILE_SOURCE = Dockerfile.fed34
local-fed35: local
local-fed35: DOCKER_FILE_SOURCE = Dockerfile.fed35

local-opensuse-leap-153: local
local-opensuse-leap-153: DOCKER_FILE_SOURCE = Dockerfile.opensuse-leap-153

local-arch: local
local-arch: DOCKER_FILE_SOURCE = Dockerfile.arch

@@ -119,7 +128,7 @@ test-fed33: local-fed33
--volume $(PWD)/.env:/home/user/proton-python-client.env \
proton-python-client:latest \
python3 -m pytest

test-fed34: local-fed34
# Keep -it because with colors it's better
@ docker run \
@@ -129,7 +138,7 @@ test-fed34: local-fed34
--volume $(PWD)/.env:/home/user/proton-python-client.env \
proton-python-client:latest \
python3 -m pytest

test-fed35: local-fed35
# Keep -it because with colors it's better
@ docker run \
@@ -139,7 +148,7 @@ test-fed35: local-fed35
--volume $(PWD)/.env:/home/user/proton-python-client.env \
proton-python-client:latest \
python3 -m pytest

## Run tests against the latest version of the image from your code
test-arch: local-arch
# Keep -it because with colors it's better
@@ -150,3 +159,14 @@ test-arch: local-arch
--volume $(PWD)/.env:/home/user/proton-python-client.env \
proton-python-client:latest \
python3 -m pytest

## Run tests against the latest version of the image from your code
test-opensuse-leap-15-3: local-arch
# Keep -it because with colors it's better
@ docker run \
--rm \
-it \
--privileged \
--volume $(PWD)/.env:/home/user/proton-python-client.env \
proton-python-client:latest \
python3 -m pytest