From f245989f1381803d10c9b641b02757ae7293eb80 Mon Sep 17 00:00:00 2001 From: Ian Tewksbury Date: Wed, 16 Dec 2020 12:54:17 -0500 Subject: [PATCH] ploigos-base - add yq --- .github/workflows/publish.yaml | 10 ++++++---- ploigos-base/Containerfile.ubi8 | 7 +++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index fa481d8..44004d7 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -119,14 +119,16 @@ jobs: - name: Test Image ๐Ÿงช run: | - echo "Running: docker run ${{ env.IMAGE_TAG_LOCAL }} python3 --version" + echo "Test python3 installed" docker run ${{ env.IMAGE_TAG_LOCAL }} python3 --version - echo "Running: docker run ${{ env.IMAGE_TAG_LOCAL }} pip3 --version" + echo "Test pip3 installed" docker run ${{ env.IMAGE_TAG_LOCAL }} pip3 --version - echo "Running: docker run ${{ env.IMAGE_TAG_LOCAL }} oc version" + echo "Test oc installed docker run ${{ env.IMAGE_TAG_LOCAL }} oc version - echo "Running: docker run ${{ env.IMAGE_TAG_LOCAL }} git version" + echo "Test git installed docker run ${{ env.IMAGE_TAG_LOCAL }} git version + echo "Test yq installed" + docker run ${{ env.IMAGE_TAG_LOCAL }} yq --version - name: Login to External Registry ๐Ÿ”‘ uses: docker/login-action@v1 diff --git a/ploigos-base/Containerfile.ubi8 b/ploigos-base/Containerfile.ubi8 index 2ca0337..bf12d2a 100644 --- a/ploigos-base/Containerfile.ubi8 +++ b/ploigos-base/Containerfile.ubi8 @@ -5,6 +5,7 @@ ARG PLOIGOS_USER_GID=0 ARG PLOIGOS_HOME_DIR=/home/ploigos ARG PLOIGOS_SOURCE=tssc==0.14.0 ARG OPENSHIFT_CLI_VERSION=4.6 +ARG YQ_VERSION=3.4.1 ############################################## # Stage 1 : Retrieive oc cli @@ -20,6 +21,7 @@ ARG PLOIGOS_USER_UID ARG PLOIGOS_USER_GID ARG PLOIGOS_HOME_DIR ARG PLOIGOS_SOURCE +ARG YQ_VERSION COPY --from=origin-cli /usr/bin/oc /usr/bin/oc COPY --from=origin-cli /usr/bin/kubectl /usr/bin/kubectl @@ -46,6 +48,10 @@ USER root RUN curl -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -o /usr/bin/jq && \ chmod +x /usr/bin/jq +# Install YQ +RUN curl -L https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 -o /usr/bin/yq &&\ + chmod +x /usr/bin/yq + # Install packages RUN INSTALL_PKGS="gettext git rsync tar unzip which zip bzip2 python36 python3-pip python3-pip-wheel python3-setuptools python36-devel ${SOPS_RPM} gnupg2" && \ dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ @@ -53,6 +59,7 @@ RUN INSTALL_PKGS="gettext git rsync tar unzip which zip bzip2 python36 python3-p rpm -V $INSTALL_PKGS && \ dnf clean all + # Configure Python RUN alternatives --set python /usr/bin/python3 && \ python -m pip install --no-cache-dir --upgrade pip