-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gulp@1 doesn't respect projects in subfolders #11246
Comments
- added a sample project to demonstrate usage - renamed some input parameters for consistency - added input parameter `pool` to support overriding the agent vm / pool used by consumers - added input parameter `working_directory` to support projects that not in the root, rather in a subfolder of the repo (*note: this is only possible by reverting to the beta Gulp pipeline task as logged in this bug report: microsoft/azure-pipelines-tasks#11246) - updated readme
- added a sample project to demonstrate usage - renamed some input parameters for consistency - added input parameter `pool` to support overriding the agent vm / pool used by consumers - added input parameter `working_directory` to support projects that not in the root, rather in a subfolder of the repo (*note: this is only possible by reverting to the beta Gulp pipeline task as logged in this bug report: microsoft/azure-pipelines-tasks#11246) - updated readme
@andrewconnell I'm not seeing what you're seeing, but I don't want to toss this back as "can't repro". Can you provide logs for a failing build? Run with system diagnostics enabled. Thanks! |
- initially had an issue setting the working directory for the gulp@1 task - submitted bug here: microsoft/azure-pipelines-tasks#11246 (comment) - forcing repro
- initially had an issue setting the working directory for the gulp@1 task - submitted bug here: microsoft/azure-pipelines-tasks#11246 (comment) - forcing repro
- initially had an issue setting the working directory for the gulp@1 task - submitted bug here: microsoft/azure-pipelines-tasks#11246 (comment) - forcing repro
- initially had an issue setting the working directory for the gulp@1 task - submitted bug here: microsoft/azure-pipelines-tasks#11246 (comment) - forcing repro
I can still repro it... did you notice the link to the public forum post where someone from MSFT was also able to repro it? Here's a project that shows it in action: https://github.com/Voitanos/azure-pipelines-spfx-templates. It is a public repo that contains job templates for a specific type of dev. The sample in the project demonstrates the issue. Working sample using "Gulp@0" + workaroundThe project within ./sample contains the pipeline... the master branch uses the task Gulp@0 without the You can see a working build from the master branch: https://dev.azure.com/aconn/Azure%20Pipelines%20SPFx%20Templates/_build/results?buildId=501&view=logs&s=6884a131-87da-5381-61f3-d7acc3b91d76 Repro sample using "Gulp@1" that doesn't work using the
|
- initially had an issue setting the working directory for the gulp@1 task - submitted bug here: microsoft/azure-pipelines-tasks#11246 (comment) - forcing repro
If you look at the task source, you'll see that we check for the existence of the gulpfile before we set the current working directory based on the input parameter. The difference between your two pipelines is that you're setting a full path to the gulpfile for your Technically this is a breaking change, but |
Makes sense... thanks for looking into it. FWIW, when setting the Agreed on the requested part about the gulpFile parameter. A default value (where I suspect 99.999% of all projects use the name gulpfile.js) should make it optional. |
No problem! Agreed, I'm going to change Gulp@1 to set the PWD before searching for the gulpfile. The fix will go out with our next round of deployments, which is about three weeks out. |
Fixed with #11361. |
- previously v1 didn't work with the parameter - workaround was to use Gulpv0 task & set the full path to gulpfile.js - reported as bug & fixed by Microsoft engineering: microsoft/azure-pipelines-tasks#11246 - closes #5
- previously v1 didn't work with the parameter - workaround was to use Gulpv0 task & set the full path to gulpfile.js - reported as bug & fixed by Microsoft engineering: microsoft/azure-pipelines-tasks#11246 - closes #5
- previously v1 didn't work with the parameter - workaround was to use Gulpv0 task & set the full path to gulpfile.js - reported as bug & fixed by Microsoft engineering: microsoft/azure-pipelines-tasks#11246 - closes #5
- previously v1 didn't work with the parameter - workaround was to use Gulpv0 task & set the full path to gulpfile.js - reported as bug & fixed by Microsoft engineering: microsoft/azure-pipelines-tasks#11246 - closes #5
- previously v1 didn't work with the parameter - workaround was to use Gulpv0 task & set the full path to gulpfile.js - reported as bug & fixed by Microsoft engineering: microsoft/azure-pipelines-tasks#11246 - closes #5
Required Information
Type: Bug
Enter Task Name: Gulp@1 & Gulp@0
Environment
ubuntu-latest
Issue Description
I'm creating reusable templates for a specific project type (SharePoint Framework). Most consumers of the templates (such as this test project) will have their projects in the root repo. However, I've added another project to my repo that contains the templates. To support both scenarios, I support the consumer of the template to specify the
working_directory
as a path to the subfolder of the project if it is not in the root of the repo.Task
Gulp@1
does not respect theworkingDirectory
orgulpFile
input parameters to set the path to a subfolder in the repo; it always looks for thegulpfile.js
in the root of the current repo.Task
Gulp@0
does respect thegulpFile
input parameter to set the path to a subfolder in the repo (IOW, this works & is what I'm doing now), butworkingDirectory
is not respected.If you look at the highlighted code in this specific commit, you'll see two tasks:
script
&Gulp@0
. This commit is working, but it shows how theworkingDirectory
folder on thescript
task is working as expected, CD'ing into the subfolder before executing the command. However, I can't do the same thing withGulp@*
, rather I have to explicitly set the path to thegulpfile.js
From my POV, on the
Gulp@1
task, theworkingDirectory
input property should cause the task to CD into the folder specified before runninggulp
orgulpjs
, similar to how theShellScript
task works. As it's working now,workingDirectory
is ignored in both v0 & v1 of the task & setting thegulpFile
input property on v1 does not work. Further, the use ofworkingDirectory
is not consistent in theGulp@*
tasks compared to other tasks.The text was updated successfully, but these errors were encountered: