deploy-templates/templates/cm/scripts/nexus_scripts.yaml [123:138]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            ])

    def existingRepository = repository.getRepositoryManager().get(parsed_args.name)
    def cleanupPolicyAttribute = [policyName: [parsed_args.cleanup_policy_name].toSet()]

    if (existingRepository != null) {
        existingRepository.stop()
        configuration.attributes['storage']['blobStoreName'] = existingRepository.configuration.attributes['storage']['blobStoreName']
        configuration.entityMetadata=existingRepository.configuration.entityMetadata
        configuration.getAttributes().put("cleanup", cleanupPolicyAttribute)
        existingRepository.update(configuration)
        existingRepository.start()
    } else {
        configuration.getAttributes().put("cleanup", cleanupPolicyAttribute)
        repository.getRepositoryManager().create(configuration)
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



deploy-templates/templates/cm/scripts/nexus_scripts.yaml [247:262]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                              ])

    def existingRepository = repository.getRepositoryManager().get(parsed_args.name)
    def cleanupPolicyAttribute = [policyName: [parsed_args.cleanup_policy_name].toSet()]

    if (existingRepository != null) {
        existingRepository.stop()
        configuration.attributes['storage']['blobStoreName'] = existingRepository.configuration.attributes['storage']['blobStoreName']
        configuration.entityMetadata=existingRepository.configuration.entityMetadata
        configuration.getAttributes().put("cleanup", cleanupPolicyAttribute)
        existingRepository.update(configuration)
        existingRepository.start()
    } else {
        configuration.getAttributes().put("cleanup", cleanupPolicyAttribute)
        repository.getRepositoryManager().create(configuration)
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



