Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-2387

Tutorial doesn't deploy new version after build

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • Pipelines 1.9.1
    • Pipelines 1.6, Pipelines 1.7, Pipelines 1.8.0
    • None
    • None
    • 2
    • False
    • None
    • False
    • Pipelines Sprint 231

      Expected behavior

      When votes-ui or votes-api is build second time, new image is used for deployment, UI shows new container ID

      Actual behavior

      Pods are never recreated with a new image, logs show "deployment.apps/pipelines-vote-ui configured" but in fact it only change image reference from image-registry.openshift-image-registry.svc:5000/mynamespace/pipelines-vote-ui to the same value

      Steps to reproduce

      Follow https://docs.openshift.com/container-platform/4.10/cicd/pipelines/creating-applications-with-cicd-pipelines.html or run scripts from https://github.com/openshift/pipelines-tutorial

      ./demo.sh setup
      
      ./demo.sh run
      
      APP_URL=$(oc get route pipelines-vote-ui -n $NAMESPACE --template='http://{{.spec.host}}')
      
      lynx $APP_URL --dump # notice container ID
      
      route=$(oc get route  -l eventlistener=vote-app -n $NAMESPACE -o name)
      
      url=$(oc get $route --template='http://{{.spec.host}}' -n $NAMESPACE)
      
      curl -X POST \
                ${url} \
              -H 'Content-Type: application/json' \
              -H 'X-GitHub-Event: push' \
              -H 'X-Hub-Signature: sha1=7d52b3ec735083bcaf14892bcf70ab403424b56e' \
              -d '{"head_commit": { "id": "master"},"repository":{"url": "https://github.com/openshift/pipelines-vote-ui.git", "name": "pipelines-vote-ui"}}'
      
      ./demo.sh logs
      
      lynx $APP_URL --dump # notice container ID
      

      Possible fix

      Simplest fix would be to propagate IMAGE_DIGEST from buildah task to the update-deployment task

      Alternative approach would be to use deploymentconfig instead of deployment and do "oc rollout" instead of manually applying patch.

            jkandasa-rh Jeeva Kandasamy
            ppitonak Pavol Pitoňák
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: