Address review comments
This commit is contained in:
		| @@ -18,22 +18,17 @@ final jira = [ | ||||
| ] | ||||
|  | ||||
| final jiraVersionMappings = [ | ||||
|   'nexus-repository-manager-single-instance': 'helm-nxrm', | ||||
|   'nexus-repository-manager-aws-resilient-single-instance': 'helm-nxrm-aws-resiliency' | ||||
|   'nexus-repository-manager': 'helm-nxrm', | ||||
|   'nxrm-aws-resiliency': 'helm-nxrm-aws-resiliency' | ||||
| ] | ||||
|  | ||||
| final chartLocation = [ | ||||
|   'nexus-repository-manager-single-instance': 'single-inst-oss-pro-kubernetes', | ||||
|   'nexus-repository-manager-aws-resilient-single-instance': 'aws-single-instance-resiliency' | ||||
|   'nexus-repository-manager': 'nexus-repository-manager', | ||||
|   'nxrm-aws-resiliency': 'nxrm-aws-resiliency' | ||||
| ] | ||||
|  | ||||
| properties([ | ||||
|   parameters([ | ||||
|     choice( | ||||
|       choices: ['', 'nexus-repository-manager-single-instance', 'nexus-repository-manager-aws-resilient-single-instance'], | ||||
|       name: 'chart', | ||||
|       description: 'Chart to deploy.', | ||||
|     ), | ||||
|     string( | ||||
|       name: 'appVersion', | ||||
|       description: 'Version of the application image, like "3.41.0"', | ||||
| @@ -60,9 +55,10 @@ dockerizedBuildPipeline( | ||||
|   buildAndTest: { | ||||
|     sonatypeZionGitConfig() | ||||
|     runSafely "git checkout ${gitBranch(env)}" | ||||
|     runSafely "./upgrade.sh ./${chartLocation[params.chart]} ${chartVersion} ${params.appVersion}" | ||||
|     runSafely "./upgrade.sh ./nexus-repository-manager ${chartVersion} ${params.appVersion}" | ||||
|     runSafely "./upgrade.sh ./nxrm-aws-resiliency ${chartVersion} ${params.appVersion}" | ||||
|     runSafely './build.sh'     | ||||
|     runSafely 'git add aws-single-instance-resiliency single-inst-oss-pro-kubernetes' | ||||
|     runSafely 'git add nxrm-aws-resiliency nexus-repository-manager' | ||||
|   }, | ||||
|   skipVulnerabilityScan: true, | ||||
|   archiveArtifacts: 'docs/*', | ||||
| @@ -99,31 +95,6 @@ dockerizedBuildPipeline( | ||||
|   } | ||||
| ) | ||||
|  | ||||
| String verifyIndexYamlAndTarFile(String chart) { | ||||
|   // Get current version | ||||
|   def indexFile = readYaml file: 'docs/index.yaml' | ||||
|   String version = indexFile.entries[chart][0].version | ||||
|  | ||||
|   // Check tar file | ||||
|   String repo_url = 'https://sonatype.github.io/helm3-charts/' | ||||
|   verifyDownloadLinks( | ||||
|     urlParts: [repo_url, chart, '-', version], | ||||
|     urlSuffixes: ['.tgz'], retryCount: 2, retryDelay: 60 | ||||
|   ) | ||||
|  | ||||
|   // Get repository version | ||||
|   def response = httpRequest "${repo_url}/index.yaml" | ||||
|   def repositoryIndexFile = readYaml text:response.content | ||||
|   String repositoryVersion = repositoryIndexFile.entries[chart][0].version | ||||
|  | ||||
|   if (!version.equals(repositoryVersion)) { | ||||
|     error "Released version: ${version} is different " + | ||||
|           "from helm repository version: ${repositoryVersion}" | ||||
|   } | ||||
|  | ||||
|   return repositoryVersion | ||||
| } | ||||
|  | ||||
| String calculateChartVersion(final String chartVersion, final String appVersion) { | ||||
|   if (chartVersion) { | ||||
|     return chartVersion | ||||
|   | ||||
							
								
								
									
										16
									
								
								build.sh
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								build.sh
									
									
									
									
									
								
							| @@ -17,17 +17,13 @@ helm plugin install https://github.com/quintush/helm-unittest | ||||
| set -e | ||||
|  | ||||
| # lint yaml of charts | ||||
| helm lint ./aws-single-instance-resiliency | ||||
| helm lint ./single-inst-oss-pro-kubernetes | ||||
| helm lint ./nxrm-aws-resiliency | ||||
| helm lint ./nexus-repository-manager | ||||
|  | ||||
| # unit test | ||||
| (cd ./aws-single-instance-resiliency; helm unittest -3 -t junit -o test-output.xml .) | ||||
| (cd ./single-inst-oss-pro-kubernetes; helm unittest -3 -t junit -o test-output.xml .) | ||||
| (cd ./nxrm-aws-resiliency; helm unittest -3 -t junit -o test-output.xml .) | ||||
| (cd ./nexus-repository-manager; helm unittest -3 -t junit -o test-output.xml .) | ||||
|  | ||||
| # package the charts into tgz archives | ||||
| helm package ./aws-single-instance-resiliency --destination docs | ||||
| helm package ./single-inst-oss-pro-kubernetes --destination docs | ||||
|  | ||||
| # index the existing tgz archives | ||||
| cd docs | ||||
| helm repo index . --url https://sonatype.github.io/helm3-charts | ||||
| helm package ./nxrm-aws-resiliency --destination docs | ||||
| helm package ./nexus-repository-manager --destination docs | ||||
|   | ||||
| @@ -1,34 +0,0 @@ | ||||
| ## Helm3 Charts for Sonatype Products | ||||
| ### AWS Single-Instance Resilient Nexus Repository Manager Chart | ||||
| These charts will deploy a Nexus Repository Manager instance to an AWS EKS cluster. | ||||
|  | ||||
| The current release has been tested on AWS EKS running Kubernetes version 1.21 | ||||
|  | ||||
| ### Single-Instance Nexus Repository Manager OSS/Pro Kubernetes Chart | ||||
| These charts are designed to work out of the box with minikube using both Ingress | ||||
| and Ingress DNS addons. | ||||
|  | ||||
| The current releases have been tested on minikube v1.25.1 running Kubernetes v1.23.1. | ||||
|  | ||||
| ### Add the Sonatype Repo to Your Helm | ||||
|  | ||||
| `helm repo add sonatype https://sonatype.github.io/helm3-charts/` | ||||
|  | ||||
| ### Install a Server | ||||
|  | ||||
| - Single-Instance Nexus Repository Manager OSS/Pro: `helm install nexus-repo sonatype/nexus-repository-manager` | ||||
| - AWS Single-Instance Resilient Nexus Repository Manager: `helm install nxrm sonatype/nxrm-aws-resiliency --values values.yaml` | ||||
| - Nexus IQ: `helm install nexus-iq sonatype/nexus-iq-server` | ||||
|  | ||||
| ### Get the Values for Configuring a Chart | ||||
|  | ||||
| - Single-Instance Nexus Repository Manager OSS/Pro: `helm show values sonatype/nexus-repository-manager` | ||||
| - AWS Single-Instance Resilient Nexus Repository Manager: `helm show values sonatype/nxrm-aws-resiliency` | ||||
| - Nexus IQ: `helm show values sonatype/nexus-iq-server` | ||||
|  | ||||
| Capture that output as your own `values.yaml` file, and provide it to the `helm install`  | ||||
| command with the `-f` option. | ||||
|  | ||||
| ### Source | ||||
|  | ||||
| Visit https://github.com/sonatype/helm3-charts. | ||||
		Reference in New Issue
	
	Block a user
	 Olu Shiyanbade
					Olu Shiyanbade