Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: thoth-station/s2i-thoth
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.34.0
Choose a base ref
...
head repository: thoth-station/s2i-thoth
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.lock
a/*
b/*
.vscode/
6 changes: 2 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.3.0
rev: v1.5.1
hooks:
- id: remove-tabs

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: check-merge-conflict
@@ -16,5 +16,3 @@ repos:
- id: check-case-conflict
- id: detect-private-key
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
24 changes: 12 additions & 12 deletions .prow.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
presubmits:
- name: pre-commit
decorate: true
skip_report: false
always_run: true
context: aicoe-ci/prow/pre-commit
spec:
containers:
- image: quay.io/thoth-station/thoth-precommit-py38:v0.14.3
command:
- "pre-commit"
- "run"
- "--all-files"
- always_run: true
context: op1st/prow/pre-commit
decorate: true
name: pre-commit
skip_report: false
spec:
containers:
- command:
- pre-commit
- run
- --all-files
image: quay.io/thoth-station/thoth-precommit-py38:v0.15.0
44 changes: 32 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
s2i-thoth
---------


**HIBERNATION NOTICE**: The Project is currently hibernating. If you are interested
in contributing to is, or if you have urgent issues that need to be fixed, please
reach out to the Thoth team via `an support issue <https://github.com/thoth-station/support/issues/new/choose>`_.


.. |s2i-thoth-ubi8-py39 on Quay| image:: https://quay.io/repository/thoth-station/s2i-thoth-ubi8-py39/status

.. |s2i-thoth-ubi8-py38 on Quay| image:: https://quay.io/repository/thoth-station/s2i-thoth-ubi8-py38/status
@@ -11,21 +17,32 @@ s2i-thoth

.. |s2i-thoth-f35-py310 on Quay| image:: https://quay.io/repository/thoth-station/s2i-thoth-f35-py310/status

Experimental Thoth container images:

* `quay.io/thoth-station/s2i-thoth-ubi8-py39 <https://quay.io/repository/thoth-station/s2i-thoth-ubi8-py39>`_ |s2i-thoth-ubi8-py39 on Quay|

* `quay.io/thoth-station/s2i-thoth-ubi8-py38 <https://quay.io/repository/thoth-station/s2i-thoth-ubi8-py38>`_ |s2i-thoth-ubi8-py38 on Quay|
.. |s2i-thoth-ubi9-py39 on Quay| image:: https://quay.io/repository/thoth-station/s2i-thoth-ubi9-py39/status

* `quay.io/thoth-station/s2i-thoth-ubi8-py36 <https://quay.io/repository/thoth-station/s2i-thoth-ubi8-py36>`_ |s2i-thoth-ubi8-py36 on Quay|

* `quay.io/thoth-station/s2i-thoth-f34-py39 <https://quay.io/repository/thoth-station/s2i-thoth-f34-py39>`_ |s2i-thoth-f34-py39 on Quay|
Experimental Thoth container images:

* `quay.io/thoth-station/s2i-thoth-f35-py310 <https://quay.io/repository/thoth-station/s2i-thoth-f35-py310>`_ |s2i-thoth-f35-py310 on Quay|
.. list-table:: s2i Thoth Images
:widths: 40 30
:header-rows: 1

* - Image
- Status
* - `s2i-thoth-ubi8-py39 <https://quay.io/repository/thoth-station/s2i-thoth-ubi8-py39>`_
- |s2i-thoth-ubi8-py39 on Quay|
* - `s2i-thoth-ubi8-py38 <https://quay.io/repository/thoth-station/s2i-thoth-ubi8-py38>`_
- |s2i-thoth-ubi8-py38 on Quay|
* - `s2i-thoth-ubi8-py36 <https://quay.io/repository/thoth-station/s2i-thoth-ubi8-py36>`_
- |s2i-thoth-ubi8-py38 on Quay|
* - `s2i-thoth-f34-py39 <https://quay.io/repository/thoth-station/s2i-thoth-f34-py39>`_
- |s2i-thoth-f34-py39 on Quay|
* - `s2i-thoth-f35-py310 <https://quay.io/repository/thoth-station/s2i-thoth-f35-py310>`_
- |s2i-thoth-f35-py310 on Quay|
* - `s2i-thoth-ubi9-py39 <https://quay.io/repository/thoth-station/s2i-thoth-ubi9-py39>`_
- |s2i-thoth-ubi9-py39 on Quay|

Artifacts needed to build `s2i-thoth-*` container images.

These container images are complaint with OpenShift's s2i build process to
These container images are compliant with OpenShift's s2i build process to
build Python applications. They extend the functionality of base s2i Python
container images so that applications using these container images benefit from
Thoth's recommendations.
@@ -105,10 +122,11 @@ S2I Assemble Patches

Most of the work when releasing a new container image comes from updating the ``s2i_assemble.patch`` file.
This file dictates how to change the base image's s2i assemble script, usually available at ``/usr/libexec/s2i/assemble`` of a container running the base image, to provide the new image with everything it may need.
As with any patch file, the ``s2i_assemble.patch`` can be generated manaually, however this is not recommend. The recommended methodology to create one is as follows:
As with any patch file, the ``s2i_assemble.patch`` can be generated manually, however this is not recommended. The recommended methodology to create one is as follows:

1. create directories ``a`` and ``b`` in the root of the `s2i-thoth` repo.
2. find the ``assemble`` script of your base image.

- This starts by finding the base image. For instance, fedora base images are available at ``registry.fedoraproject.org/``
- Either:

@@ -122,9 +140,11 @@ As with any patch file, the ``s2i_assemble.patch`` can be generated manaually, h
RUN cat /usr/libexec/s2i/assemble
3. Construct a new s2i ``assemble`` script in ``b/assemble``. This should reflect what you want the final patched s2i assemble script to be.

- For reference on what your final assemble script should look like refer to any image overlay in this repository. Find its base image s2i assemble script as described above, and patch it with the ``s2i_assemble.patch`` in the corresponding directory, ex: ``patch a/assemble -i <OVERLAY_NAME>/s2i_assemble.patch``. If this succeeds it will modify the base ``assemble`` script with your patch, and can serve as an example of what your final s2i assemble script should look like.
- NOTE: this may vary a lot by image, so thinnk about what the image chooses to include and remove rather than attempting to replicate it exactly for another overlay.
4. Run a diff between ``a/assemble`` and ``b/assemble``, and the output should become your ``s2i_assemble.patch``. Make sure to place it in the correct overlay. Example: ``diff a/assemble b/assemble > <OVERLAY_NAME>/s2i_assemble.patch``.

4. Run a diff between ``a/assemble`` and ``b/assemble``, and the output should become your ``s2i_assemble.patch``. Make sure to place it in the correct overlay. Example: ``diff -u a/assemble b/assemble > <OVERLAY_NAME>/s2i_assemble.patch``.
5. Verify that your image builds correctly. Navigate to your overlay directory with the new ``Dockerfile``, ``requirements.in``, ``requirements.txt``, and ``s2i_assemble.patch`` that you just generated. Run ``podman build .`` in the new overlay to verify that the image is buildable.

Importing image into OpenShift's registry
2 changes: 1 addition & 1 deletion f34-py39/Dockerfile
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ FROM registry.fedoraproject.org/f34/python3:0-34.container
ENV SUMMARY="Thoth's Source-to-Image for Python ${PYTHON_VERSION} applications" \
DESCRIPTION="Thoth's Source-to-Image for Python ${PYTHON_VERSION} applications. This toolchain is based on Fedora 34. It includes Pipenv." \
THOTH_S2I_NAME=quay.io/thoth-station/s2i-thoth-f34-py39 \
THOTH_S2I_VERSION=0.34.0 \
THOTH_S2I_VERSION=0.34.1 \
THAMOS_NO_PROGRESSBAR=1 \
THAMOS_NO_EMOJI=1 \
MICROPIPENV_NO_LOCKFILE_PRINT=0 \
Loading