Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-24226

(8.0.z) Helm Charts: missing ImageChange trigger on BuildConfigs for builder and runtime imageStreamTags

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • 8.0.0.Beta-CR1, 8.0.0.Beta
    • HelmChart
    • None
    • False
    • None
    • False
    • Known Issue
    • Workaround Exists
    • Hide

      If new EAP 8 images are published on RHCC, the users can trigger a manual build on the 1st buildconfig to create an updated application image.

      Show
      If new EAP 8 images are published on RHCC, the users can trigger a manual build on the 1st buildconfig to create an updated application image.
    • Hide
      cd /tmp
      
      git clone https://github.com/jbossas/eap-charts.git
      
      cd eap-charts
      
      git fetch origin eap8-dev
      
      git checkout eap8-dev
      
      oc import-image jboss-eap-8-tech-preview-eap8-openjdk17-builder-openshift-rhel8:latest \
          --from=registry-proxy.engineering.redhat.com/rh-osbs/jboss-eap-8-tech-preview-eap8-openjdk17-builder-openshift-rhel8:1.0.0.Beta-7 \
          --confirm   
      
      oc import-image jboss-eap-8-tech-preview-eap8-openjdk17-runtime-openshift-rhel8:latest \
          --from=registry-proxy.engineering.redhat.com/rh-osbs/jboss-eap-8-tech-preview-eap8-openjdk17-runtime-openshift-rhel8:1.0.0.Beta-5 \
          --confirm
      
      helm install autoupgrading-app --replace --dependency-update \
          --set build.uri=https://github.com/wildfly/quickstart.git \
          --set build.ref=main \
          --set build.contextDir=helloworld \
          --set-string build.s2i.jdk=17 \
          --set build.s2i.amd64.jdk17.builderImage=jboss-eap-8-tech-preview-eap8-openjdk17-builder-openshift-rhel8:latest \
          --set build.s2i.amd64.jdk17.runtimeImage=jboss-eap-8-tech-preview-eap8-openjdk17-runtime-openshift-rhel8:latest \
          --set build.s2i.jdk17.builderImage=jboss-eap-8-tech-preview-eap8-openjdk17-builder-openshift-rhel8:latest \
          --set build.s2i.jdk17.runtimeImage=jboss-eap-8-tech-preview-eap8-openjdk17-runtime-openshift-rhel8:latest \
          --set build.s2i.builderKind=ImageStreamTag \
          --set build.s2i.runtimeKind=ImageStreamTag \
          --set build.mode=s2i \
          --set deploy.tls.enabled=false \
          --set build.env[0].name=MAVEN_ARGS_APPEND,build.env[0].value=-Dinsecure.repositories=WARN \
          --set deploy.enabled=false \
          --set deploy.labels.deploymentconfig=autoupgrading-app \
          /tmp/eap-charts/charts/eap8
      
      Show
      cd /tmp git clone https://github.com/jbossas/eap-charts.git cd eap-charts git fetch origin eap8-dev git checkout eap8-dev oc import-image jboss-eap-8-tech-preview-eap8-openjdk17-builder-openshift-rhel8:latest \ --from=registry-proxy.engineering.redhat.com/rh-osbs/jboss-eap-8-tech-preview-eap8-openjdk17-builder-openshift-rhel8:1.0.0.Beta-7 \ --confirm oc import-image jboss-eap-8-tech-preview-eap8-openjdk17-runtime-openshift-rhel8:latest \ --from=registry-proxy.engineering.redhat.com/rh-osbs/jboss-eap-8-tech-preview-eap8-openjdk17-runtime-openshift-rhel8:1.0.0.Beta-5 \ --confirm helm install autoupgrading-app --replace --dependency-update \ --set build.uri=https://github.com/wildfly/quickstart.git \ --set build.ref=main \ --set build.contextDir=helloworld \ --set-string build.s2i.jdk=17 \ --set build.s2i.amd64.jdk17.builderImage=jboss-eap-8-tech-preview-eap8-openjdk17-builder-openshift-rhel8:latest \ --set build.s2i.amd64.jdk17.runtimeImage=jboss-eap-8-tech-preview-eap8-openjdk17-runtime-openshift-rhel8:latest \ --set build.s2i.jdk17.builderImage=jboss-eap-8-tech-preview-eap8-openjdk17-builder-openshift-rhel8:latest \ --set build.s2i.jdk17.runtimeImage=jboss-eap-8-tech-preview-eap8-openjdk17-runtime-openshift-rhel8:latest \ --set build.s2i.builderKind=ImageStreamTag \ --set build.s2i.runtimeKind=ImageStreamTag \ --set build.mode=s2i \ --set deploy.tls.enabled=false \ --set build.env[0].name=MAVEN_ARGS_APPEND,build.env[0].value=-Dinsecure.repositories=WARN \ --set deploy.enabled=false \ --set deploy.labels.deploymentconfig=autoupgrading-app \ /tmp/eap-charts/charts/eap8

      When you create a release with HELM Charts for EAP (https://github.com/jbossas/eap-charts.git), two BuildConfig resources are created corresponding to the two steps of the chained build:

      • first BuildConfig: for building the EAP based application inside the builder image (complete example in attached buildconfig-autoupgrading-app-build-artifacts.yaml)
      • second BuildConfig: for deploying the EAP based application inside the runtime image (complete example in attached buildconfig-autoupgrading-app.yaml)

      These BuildConfig just have the following triggers....

      first BuildConfig:

        triggers:
          - type: ConfigChange
      

      second BuildConfig:

        triggers:
          - type: ImageChange
            imageChange:
              from:
                kind: ImageStreamTag
                name: 'autoupgrading-app-build-artifacts:latest'    
      

      What's missing here, are the triggers that monitor the build image and runtime image streams for changes;

      The triggers, in the proposed reproducer, should be:

      first BuildConfig:

        triggers:
          - type: ConfigChange
          - type: ImageChange
            imageChange: {}
      

      second BuildConfig:

        triggers:
          - type: ImageChange
            imageChange:
              from:
                kind: ImageStreamTag
                name: 'autoupgrading-app-build-artifacts:latest'
          - type: ImageChange
            imageChange:
              from:
                kind: ImageStreamTag
                name: 'jboss-eap-8-tech-preview-eap8-openjdk17-runtime-openshift-rhel8:latest'
      

              jmesnil1@redhat.com Jeff Mesnil
              tborgato@redhat.com Tommaso Borgato
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated: