Bug 1992639

Summary: oc new-build command does not pick automatic source clone secret in OpenShift 4.7
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: BuildAssignee: Gabe Montero <gmontero>
Status: CLOSED ERRATA QA Contact: Jitendar Singh <jitsingh>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.7CC: adam.kaplan, aos-bugs, gmontero, jokerman, mfojtik
Target Milestone: ---   
Target Release: 4.8.z   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-31 16:17:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1971332    
Bug Blocks: 1995074    

Comment 3 Jitendar Singh 2021-08-18 04:24:46 UTC
VERIFIED
================== 
jsingh@fugaku  ~  oc new-project foo
Now using project "foo" on server "https://api.dev-svc-4.8-081801.devcluster.openshift.com:6443".

You can add applications to this project with the 'new-app' command. For example, try:

    oc new-app rails-postgresql-example

to build a new example application in Ruby. Or use kubectl to deploy a simple Kubernetes application:

    kubectl create deployment hello-node --image=k8s.gcr.io/serve_hostname

 jsingh@fugaku  ~/.ssh  oc create secret generic foo --from-file=ssh-privatekey=id_ed25519 --type=kubernetes.io/ssh-auth
secret/foo created
 jsingh@fugaku  ~/.ssh  oc secret link builder foo
 jsingh@fugaku  ~/.ssh  oc annotate secret foo "build.openshift.io/source-secret-match-uri-1=ssh://github.com:22/jitendar-singh/*"
secret/foo annotated
 jsingh@fugaku  ~/.ssh  oc new-build ruby~ssh://git:22/jitendar-singh/repo.git --name=foo
--> Found image 63e11dc (8 days old) in image stream "openshift/ruby" under tag "2.7-ubi8" for "ruby"

    Ruby 2.7 
    -------- 
    Ruby 2.7 available as container is a base platform for building and running various Ruby 2.7 applications and frameworks. Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text files and to do system management tasks (as in Perl). It is simple, straight-forward, and extensible.

    Tags: builder, ruby, ruby27, ruby-27

    * A source build using source code from ssh://git:22/jitendar-singh/repo.git will be created
      * The resulting image will be pushed to image stream tag "foo:latest"
      * Use 'oc start-build' to trigger a new build

--> Creating resources with label build=foo ...
    imagestream.image.openshift.io "foo" created
    buildconfig.build.openshift.io "foo" created
--> Success
 jsingh@fugaku  ~/.ssh  oc logs bc/foo --follow
Cloning "ssh://git:22/jitendar-singh/repo.git" ...
	Commit:	56eb276f78b90488781417874fdd044ddda1e67e (first commit)
	Author:	jsingh <jitsingh>
	Date:	Wed Aug 11 11:38:05 2021 +0530
Caching blobs under "/var/cache/blobs".
Getting image source signatures
Copying blob sha256:356f18f3a935b2f226093720b65383048249413ed99da72c87d5be58cc46661c
Copying blob sha256:296e14ee24149e14d573a1fbf5b5a625c7bb0cc22f5b2a8b180e833258187948
Copying blob sha256:19c7e0d23e1f527cfe0a0de0641d5988ce8188bea662289c92599c1d2a217614
Copying blob sha256:359fed170a21fd169953d50193bb1b9405d5e827bed42a220d154cadf794ac23
Copying blob sha256:36f41b0644b452bfe54c7ab1fe5e6bd2b30aa82958508c23e02233de69faf3db
Copying config sha256:63e11dcf1bc758d78ed6ee645bbf2cdfa31e85e1ed56e76bd735ceb970895172
Writing manifest to image destination
Storing signatures
Generating dockerfile with builder image image-registry.openshift-image-registry.svc:5000/openshift/ruby@sha256:41c6d94414e4dc58dcebca3689879871ad84ece255cd5e075fe8f7a1927b364f
Adding transient rw bind mount for /run/secrets/rhsm
STEP 1: FROM image-registry.openshift-image-registry.svc:5000/openshift/ruby@sha256:41c6d94414e4dc58dcebca3689879871ad84ece255cd5e075fe8f7a1927b364f
STEP 2: LABEL "io.openshift.build.commit.ref"="main"       "io.openshift.build.commit.message"="first commit"       "io.openshift.build.source-location"="ssh://git:22/jitendar-singh/repo.git"       "io.openshift.build.image"="image-registry.openshift-image-registry.svc:5000/openshift/ruby@sha256:41c6d94414e4dc58dcebca3689879871ad84ece255cd5e075fe8f7a1927b364f"       "io.openshift.build.commit.author"="jsingh <jitsingh>"       "io.openshift.build.commit.date"="Wed Aug 11 11:38:05 2021 +0530"       "io.openshift.build.commit.id"="56eb276f78b90488781417874fdd044ddda1e67e"
STEP 3: ENV OPENSHIFT_BUILD_NAME="foo-1"     OPENSHIFT_BUILD_NAMESPACE="foo"     OPENSHIFT_BUILD_SOURCE="ssh://git:22/jitendar-singh/repo.git"     OPENSHIFT_BUILD_COMMIT="56eb276f78b90488781417874fdd044ddda1e67e"
STEP 4: USER root
STEP 5: COPY upload/src /tmp/src
STEP 6: RUN chown -R 1001:0 /tmp/src
STEP 7: USER 1001
STEP 8: RUN /usr/libexec/s2i/assemble
---> Installing application source ...
---> Building your Ruby application from source ...
WARNING: Rubygem Rack is not installed in the present image.
         Add rack to your Gemfile in order to start the web server.
STEP 9: CMD /usr/libexec/s2i/run
STEP 10: COMMIT temp.builder.openshift.io/foo/foo-1:101cf018
Getting image source signatures
Copying blob sha256:e39c3abf0df93fca44921f3548fcf6e139afdcb2ac9b7baa6c47b39f87113b32
Copying blob sha256:8f26704f753cbe8b20afc01e97a4cb652befe26791b4d33193afc99ce544ebf5
Copying blob sha256:83310c7c677cb8ade9613896d0dc2f68f905792407d9b175801221756dfd3016
Copying blob sha256:694adc66f3fa07d76b12086cc88422f8d60894559536ffab50e0030fd7fa91c6
Copying blob sha256:f1b22bd955f8e87301623cc951acfeda3c9849a88f367aea3cc278f3c4d55edd
Copying blob sha256:d43cf2f13d81477b5437b3e5ee3dd48791ee82d46de9d562343a1b76e6bc08ba
Copying config sha256:356506a869e30b196e3709392a44cfb44172ecade490ee9a5fcaed9641b0eaf8
Writing manifest to image destination
Storing signatures
--> 356506a869e
356506a869e30b196e3709392a44cfb44172ecade490ee9a5fcaed9641b0eaf8

Pushing image image-registry.openshift-image-registry.svc:5000/foo/foo:latest ...
Getting image source signatures
Copying blob sha256:d43cf2f13d81477b5437b3e5ee3dd48791ee82d46de9d562343a1b76e6bc08ba
Copying blob sha256:356f18f3a935b2f226093720b65383048249413ed99da72c87d5be58cc46661c
Copying blob sha256:19c7e0d23e1f527cfe0a0de0641d5988ce8188bea662289c92599c1d2a217614
Copying blob sha256:36f41b0644b452bfe54c7ab1fe5e6bd2b30aa82958508c23e02233de69faf3db
Copying blob sha256:359fed170a21fd169953d50193bb1b9405d5e827bed42a220d154cadf794ac23
Copying blob sha256:296e14ee24149e14d573a1fbf5b5a625c7bb0cc22f5b2a8b180e833258187948
Copying config sha256:356506a869e30b196e3709392a44cfb44172ecade490ee9a5fcaed9641b0eaf8
Writing manifest to image destination
Storing signatures
Successfully pushed image-registry.openshift-image-registry.svc:5000/foo/foo@sha256:ebd50a62759893179579c6cd0868a2ea541e999ab707e2ab2d0d646878f50bc4
Push successful

Comment 4 ximhan 2021-08-20 07:26:57 UTC
OpenShift engineering has decided to NOT ship 4.8.6 on 8/23 due to the following issue.
https://bugzilla.redhat.com/show_bug.cgi?id=1995785
All the fixes part will be now included in 4.8.7 on 8/30.

Comment 8 errata-xmlrpc 2021-08-31 16:17:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.8.9 bug fix), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:3247