Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1669974

Summary: should have the default value 'Context Dir' for the application source code
Product: OpenShift Container Platform Reporter: shahan <hasha>
Component: Management ConsoleAssignee: ralpert
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: aos-bugs, hasha, jokerman, mmccomas, spadgett
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-04 15:27:03 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:

Description shahan 2019-01-28 09:26:01 UTC
Description of problem:
For those applications which are in the subdirectory of source code should has the dir location for 'Context Dir'. Or will failed with error: error: DOTNET_STARTUP_PROJECT has no project file

Version-Release number of selected component (if applicable):
4.0.0-0.nightly-2019-01-25-205123
console commit: 5070df1f11d481f36152c0218f209a085eed9d64

How reproducible:
always

Steps to Reproduce:
1. goto Catalog->Developer Catalog, click '.NET core', then create application
2. check to build log
3. $oc new-app --name=exampleapp 'dotnet:2.0~https://github.com/redhat-developer/s2i-dotnetcore-ex#dotnetcore-2.0' --build-env DOTNET_STARTUP_PROJECT=app

Actual results:
2. STEP 8: RUN /usr/libexec/s2i/assemble ---> Installing application source ... Using SDK: 2.0.3 error: DOTNET_STARTUP_PROJECT has no project file You can specify the startup project by adding an '.s2i/environment' file to the source repository. The source repository contains the following projects: - app/app.csproj Update the '.s2i/environment' file to specify the project you want to publish, for example DOTNET_STARTUP_PROJECT=app/app.csproj. subprocess exited with status 1 subprocess exited with status 1 error: build error: error building at step {Env:[OPENSHIFT_BUILD_COMMIT=0543be02d0be779d08e6c43f82ef9f0610f5d4e3 OPENSHIFT_BUILD_REFERENCE=dotnetcore-2.0 OPENSHIFT_BUILD_SOURCE=https://github.com/redhat-developer/s2i-dotnetcore-ex OPENSHIFT_BUILD_NAMESPACE=default OPENSHIFT_BUILD_NAME=exampleapp-1 PATH=/opt/app-root/src/.local/bin:/opt/app-root/src/bin:/opt/app-root/node_modules/.bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOME=/opt/app-root DOTNET_APP_PATH=/opt/app-root/app DOTNET_DEFAULT_CMD=default-cmd.sh DOTNET_CORE_VERSION=2.0 DOTNET_FRAMEWORK=netcoreapp2.0 DOTNET_RUNNING_IN_CONTAINER=true NUGET_XMLDOC_MODE=skip DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 ASPNETCORE_URLS=http://*:8080 CONTAINER_SCRIPTS_PATH=/opt/app-root ENABLED_COLLECTIONS=rh-dotnet20 rh-nodejs6 BASH_ENV=/opt/app-root/etc/scl_enable ENV=/opt/app-root/etc/scl_enable PROMPT_COMMAND=. /opt/app-root/etc/scl_enable STI_SCRIPTS_PATH=/usr/libexec/s2i DOTNET_SDK_BASE_VERSION=2.0.0 DOTNET_USE_POLLING_FILE_WATCHER=true OPENSHIFT_BUILD_NAME=exampleapp-1 OPENSHIFT_BUILD_NAMESPACE=default OPENSHIFT_BUILD_SOURCE=https://github.com/redhat-developer/s2i-dotnetcore-ex OPENSHIFT_BUILD_REFERENCE=dotnetcore-2.0 OPENSHIFT_BUILD_COMMIT=0543be02d0be779d08e6c43f82ef9f0610f5d4e3] Command:run Args:[/usr/libexec/s2i/assemble] Flags:[] Attrs:map[] Message:RUN /usr/libexec/s2i/assemble Original:RUN /usr/libexec/s2i/assemble}: exit status 1 

3. application created successfully

Expected results:
should have field to set the 'Context Dir' for this kind of application

Additional info:

Comment 1 Samuel Padgett 2019-01-28 12:21:35 UTC
(In reply to shahan from comment #0)
 
> Steps to Reproduce:
> 1. goto Catalog->Developer Catalog, click '.NET core', then create
> application

Did you click the try sample link or did you paste in the URL?

Comment 2 shahan 2019-01-29 02:21:13 UTC
yes, I clicked the try sample link and hit this error.

Comment 3 Samuel Padgett 2019-01-29 15:28:47 UTC
We should be handling context dir for sample repositories here:

https://github.com/openshift/console/blob/123a010276007681f1d4d175f86b5ab14c8880f2/frontend/public/components/source-to-image.tsx#L148-L157

We'll need to debug to find out why it's not working.

Comment 4 Samuel Padgett 2019-01-29 19:10:26 UTC
https://github.com/openshift/console/pull/1148

Comment 5 shahan 2019-02-02 07:02:29 UTC
Create '.NET core' application successfully via console.
$oc get build dotnet-1 -n hasha-pro1 -o yaml |grep 'source:' -A 5
  source:
    contextDir: app
    git:
      ref: dotnetcore-2.1
      uri: https://github.com/redhat-developer/s2i-dotnetcore-ex.git
    type: Git
console commit: af38affc1ff1e86188a19dcd52157c4d76707cdc
verified this bug.