Skip to content
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

Add new stage arguments #141

Merged
merged 5 commits into from
Jul 8, 2021
Merged

Add new stage arguments #141

merged 5 commits into from
Jul 8, 2021

Conversation

t1m0thyj
Copy link
Member

@t1m0thyj t1m0thyj commented Jul 7, 2021

  • pipeline.setup - "customInstallScript" to specify an NPM script to run in place of "npm install"
  • pipeline.version - "inDir" to specify a subdirectory where "npm version" should be run
  • pipeline.publish - "inDir" to specify a subdirectory where "npm publish" should be run

t1m0thyj added 4 commits July 7, 2021 08:53
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
@t1m0thyj t1m0thyj requested review from zFernand0 and awharn July 7, 2021 19:54
Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 😋

@@ -926,7 +934,11 @@ class NodeJSPipeline extends GenericPipeline {
branch = changeInfo.branchName
}

steps.sh "npm install"
if (arguments.customInstallScript) {
steps.sh "npm run ${arguments.customInstallScript}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assumes that the script has to be inlucede in the package.json#scripts object.
Wondering if it's be good if customInstallScript == "${one-liner shell script}"

It could potentially lead to other problems, (like not properly quoting something)
So, Not a good idea 😋

Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
@t1m0thyj t1m0thyj merged commit 55228bb into master Jul 8, 2021
@t1m0thyj t1m0thyj deleted the feature-indir branch July 8, 2021 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants