Change Netfly npm-registry for using third-party dependencies - npm-registry

I'm using some third-party dependencies hosted on a corporate npm-registry (accessible publically) that fails my angular's app deployment
Is there a way to configure npm for Netfly ?

The solution to override the default npm-registry is to commit your local .npmrc config file in the repo

Related

How to include config files when deploying to Vercel

I have a NextJS project I want to deploy to Vercel. The server needs a config file which is a typescript file containing an object, and is ignored from version control. Obviously when Vercel clones my repo it doesn't get the config file. Is there any way to sideload this config file into Vercel or do I need to fork my own repo privately so I can include the config file?
I've done some research and the only faster way I found is to push directly to Vercel using the cmd/cli.
Here's the doc: https://vercel.com/docs/cli
Another way could be to create two repositories, one private where is your Vercel project linked, and another public without your config file (as you said).

AWS Codestar -- Build with node.js module dependencies

I'm using AWS Codestar. It integrates a number of AWS services so that I can go from git push to deployment.
It uses cloudformation. I have a lambda function that depends on the uuid npm.
How do I include this node dependency in the Codestar build pipeline? Cloudformation SAM use a zip file, and uploads everything to S3:
https://github.com/awslabs/serverless-application-model/blob/master/examples/2016-10-31/inline_swagger/template.yaml#L32
I don't want to build a zip file and put it into the code repo.
My next plan is to attempt running npm install in Codebuild:
http://docs.aws.amazon.com/codebuild/latest/userguide/sample-nodejs-hw.html#sample-nodejs-hw-files
Next plan works. Needed to add the npm in Codebuild. Works great.

Configure npm to resolve dependencies using artifactory as proxy for both npm registry and github

I have a build server with no internet access, and I need to resolve dependencies from both github.com and registry.npmjs.org. The build server has access to Artifactory, so I have created an NPM repo to proxy for registry.npmjs.org and that is working, and I just created a VCS repo to proxy for github.com.
How can I configure npm to resolve from both of these? Since the 2 repos are different types, I can't aggregate them into a single virtual repo. Can NPM be configured to resolve dependencies from both of these?
VCS repos have zero correlation to NPM dependencies. A VCS repo is just a gateway to a set of APIs on the remote git server that will help you cache source binaries (i.e a zip/tarball of a particular branch/tag or even a release). The npm client is not familiar with the REST endpoints that Artifactory exposes for such repos.
For NPM packages that reference github repos inside their package.json (see URLs as dependencies & Git URLs as Dependencies sections here), you want to look into Artifactory's dependency-rewrite mechanism.
Since your NPM client is running on a machine that has no access to the internet, your own package.json files should not depend directly on "github dependencies", since these make the client bypass the registry configuration inside your ~/.npmrc and go directly to github instead of Artifactory.
When the package.json of one of your project's dependencies uses github dependencies, and this package is resolved via Artifactory, the dependency rewrite mechanism modifies the package.json on the fly before returning it to the client, so that subsequent dependency requests to resolve such dependencies are attempted via Artifactory, and not via github -- this is perfect for use cases such as yours.
In summary, you should stick with NPM repositories on Artifactory specifically, but also utilize the dependency rewrite mechanism of the Virtual Repository in order to avoid direct resolution of dependencies via github.
HTH,

Jenkins GitHub OAuth plugin not visible in securityRealm

I set up jenkins and I would like to use Github authenticator. Plug-in was installed properly but in Global Security I can't find Github oauth option in Security Realm and Authorization Strategy.
Is there any dependency for the plug-in (besides these installed automatically) or something?
In plug-ins I had every needed plug-in enabled but still in folder $JENKINS_HOME/plugins there was file github-api.jpi.disabled.
Remove the file and restart Jenkins.
Now Github Anthentication Plugin is visible in Security Realm

Bower install with Artifactory

I’m trying to set up an operation where the only internet access to external repos is via artifactory server. I have followed the bower information on this web page http://www.jfrog.com/confluence/display/RTF/Bower+Repositories
I can successfully do the npm installs of bower-art-resolver as described (utilizing npm remote repository for npmjs in artifactory), but then trying to do the example bower install of bootstrap it fails because bower is attempting to find git://github.com/twbs/bootstrap.git and I don't have an access to github.com due to firewalls.
How do I make the full bower workflow work then if having the bower registry remote repository is not suffient to make the setup work? Is there some way that the artifactory VCS functions come into play? How would I make bower utilize that instead of trying to reach github.com?
This firewall scenario seems like a common use case for a repository server, so I'm sure I'm missing something.
Make sure you are doing the following:
(1) Create a remote repository in Artifactory proxying the Bower registry. Notice that Artifactory will need to access both the Bower registry and Github.
(2) Configure Bower to use the Artifactory repository you created in the previous step as the Bower registry. This should be done in the .bowerrc file, for example:
{
"registry": "http://localhost:8081/artifactory/api/bower/bower-repo"
}
(3) Use bower-art instead of bower when installing packages, for example:
bower-art install bootstrap