Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-11091

Custom build strategy cannot add configmaps as build input

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • None
    • 4.10
    • Build
    • None
    • Low
    • No
    • False
    • Hide

      None

      Show
      None

      This is a clone of issue OCPBUGS-10588. The following is the description of the original issue:

      Description of problem:

      If we add a configmap to buildconfig as build input, the configmap data is not present at the destnationDir on the build pod.

      Version-Release number of selected component (if applicable):

       

      How reproducible:

      Follow below steps to reproduce.

      Steps to Reproduce:

      1. Create a configmap to pass as build input
      
      apiVersion: v1
      data:
        settings.xml: |+
          xxx
          yyy
      kind: ConfigMap
      metadata:
        name: build-test
        namespace: test
      
      2. Create a buidlconfig like below
      
      apiVersion: build.openshift.io/v1
      kind: BuildConfig
      metadata:
        labels:
          app: custom-build
        name: custom-build
      spec:
        source:
          configMaps:
          - configMap:
              name: build-test
            destinationDir: /tmp
          type: None
        output:
          to:
            kind: ImageStreamTag
            name: custom-build:latest
        postCommit: {}
        runPolicy: Serial
        strategy:
          customStrategy:
            from:
              kind: "DockerImage"
              name: "registry.redhat.io/rhel8/s2i-base"
      
       3. start a new build
      
          oc start-build custom-build
      
       4. As per the documentation[a] the configmap data should present on the build pod location "/var/run/secrets/openshift.io/build" if we didn't explicitly mention the "destinationDir". in above example "destinationDir" set to "/tmp" so "server.xml" file from the configmap should present in "/tmp" directory of the build pod.
       
      [a] https://docs.openshift.com/container-platform/4.12/cicd/builds/creating-build-inputs.html#builds-custom-strategy_creating-build-inputs

      Actual results:

      Configmap data is not present on the "destinationDir" or in default location "/var/run/secrets/openshift.io/build"

      Expected results:

      Configmap data should be present on the destinationDir of the builder pod.

      Additional info:

       

            cdaley Corey Daley
            openshift-crt-jira-prow OpenShift Prow Bot
            Corey Daley Corey Daley
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: