mathworks / jenkins-matlab-plugin

This plugin enables you to run MATLAB® and Simulink® as part of your Jenkins™ build.
47 stars 54 forks source link

Artifacts from Run MATLAB Tests are not generated in workspace when using -sd option #287

Closed Vahila closed 9 months ago

Vahila commented 9 months ago

When -sd option is used with Run MATLAB Tests, the artifacts are are generated in the specified initial folder and not in the workspace. Is this expected?

nbhoski commented 9 months ago

@Vahila is it verified

Vahila commented 9 months ago

@Vahila is it verified

Yes, attaching screenshots for reference:

image image

Console output: image

I also see a warning: image

Artifacts are not generated in workspace: image

sameagen-MW commented 9 months ago

@nbhoski are you looking into this or should I check it out? My first thought without looking into it too much is that we might need to adjust the genscript to use the workspace dir.

Vahila commented 9 months ago

@sameagen-MW we were actually wondering which is the intended way here? We had a discussion(in BGL) about the two ways described below.

  1. If user is using -sd option, it means that it is going to be the working directory so one opinion is to generate the artifacts in the starting directory that user specifies
  2. In general user would access the Jenkins artifacts by going to the Project page -> Workspace -> Artifacts. For me, this made sense because of the general Jenkins workflow.
sameagen-MW commented 9 months ago

I think I lean more towards generating the artifacts relative to the Jenkins workspace. I think it's probably more standard for Jenkins users to expect relative paths to resolve relative to the workspace rather than the MATLAB startup directory. If we did decide to keep the behavior like it is right now, I think we'd probably have to clarify somewhere in the documentation.

nbhoski commented 9 months ago

I think I lean more towards generating the artifacts relative to the Jenkins workspace. I think it's probably more standard for Jenkins users to expect relative paths to resolve relative to the workspace rather than the MATLAB startup directory. If we did decide to keep the behavior like it is right now, I think we'd probably have to clarify somewhere in the documentation.

Yes thats what the dilema is. Prolly we could discuss this in our team meeting for some more feedback

nbhoski commented 9 months ago

After discussion to support substitution ${WORKSPACE} we are keeping the behaviour as is. Closing the issue