Skip to content

Commit

Permalink
Merge pull request #85 from ogajduse/update-dockerfile-py311
Browse files Browse the repository at this point in the history
Update Dockerfile and GitHub Actions to use Python 3.11
  • Loading branch information
jyejare authored Jan 24, 2023
2 parents a2fe2a5 + 26ad4f2 commit fb78112
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/new_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ jobs:
codechecks:
name: Code Quality
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
steps:
- name: Checkout Cloudwash
uses: actions/checkout@v3

- name: Set Up Python3
- name: Set Up Python-${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
Expand Down Expand Up @@ -53,7 +56,7 @@ jobs:
- name: Set Up Python3
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.11

- name: Setup and Build
run: |
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ jobs:
codechecks:
name: Code Quality
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
steps:
- name: Checkout Cloudwash
uses: actions/checkout@v3

- name: Set Up Python3
- name: Set Up Python-${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
Expand Down
17 changes: 8 additions & 9 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM registry.access.redhat.com/ubi8/python-38:latest
FROM quay.io/fedora/python-311:latest
MAINTAINER "https://github.com/RedHatQE"

ENV VIRTUAL_ENV="/opt/app-root" \
HOME="/opt/app-root/src" \
CLOUDWASH_DIR="/opt/app-root/src/cloudwash" \
# HOME and APP_ROOT come from the base image - https://github.com/sclorg/s2i-python-container
# HOME=/opt/app-root/src
# APP_ROOT=/opt/app-root
ENV CLOUDWASH_DIR="${HOME}/cloudwash" \
PYCURL_SSL_LIBRARY=openssl

USER 0
Expand All @@ -21,13 +22,11 @@ RUN git clone --depth=1 https://github.com/RedHatQE/cloudwash.git && \
RUN /bin/bash -c 'cd ${CLOUDWASH_DIR}; for conffile in conf/*.yaml.template; do cp -- "$conffile" "${conffile%.yaml.template}.yaml"; done'

# adding .profile to environment variables, so it will be kept between shell sessions
RUN echo "source ${VIRTUAL_ENV}/.profile" >> ${VIRTUAL_ENV}/bin/activate && touch ${VIRTUAL_ENV}/.profile
RUN echo "source ${APP_ROOT}/.profile" >> ${APP_ROOT}/bin/activate && touch ${APP_ROOT}/.profile

# arbitrary UID handling starting from virtualenv directory for pip permissions
USER 0
RUN chgrp -R 0 ${VIRTUAL_ENV} && \
chmod -R g+rwX ${VIRTUAL_ENV} && \
fix-permissions ${VIRTUAL_ENV} -P

RUN fix-permissions ${APP_ROOT} -P && \
git config --global --add safe.directory ${CLOUDWASH_DIR}
USER 1001
WORKDIR "${CLOUDWASH_DIR}"

0 comments on commit fb78112

Please sign in to comment.