artilleryio / artillery

The complete load testing platform. Everything you need for production-grade load tests. Serverless & distributed. Load test with Playwright. Load test HTTP APIs, GraphQL, WebSocket, and more. Use any Node.js module.
https://www.artillery.io
Mozilla Public License 2.0
8.06k stars 511 forks source link

Add RepositoryCredentials parameter to run fargate #3393

Open khalilpcp opened 4 weeks ago

khalilpcp commented 4 weeks ago

Version info:

<2.0.20>

I'm working in a company that blocks public images. We need to provide a custom image (mirror of the offcial image). This custom image is hosted on the company artifact repository. To access to this repository we need to provide credentials. The custom image is already supported by artillery with the use of WORKER_IMAGE_URL environnement variable. What we need is a way to provide the repository credentials. This can be done with the use of the RepositoryCredentials in the container definition. What i suggest is to add the following lines :

    if (process.env.REPOSITORY_CREDENTIALS_ARN) {
      artilleryContainerDefinition.repositoryCredentials = {credentialsParameter: process.env.REPOSITORY_CREDENTIALS_ARN};
    }

to this file : packages/artillery/lib/platform/aws-ecs/legacy/run-cluster.js in the function : ensureTaskExists