@depup/artillery 2.0.30-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -0
- package/bin/run +29 -0
- package/bin/run.cmd +3 -0
- package/changes.json +138 -0
- package/console-reporter.js +1 -0
- package/lib/artillery-global.js +33 -0
- package/lib/cli/banner.js +8 -0
- package/lib/cli/common-flags.js +80 -0
- package/lib/cli/hooks/version.js +20 -0
- package/lib/cmds/dino.js +109 -0
- package/lib/cmds/quick.js +122 -0
- package/lib/cmds/report.js +34 -0
- package/lib/cmds/run-aci.js +91 -0
- package/lib/cmds/run-fargate.js +192 -0
- package/lib/cmds/run-lambda.js +96 -0
- package/lib/cmds/run.js +671 -0
- package/lib/console-capture.js +92 -0
- package/lib/console-reporter.js +438 -0
- package/lib/create-bom/built-in-plugins.js +12 -0
- package/lib/create-bom/create-bom.js +301 -0
- package/lib/dispatcher.js +9 -0
- package/lib/dist.js +222 -0
- package/lib/index.js +5 -0
- package/lib/launch-platform.js +439 -0
- package/lib/load-plugins.js +113 -0
- package/lib/platform/aws/aws-cloudwatch.js +106 -0
- package/lib/platform/aws/aws-create-sqs-queue.js +58 -0
- package/lib/platform/aws/aws-ensure-s3-bucket-exists.js +78 -0
- package/lib/platform/aws/aws-get-account-id.js +26 -0
- package/lib/platform/aws/aws-get-bucket-region.js +18 -0
- package/lib/platform/aws/aws-get-credentials.js +28 -0
- package/lib/platform/aws/aws-get-default-region.js +26 -0
- package/lib/platform/aws/aws-whoami.js +15 -0
- package/lib/platform/aws/constants.js +7 -0
- package/lib/platform/aws/iam-cf-templates/aws-iam-fargate-cf-template.yml +219 -0
- package/lib/platform/aws/iam-cf-templates/aws-iam-lambda-cf-template.yml +125 -0
- package/lib/platform/aws/iam-cf-templates/gh-oidc-fargate.yml +241 -0
- package/lib/platform/aws/iam-cf-templates/gh-oidc-lambda.yml +153 -0
- package/lib/platform/aws-ecs/ecs.js +247 -0
- package/lib/platform/aws-ecs/legacy/aws-util.js +134 -0
- package/lib/platform/aws-ecs/legacy/bom.js +528 -0
- package/lib/platform/aws-ecs/legacy/constants.js +27 -0
- package/lib/platform/aws-ecs/legacy/create-s3-client.js +24 -0
- package/lib/platform/aws-ecs/legacy/create-test.js +247 -0
- package/lib/platform/aws-ecs/legacy/errors.js +34 -0
- package/lib/platform/aws-ecs/legacy/find-public-subnets.js +149 -0
- package/lib/platform/aws-ecs/legacy/plugins/artillery-plugin-inspect-script/index.js +27 -0
- package/lib/platform/aws-ecs/legacy/plugins/artillery-plugin-sqs-reporter/azure-aqs.js +80 -0
- package/lib/platform/aws-ecs/legacy/plugins/artillery-plugin-sqs-reporter/index.js +202 -0
- package/lib/platform/aws-ecs/legacy/plugins.js +16 -0
- package/lib/platform/aws-ecs/legacy/run-cluster.js +1994 -0
- package/lib/platform/aws-ecs/legacy/sqs-reporter.js +401 -0
- package/lib/platform/aws-ecs/legacy/tags.js +22 -0
- package/lib/platform/aws-ecs/legacy/test-run-status.js +9 -0
- package/lib/platform/aws-ecs/legacy/time.js +67 -0
- package/lib/platform/aws-ecs/legacy/util.js +97 -0
- package/lib/platform/aws-ecs/worker/Dockerfile +64 -0
- package/lib/platform/aws-ecs/worker/helpers.sh +80 -0
- package/lib/platform/aws-ecs/worker/loadgen-worker +656 -0
- package/lib/platform/aws-lambda/dependencies.js +130 -0
- package/lib/platform/aws-lambda/index.js +734 -0
- package/lib/platform/aws-lambda/lambda-handler/a9-handler-dependencies.js +73 -0
- package/lib/platform/aws-lambda/lambda-handler/a9-handler-helpers.js +43 -0
- package/lib/platform/aws-lambda/lambda-handler/a9-handler-index.js +235 -0
- package/lib/platform/aws-lambda/lambda-handler/package.json +15 -0
- package/lib/platform/aws-lambda/prices.js +29 -0
- package/lib/platform/az/aci.js +694 -0
- package/lib/platform/az/aqs-queue-consumer.js +88 -0
- package/lib/platform/az/regions.js +52 -0
- package/lib/platform/cloud/api.js +72 -0
- package/lib/platform/cloud/cloud.js +448 -0
- package/lib/platform/cloud/http-client.js +19 -0
- package/lib/platform/local/artillery-worker-local.js +154 -0
- package/lib/platform/local/index.js +174 -0
- package/lib/platform/local/worker.js +261 -0
- package/lib/platform/worker-states.js +13 -0
- package/lib/queue-consumer/index.js +56 -0
- package/lib/stash.js +41 -0
- package/lib/telemetry.js +78 -0
- package/lib/util/await-on-ee.js +24 -0
- package/lib/util/generate-id.js +9 -0
- package/lib/util/parse-tag-string.js +21 -0
- package/lib/util/prepare-test-execution-plan.js +216 -0
- package/lib/util/sleep.js +7 -0
- package/lib/util/validate-script.js +132 -0
- package/lib/util.js +294 -0
- package/lib/utils-config.js +31 -0
- package/package.json +323 -0
- package/types.d.ts +317 -0
- package/util.js +1 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
ARTIFACTORY_AUTH="${ARTIFACTORY_AUTH:-"null"}"
|
|
4
|
+
ARTIFACTORY_EMAIL="${ARTIFACTORY_EMAIL:-"null"}"
|
|
5
|
+
NPM_REGISTRY="${NPM_REGISTRY:-"null"}"
|
|
6
|
+
NPM_TOKEN="${NPM_TOKEN:-"null"}"
|
|
7
|
+
NPM_SCOPE="${NPM_SCOPE:-"null"}"
|
|
8
|
+
NPMRC="${NPMRC:-"null"}"
|
|
9
|
+
|
|
10
|
+
generate_npmrc () {
|
|
11
|
+
if [[ "$ARTIFACTORY_AUTH" != "null" ]] && [[ "$ARTIFACTORY_EMAIL" != "null" ]] ; then
|
|
12
|
+
echo "_auth=$ARTIFACTORY_AUTH"
|
|
13
|
+
echo "email=$ARTIFACTORY_EMAIL"
|
|
14
|
+
echo "always-auth=true"
|
|
15
|
+
else
|
|
16
|
+
# If only one is set - print a diagnostic message;
|
|
17
|
+
# otherwise neither is set so do nothing.
|
|
18
|
+
if [[ "$ARTIFACTORY_AUTH" != "null" ]] || [[ "$ARTIFACTORY_EMAIL" != "null" ]] ; then
|
|
19
|
+
echo "Both ARTIFACTORY_AUTH and ARTIFACTORY_EMAIL must be set for Artifactory auth to work"
|
|
20
|
+
fi
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
# NOTE: Default value for NPM_SCOPE and NPM_TOKEN is "null"
|
|
24
|
+
if [[ "$NPM_REGISTRY" == "null" ]] ; then
|
|
25
|
+
NPM_REGISTRY="https://registry.npmjs.org/"
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
NPM_REGISTRY_BASE="${NPM_REGISTRY#http:}"
|
|
29
|
+
NPM_REGISTRY_BASE="${NPM_REGISTRY#https:}"
|
|
30
|
+
|
|
31
|
+
NPM_TOKEN="${NPM_TOKEN:-"null"}"
|
|
32
|
+
NPM_SCOPE="${NPM_SCOPE:-"null"}"
|
|
33
|
+
|
|
34
|
+
# Set registry URL:
|
|
35
|
+
# npm config set registry "$NPM_REGISTRY"
|
|
36
|
+
echo "registry=${NPM_REGISTRY}"
|
|
37
|
+
|
|
38
|
+
if [[ ! "$NPM_TOKEN" = "null" ]] ; then
|
|
39
|
+
echo "${NPM_REGISTRY_BASE}:_authToken=${NPM_TOKEN}"
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
if [[ "$NPM_SCOPE" != "null" ]] ; then
|
|
43
|
+
if [[ "$NPM_SCOPE_REGISTRY" != "null" ]] ; then
|
|
44
|
+
echo "${NPM_SCOPE}:registry=${NPM_SCOPE_REGISTRY}"
|
|
45
|
+
else
|
|
46
|
+
# npm config set "${NPM_SCOPE}:registry" "$NPM_REGISTRY"
|
|
47
|
+
echo "${NPM_SCOPE}:registry=${NPM_REGISTRY}"
|
|
48
|
+
fi
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
# Any extra bits from the user:
|
|
52
|
+
if [[ "$NPMRC" != "null" ]] ; then
|
|
53
|
+
echo "$NPMRC"
|
|
54
|
+
fi
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
base64d () {
|
|
58
|
+
# Not expecting any tabs or newlines in the input so not read'ing in a loop.
|
|
59
|
+
read encoded
|
|
60
|
+
if [[ "$(uname)" == "Darwin" ]] ; then
|
|
61
|
+
printf "%s" "$encoded" | base64 -D
|
|
62
|
+
elif [[ "$(uname)" == "Linux" ]] ; then
|
|
63
|
+
printf "%s" "$encoded" | base64 -d
|
|
64
|
+
else
|
|
65
|
+
printf "Unknown platform: $(uname)"
|
|
66
|
+
# shellcheck disable=SC2034
|
|
67
|
+
EXIT_CODE=$ERR_UNKNOWN_PLATFORM
|
|
68
|
+
exit
|
|
69
|
+
fi
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
debug () {
|
|
73
|
+
if [[ -n $DEBUG ]] ; then
|
|
74
|
+
printf -- "%s\\n" "$@"
|
|
75
|
+
fi
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
progress () {
|
|
79
|
+
printf "******** [$worker_id] %s\\n" "$1"
|
|
80
|
+
}
|