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

Custom build strategy cannot add configmaps as build input

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done-Errata
    • Normal
    • 4.14.0
    • 4.10
    • Build
    • None
    • Low
    • No
    • Build + Jenkins Sprint #234, Pipeline Integrations #235, Pipeline Integrations #236, Pipeline Integrations #237, Pipeline Integrations #238, Pipeline Integrations #239
    • 6
    • False
    • Hide

      None

      Show
      None

    Description

      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:

       

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-nalin Nalin Dahyabhai
              rhn-support-amuhamme MUHAMMED ASLAM V K
              Jitendar Singh Jitendar Singh
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: