Skip to content

Commit

Permalink
fix(quay): use environment variables from registry.redhat.io/quay/qua…
Browse files Browse the repository at this point in the history
…y-rhel8:v3.8.11 (PROJQUAY-5936) (#131)
  • Loading branch information
Oleg Bulatov authored Aug 16, 2023
1 parent 7783de1 commit c8c2b87
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@

- name: Loading Quay if quay.tar exists
shell:
cmd: podman image import --change 'ENV PATH=/.local/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' --change 'ENV RED_HAT_QUAY=true' --change 'ENV PYTHON_VERSION=3.8' --change 'ENV PYTHON_ROOT=/usr/local/lib/python3.8' --change 'ENV PYTHONUNBUFFERED=1' --change 'ENV PYTHONIOENCODING=UTF-8' --change 'ENV LANG=en_US.utf8' --change 'ENV QUAYDIR=/quay-registry' --change 'ENV QUAYCONF=/quay-registry/conf' --change 'ENV QUAYRUN=/quay-registry/conf' --change 'ENV QUAYPATH=.' --change "ENV QUAY_VERSION={{ quay_version }}" --change 'ENV container=oci' --change 'ENTRYPOINT=["dumb-init","--","/quay-registry/quay-entrypoint.sh"]' --change 'WORKDIR=/quay-registry' --change 'EXPOSE=7443' --change 'EXPOSE=8080' --change 'EXPOSE=8443' --change 'VOLUME=/conf/stack' --change 'VOLUME=/datastorage' --change 'VOLUME=/tmp' --change 'VOLUME=/var/log' --change 'USER=1001' --change 'CMD ["registry"]' - {{ quay_image }} < {{ quay_root }}/quay.tar
cmd: podman image import --change 'ENV container=oci' --change 'ENV PATH=/app/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' --change 'ENV PYTHONUNBUFFERED=1' --change 'ENV PYTHONIOENCODING=UTF-8' --change 'ENV LC_ALL=C.UTF-8' --change 'ENV LANG=C.UTF-8' --change 'ENV QUAYDIR=/quay-registry' --change 'ENV QUAYCONF=/quay-registry/conf' --change 'ENV QUAYRUN=/quay-registry/conf' --change 'ENV QUAYPATH=/quay-registry' --change 'ENV PYTHONUSERBASE=/app' --change 'ENV PYTHONPATH=/quay-registry' --change 'ENV TZ=UTC' --change 'ENV RED_HAT_QUAY=true' --change 'ENTRYPOINT=["dumb-init","--","/quay-registry/quay-entrypoint.sh"]' --change 'WORKDIR=/quay-registry' --change 'EXPOSE=7443' --change 'EXPOSE=8080' --change 'EXPOSE=8443' --change 'VOLUME=/conf/stack' --change 'VOLUME=/datastorage' --change 'VOLUME=/tmp' --change 'VOLUME=/var/log' --change 'USER=1001' --change 'CMD ["registry"]' - {{ quay_image }} < {{ quay_root }}/quay.tar
when: p.stat.exists and local_install == "false"

- name: Loading Postgres if postgres.tar exists
shell:
cmd: podman image import --change 'ENV PATH=/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' --change 'ENV STI_SCRIPTS_URL=image:///usr/libexec/s2i' --change 'ENV STI_SCRIPTS_PATH=/usr/libexec/s2i' --change 'ENV APP_ROOT=/opt/app-root' --change 'ENV APP_DATA=/opt/app-root' --change 'ENV HOME=/var/lib/pgsql' --change 'ENV PLATFORM=el8' --change 'ENV POSTGRESQL_VERSION=10' --change 'ENV POSTGRESQL_PREV_VERSION=9.6' --change 'ENV PGUSER=postgres' --change 'ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql' --change 'ENTRYPOINT=["container-entrypoint"]' --change 'WORKDIR=/opt/app-root/src' --change 'EXPOSE=5432' --change 'USER=26' --change 'CMD ["run-postgresql"]' - {{ postgres_image }} < {{ quay_root }}/postgres.tar
when: p.stat.exists and local_install == "false"
when: p.stat.exists and local_install == "false"
18 changes: 9 additions & 9 deletions cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,21 +244,21 @@ func getImageMetadata(app, imageName, archivePath string) string {
- ` + imageName + ` < ` + archivePath
case "quay":
// quay.io
quayVersion := strings.Split(imageName, ":")[1]
statement = `/usr/bin/podman image import \
--change 'ENV PATH=/.local/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' \
--change 'ENV RED_HAT_QUAY=true' \
--change 'ENV PYTHON_VERSION=3.8' \
--change 'ENV PYTHON_ROOT=/usr/local/lib/python3.8' \
--change 'ENV container=oci' \
--change 'ENV PATH=/app/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' \
--change 'ENV PYTHONUNBUFFERED=1' \
--change 'ENV PYTHONIOENCODING=UTF-8' \
--change 'ENV LANG=en_US.utf8' \
--change 'ENV LC_ALL=C.UTF-8' \
--change 'ENV LANG=C.UTF-8' \
--change 'ENV QUAYDIR=/quay-registry' \
--change 'ENV QUAYCONF=/quay-registry/conf' \
--change 'ENV QUAYRUN=/quay-registry/conf' \
--change 'ENV QUAYPATH=.' \
--change 'ENV QUAY_VERSION=` + quayVersion + `' \
--change 'ENV container=oci' \
--change 'ENV QUAYPATH=/quay-registry' \
--change 'ENV PYTHONUSERBASE=/app' \
--change 'ENV PYTHONPATH=/quay-registry' \
--change 'ENV TZ=UTC' \
--change 'ENV RED_HAT_QUAY=true' \
--change 'ENTRYPOINT=["dumb-init","--","/quay-registry/quay-entrypoint.sh"]' \
--change 'WORKDIR=/quay-registry' \
--change 'EXPOSE=7443' \
Expand Down

0 comments on commit c8c2b87

Please sign in to comment.