Bug 1801064

Summary: Should alert users to pipeline build strategy deprecation when using oc command to create pipeline build
Product: OpenShift Container Platform Reporter: wewang <wewang>
Component: BuildAssignee: Adam Kaplan <adam.kaplan>
Status: CLOSED ERRATA QA Contact: wewang <wewang>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.3.zCC: adam.kaplan, aos-bugs, wzheng
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Deprecated Functionality
Doc Text:
The JenkinsPipeline build strategy is deprecated as of 4.3.0. Use Jenkinsfiles directly on Jenkins or OpenShift Pipelines instead.
Story Points: ---
Clone Of:
: 1804976 (view as bug list) Environment:
Last Closed: 2020-05-13 21:57:14 UTC Type: Bug
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:    
Bug Blocks: 1804976    

Description wewang 2020-02-10 07:36:46 UTC
Description of problem:
No warning about pipeline build strategy deprecation in create pipeline build background

Version-Release number of selected component (if applicable):
openshift v4.3

How reproducible:
always

Steps to Reproduce:
1.According to https://bugzilla.redhat.com/show_bug.cgi?id=1785291, IMO we can add warning about pipeline build strategy deprecation in command side.


Actual results:
No warning about pipeline build strategy deprecation

Expected results:
Should have warning about pipeline build strategy deprecation

Additional info:
Now console already added it: https://github.com/openshift/console/pull/3099

Comment 2 wewang 2020-02-14 05:44:37 UTC
Tested  in oc version, already have deprecated info.@Adam Seems it's better to add "\n" for "JenkinsPipeline build strategy is deprecated. Use Jenkinsfiles directly on Jenkins or OpenShift Pipelines instead" in newapp.go and newbuild.go

$ oc version -oyaml
clientVersion:
  buildDate: "2020-02-13T22:50:14Z"
  compiler: gc
  gitCommit: 5d7a12f03389b03b651f963cb5ee8ddfa9cff559
  gitTreeState: clean
  gitVersion: v4.4.0
  goVersion: go1.13.4
  major: ""
  minor: ""
  platform: linux/amd64

when oc new-app or new-build already have the info:
--> Creating resources ...
    buildconfig.build.openshift.io "sample-pipeline" created
    service "nodejs-mongodb-example" created
    route.route.openshift.io "nodejs-mongodb-example" created
    imagestream.image.openshift.io "nodejs-mongodb-example" created
    buildconfig.build.openshift.io "nodejs-mongodb-example" created
    deploymentconfig.apps.openshift.io "nodejs-mongodb-example" created
    service "mongodb" created
    deploymentconfig.apps.openshift.io "mongodb" created
--> Success
JenkinsPipeline build strategy is deprecated. Use Jenkinsfiles directly on Jenkins or OpenShift Pipelines instead    Use 'oc start-build sample-pipeline' to start a build.
    Access your application via route 'nodejs-mongodb-example-wewang.apps.qe-groupd-0214.qe.devcluster.openshift.com' 
    Use 'oc start-build nodejs-mongodb-example' to start a build.
    Run 'oc status' to view your app.

Comment 3 wewang 2020-02-17 02:06:39 UTC
@adam About comment 2, it's a little change, so I submitted a pr: https://github.com/openshift/oc/pull/299, please help to review it, thanks

Comment 4 Adam Kaplan 2020-02-19 22:27:40 UTC
@wewang your fix ended up landing in 4.5.0.

Comment 6 wewang 2020-02-20 10:06:13 UTC
@adam Oh, yes and now 4.5 nightly build payload is not ready, so tested in ci payload
Version:
openshiftVersion: 4.5.0-0.ci-2020-02-20-023408
releaseClientVersion: 4.5.0-0.ci-2020-02-20-074405



--> Creating resources ...
    buildconfig.build.openshift.io "sample-pipeline" created
    service "nodejs-mongodb-example" created
    route.route.openshift.io "nodejs-mongodb-example" created
    imagestream.image.openshift.io "nodejs-mongodb-example" created
    buildconfig.build.openshift.io "nodejs-mongodb-example" created
    deploymentconfig.apps.openshift.io "nodejs-mongodb-example" created
    service "mongodb" created
    deploymentconfig.apps.openshift.io "mongodb" created
--> Success
JenkinsPipeline build strategy is deprecated. Use Jenkinsfiles directly on Jenkins or OpenShift Pipelines instead
    Use 'oc start-build sample-pipeline' to start a build.
    Access your application via route 'nodejs-mongodb-example-wewang.apps.wewang-45.qe.devcluster.openshift.com' 
    Use 'oc start-build nodejs-mongodb-example' to start a build.

Comment 8 errata-xmlrpc 2020-05-13 21:57:14 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, 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-2020:0581