Skip to content

Commit

Permalink
Add ability to set auto block and HTTP settings for proxy repos (ansi…
Browse files Browse the repository at this point in the history
  • Loading branch information
brianveltman authored Dec 16, 2023
1 parent 16e0f03 commit 186fd70
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,11 @@ Feel free to use them or implement your own install scenario at your convenience
nexus_repos_npm_proxy:
- name: npm-proxy-name
blob_store: company-artifacts
blocked: false # Default is false
auto_block: true # Default is true
connection_timeout: 200 # Default is unset
connection_retries: 5 # Default is unset
user_agent_suffix: custom-agent # Default is unset
remote_url: https://some-private-registry.dev/
remote_username: 'secret-username'
remote_password: "{{ vault_alfresco_secret_password }}"
Expand Down
7 changes: 5 additions & 2 deletions files/groovy/create_repos_from_list.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,13 @@ parsed_args.each { currentRepo ->
// Configs for all proxy repos
if (currentRepo.type == 'proxy') {
configuration.attributes['httpclient'] = [
blocked : false,
autoBlock : true,
blocked : currentRepo.get('blocked', false),
autoBlock : currentRepo.get('auto_block', true),
connection : [
useTrustStore: false,
timeout: currentRepo.get('connection_timeout', null),
retries: currentRepo.get('connection_retries', null),
userAgentSuffix: currentRepo.get('user_agent_suffix', null),
enableCircularRedirects: currentRepo.get('enable_circular_redirects', false),
enableCookies: currentRepo.get('enable_cookies', false)
]
Expand Down
7 changes: 7 additions & 0 deletions molecule/nexus_common_test_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ nexus_repos_npm_proxy:
negative_cache_enabled: false
enable_circular_redirects: true
enable_cookies: true
connection_timeout: 300
connection_retries: 5
- name: npm-registry-blocked
remote_url: https://registry.npmjs.org/
blocked: true
auto_block: false
user_agent_suffix: custom-agent

nexus_repos_yum_hosted:
- name: private_yum_centos_7
Expand Down

0 comments on commit 186fd70

Please sign in to comment.