kabanero-io / kabanero-pipelines

Default Kabanero Pipelines. This repo will be archived soon.
Apache License 2.0
14 stars 18 forks source link

Pipelinerun fails in Build stage commit step - invalid reference format #400

Closed bconey closed 4 years ago

bconey commented 4 years ago

Upgraded a cluster w/ a springboot2 app for which pipelines had been successful to use Kabanero 0.9.0 and then triggered a pipeline for that same application (used the existing webhook) and it failed in the build step with the following error

[Buildah] STEP 31: COMMIT image-registry.openshift-image-registry.svc:5000/kabanero/kab60-java-spring-boot2:e7a1448806240f0294035097c0203caa3fb057e5/-t
[Buildah] error committing container for step {Env:[JVM_ARGS= PATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin container=oci LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 JAVA_VERSION=jdk8u252-b09_openj9-0.20.0 JAVA_HOME=/opt/java/openjdk JAVA_TOOL_OPTIONS=-XX:+IgnoreUnrecognizedVMOptions -XX:+UseContainerSupport -XX:+IdleTuningCompactOnIdle -XX:+IdleTuningGcOnIdle  JVM_ARGS= version=1.0-SNAPSHOT DEPENDENCY=/project/user-app/target/dependency] Command:entrypoint Args:[/start.sh] Flags:[] Attrs:map[json:true] Message:ENTRYPOINT /start.sh Original:ENTRYPOINT [ "/start.sh" ]}: error parsing target image name "image-registry.openshift-image-registry.svc:5000/kabanero/kab60-java-spring-boot2:e7a1448806240f0294035097c0203caa3fb057e5/-t": error parsing image name "image-registry.openshift-image-registry.svc:5000/kabanero/kab60-java-spring-boot2:e7a1448806240f0294035097c0203caa3fb057e5/-t": invalid reference format
[Error] exit status 1
[ERROR] Appsody build failed.  Please review the appsody build logs above.  Pipeline run aborted.
Step failed
kvijai82 commented 4 years ago

Updating the script to tolerate both type of image name inputs.

aadeshpa commented 4 years ago

PR is ready for this fix : https://github.com/kabanero-io/kabanero-pipelines/pull/404

aadeshpa commented 4 years ago

Fix is in 0.9.1-rc.3

marikaj123 commented 4 years ago

@bconey - Hi Barbara, Thank you for looking after te verification and closure of this issue.

bconey commented 4 years ago

Moved beyond this failure in the build step, but now seeing a reference to "invalid reference format" in the push step

/bin/bash: line 2: params.docker-imagename: command not found
/bin/bash: line 2: params.docker-imagetag: command not found
[INFO] Application image URL = image-registry.openshift-image-registry.svc:5000/kabanero/kab60-java-spring-boot2:edb265436eb45cfd1a40894b799207a9189024bb/kab60-java-spring-boot2
[INFO] Running the script /scripts/image_registry_access_setup.sh ....
[INFO] The image registries that got added successfully to insecure list are = [ 'image-registry.openshift-image-registry.svc:5000' ]
[INFO] Signature will not be generated. The signed image repository is not set or does not match the target registry.
[INFO] Pushing image to registry...
invalid reference format
Step failed
aadeshpa commented 4 years ago

Fix based on above issue mentioned by @bconey is in PR : https://github.com/kabanero-io/kabanero-pipelines/pull/408 Once it is merged it can be verified. cc: @kvijai82

bconey commented 4 years ago

Verified