cekit / cekit

CEKit - Container Evolution Kit
https://cekit.io/
MIT License
101 stars 39 forks source link

Cachito support missing WORKDIR & possibly other things #711

Closed AntStephenson closed 3 years ago

AntStephenson commented 3 years ago

Describe the bug To add support for Cachito to our Go build I added to my image.yaml:

 - name: "rhpam-7/rhpam-kogito-operator"
   version: "7.11"
   from: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
@@ -45,6 +36,11 @@
     configuration:
       container:
         image_build_method: imagebuilder
+        remote_source:
+          repo: https://github.com/kiegroup/rhpam-kogito-operator
+          ref: db4a5d18f5f52a64083d8f1bd1776ad60a46904c
+          pkg_managers:
+            - gomod
         platforms:
           only:
             - x86_64

Despite this (and removing the erroneous go mod download ) it doesn't work. After talking with Luiz he suggested (and from the docs[1]) we are missing a WORKDIR invocation. Plus there is some other stuff in the docs too.

To reproduce See above, and execute our build with cekit --redhat build osbs

Expected behavior I'm guessing the build should use cached artifacts from Cachito, or they should be downloaded from there during the build.

Logs Paste any logs you have, use CEKit verbose output: cekit -v.

Environment information:

Additional context I pasted internal links to the failed builds in the CEKit channel

[1] https://source.redhat.com/groups/public/container-build-system/container_build_system_wiki/containers_from_source_multistage_builds_in_osbs

rnc commented 3 years ago

Need to add WORKDIR $REMOTE_SOURCE_DIR/app.

rnc commented 3 years ago

Verify that remote_source is documented properly as well

rnc commented 3 years ago

Original PR : https://github.com/cekit/cekit/pull/665 The remote_source is part of https://osbs.readthedocs.io/en/latest/users.html#fetching-source-code-from-external-source-using-cachito

rnc commented 3 years ago

@AntStephenson I'm closing this as I think it was fixed in #716 and we can make further fixes in #719.