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

Custom engine/plugin in private artifactory (run-lambda) #3224

Closed
Plitzer opened this issue Jun 24, 2024 · 2 comments
Closed

Custom engine/plugin in private artifactory (run-lambda) #3224

Plitzer opened this issue Jun 24, 2024 · 2 comments

Comments

@Plitzer
Copy link

Plitzer commented Jun 24, 2024

When using a custom plugin or engine published to a private repo, running artillery with run-lambda does not work because the container can't access the private repo to pull down the engine/plugin packages.
I suspect this wasn't an issue previously using the bundling method as the zip was created locally but now custom engines/plugins are installed from within the containe, which doesn't have the right credentials.

Is there any way to get this to work that I'm missing? I haven't seen anything in the docs or other issues/discussions like this one. I've got a custom engine within my organisation that relies on some private dependencies in artifactory, and the engine itself is also published on our private artifactory.

Version info:

Artillery: 2.0.15
Node.js:   v18.17.0
OS:        darwin

Running this command:

artillery run-lambda myTest.yml --region ap-southeast-2

I expected to see this happen:

Dependenices from a private repo can be installed via some kind of configuration somewhere with appropriate credentials

Instead, this happened:

Lambda throws error during npm install as it can't find the private package on registry.npmjs.org, because it lives in a private artifactory repo

Files being used:
Not relevant

@Plitzer Plitzer changed the title Custom engine/plugin in private artifactory on lambda Custom engine/plugin in private artifactory (run-lambda) Jun 24, 2024
@bernardobridge
Copy link
Contributor

bernardobridge commented Jun 24, 2024

Hey @Plitzer 👋

At the moment we don't have first-class support for private registries in Lambda, but we intend to make this work similar to Fargate at some point. If you need this, Fargate might be a solution for you in the meantime.

Another potential solution (untested), is to use includeFiles to include the npmrc file in the bundle. This is currently documented in the wrong section in our docs, but we'll get that fixed. It should work like this though: https://www.artillery.io/docs/artillery-pro/running-tests-with-pro#explicitly-bundling-files-with-the-test . Bear in mind this would copy the .npmrc file onto the S3 bucket (together with other test files), so do make sure that is not exposed in any way.


Edit: documentation for includeFiles is now available here: https://www.artillery.io/docs/reference/test-script#includefiles---explicitly-bundling-files-with-the-test

@Plitzer
Copy link
Author

Plitzer commented Jun 25, 2024

Hey @bernardobridge that worked great! This should be suitable for what I need, thanks!

@Plitzer Plitzer closed this as completed Jun 25, 2024
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

No branches or pull requests

2 participants