From c2aa1632e62d0625c1dc4015d0d6763f406c2721 Mon Sep 17 00:00:00 2001 From: Jack Zhao Date: Sun, 13 May 2018 17:05:16 -0700 Subject: [PATCH] Fix e2e:docker script (#4454) * verdaccio configs * verdaccio configs * fix typo * revert e2e-installs * move config to tasks --- tasks/e2e-kitchensink.sh | 2 +- tasks/e2e-monorepos.sh | 2 +- tasks/e2e-simple.sh | 2 +- tasks/local-test.sh | 2 +- tasks/verdaccio.yaml | 49 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 tasks/verdaccio.yaml diff --git a/tasks/e2e-kitchensink.sh b/tasks/e2e-kitchensink.sh index fee4c61681f..b40a487ae4b 100755 --- a/tasks/e2e-kitchensink.sh +++ b/tasks/e2e-kitchensink.sh @@ -79,7 +79,7 @@ yarn # Start local registry tmp_registry_log=`mktemp` -nohup npx verdaccio@2.7.2 &>$tmp_registry_log & +nohup npx verdaccio@2.7.2 -c tasks/verdaccio.yaml &>$tmp_registry_log & # Wait for `verdaccio` to boot grep -q 'http address' <(tail -f $tmp_registry_log) diff --git a/tasks/e2e-monorepos.sh b/tasks/e2e-monorepos.sh index a84f98bd7fe..ac7609e79e2 100755 --- a/tasks/e2e-monorepos.sh +++ b/tasks/e2e-monorepos.sh @@ -73,7 +73,7 @@ yarn # Start local registry tmp_registry_log=`mktemp` -nohup npx verdaccio@2.7.2 &>$tmp_registry_log & +nohup npx verdaccio@2.7.2 -c tasks/verdaccio.yaml &>$tmp_registry_log & # Wait for `verdaccio` to boot grep -q 'http address' <(tail -f $tmp_registry_log) diff --git a/tasks/e2e-simple.sh b/tasks/e2e-simple.sh index 75f9dae70c8..701763679c5 100755 --- a/tasks/e2e-simple.sh +++ b/tasks/e2e-simple.sh @@ -86,7 +86,7 @@ yarn # Start local registry tmp_registry_log=`mktemp` -nohup npx verdaccio@2.7.2 &>$tmp_registry_log & +nohup npx verdaccio@2.7.2 -c tasks/verdaccio.yaml &>$tmp_registry_log & # Wait for `verdaccio` to boot grep -q 'http address' <(tail -f $tmp_registry_log) diff --git a/tasks/local-test.sh b/tasks/local-test.sh index dc70b3b2f19..877c6709717 100755 --- a/tasks/local-test.sh +++ b/tasks/local-test.sh @@ -98,7 +98,7 @@ ${apply_changes} node --version npm --version set +x -${test_command} && echo -e "\n\e[1;32m✔ Job passed\e[0m" || echo -e "\n\e[1;31m✘ Job failes\e[0m" +${test_command} && echo -e "\n\e[1;32m✔ Job passed\e[0m" || echo -e "\n\e[1;31m✘ Job failed\e[0m" $([[ ${interactive} == 'true' ]] && echo 'bash') CMD diff --git a/tasks/verdaccio.yaml b/tasks/verdaccio.yaml new file mode 100644 index 00000000000..e8a621ed0a4 --- /dev/null +++ b/tasks/verdaccio.yaml @@ -0,0 +1,49 @@ +# +# This is the default config file. It allows all users to do anything, +# so don't use it on production systems. +# +# Look here for more config file examples: +# https://github.com/verdaccio/verdaccio/tree/master/conf +# + +# path to a directory with all packages +storage: ./storage + +auth: + htpasswd: + file: ./htpasswd + # Maximum amount of users allowed to register, defaults to "+inf". + # You can set this to -1 to disable registration. + #max_users: 1000 + +# a list of other known repositories we can talk to +uplinks: + npmjs: + url: https://registry.npmjs.org/ + +packages: + '@*/*': + # scoped packages + access: $all + publish: $ll + proxy: npmjs + + '**': + # allow all users (including non-authenticated users) to read and + # publish all packages + # + # you can specify usernames/groupnames (depending on your auth plugin) + # and three keywords: "$all", "$anonymous", "$authenticated" + access: $all + + # allow all known users to publish packages + # (anyone can register by default, remember?) + publish: $all + + # if package is not available locally, proxy requests to 'npmjs' registry + proxy: npmjs + +# log settings +logs: + - {type: stdout, format: pretty, level: http} + #- {type: file, path: verdaccio.log, level: info}