rht-labs / labs-ci-cd

👻UNMAINTAINED - A collection of Red Hat Open Innovation Labs CI/CD components
Apache License 2.0
101 stars 70 forks source link

Hoverfly build/template integrated #119

Closed jtprichett closed 6 years ago

jtprichett commented 6 years ago

resolves #67 From what I saw online there didn't seem to be a Hoverfly template that existed from OSS. I went ahead and made one for this repository. However, there was an error with the docker build see below:

Problem


Cloning "https://github.com/rht-labs/labs-ci-cd.git" ...
    Commit: c8bc15573839d4bcc5614045058c2a47d0c619b8 (Merge pull request #118 from sherl0cks/label-fix)
    Author: Justin Holmes <justinmichaelholmes@gmail.com>
    Date:   Sun Feb 4 19:29:00 2018 -0700

Pulling image registry.access.redhat.com/rhel7/rhel ...
Pulled 1/2 layers, 50% complete
Pulled 2/2 layers, 100% complete
Extracting
Step 1 : FROM registry.access.redhat.com/rhel7/rhel
 ---> d01d4f01d3c4
Step 2 : ENV PACKAGE_LIST less unzip
 ---> Running in 84fca23ddcb5
 ---> 01df04f81a7d
Removing intermediate container 84fca23ddcb5
Step 3 : ENV HOVERFLY_DOWNLOAD_URI https://github.com/SpectoLabs/hoverfly/releases/download/v0.14.2/hoverfly_bundle_linux_amd64.zip
 ---> Running in 0d0ebb59f99e
 ---> d35b579b9d7e
Removing intermediate container 0d0ebb59f99e
Step 4 : ENV HOME /home/hoverfly
 ---> Running in d4737476af0d
 ---> 2ac73f723060
Removing intermediate container d4737476af0d
Step 5 : RUN yum install -y $PACKAGE_LIST &&     rpm -V $PACKAGE_LIST &&     yum clean all -y &&     curl -o /tmp/hoverfly.zip -L $HOVERFLY_DOWNLOAD_URI &&     unzip /tmp/hoverfly.zip -d /tmp/hoverfly &&     mv /tmp/hoverfly/hover* /usr/bin &&     rm -r /tmp/hoverfly /tmp/hoverfly.zip &&     mkdir -m 775 $HOME &&     chmod 775 /etc/passwd
 ---> Running in e38a3748ea62
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 To enable Red Hat Subscription Management repositories:
     subscription-manager repos --enable <repo>
 To enable custom repositories:
     yum-config-manager --enable <repo>
error: build error: The command '/bin/sh -c yum install -y $PACKAGE_LIST &&     rpm -V $PACKAGE_LIST &&     yum clean all -y &&     curl -o /tmp/hoverfly.zip -L $HOVERFLY_DOWNLOAD_URI &&     unzip /tmp/hoverfly.zip -d /tmp/hoverfly &&     mv /tmp/hoverfly/hover* /usr/bin &&     rm -r /tmp/hoverfly /tmp/hoverfly.zip &&     mkdir -m 775 $HOME &&     chmod 775 /etc/passwd' returned a non-zero code: 1
sherl0cks commented 6 years ago

@JoshuaTPritchett thanks for picking this up. at a quick glance, the combo of templates you are using makes sense.

the build issue is related to being on an openshift host that is not properly subscribed, so when the build tries to install rhel packages, it fails. I just ran the build in a test cluster we use and it works fine.

two thoughts on resolution:

  1. make sure you minishift environment is subscribed. you can create a free rhel subscription if you dont have one already
  2. I'll discuss with my team if we can grant you access to an openshift cluster to test your changes.
jtprichett commented 6 years ago

It's all good, I just realized that after I posted (I try not to perform a docker build unless needed normally). Imma try to knock this out sometime this week. Thanks.

sherl0cks commented 6 years ago

OK - keep me posted and let me know how I can help.

Also FYI - the build in question isn't using S2I. It's a normal boring docker build, so you could run this build outside of openshift and you'll have the same behavior.

jtprichett commented 6 years ago

I corrected myself :) I'll ping in this thread after some initial testing for next steps.

jtprichett commented 6 years ago

@sherl0cks Done.