| 
									
										
										
										
											2017-03-23 15:20:18 +08:00
										 |  |  | ### Variables
 | 
					
						
							|  |  |  | Variable           | Description | 
					
						
							|  |  |  | -------------------|------------- | 
					
						
							|  |  |  | BASEIMAGE          | Container base image, default: photon | 
					
						
							|  |  |  | DEVFLAG            | Build model flag, default: dev | 
					
						
							|  |  |  | COMPILETAG         | Compile model flag, default: compile_normal (local golang build) | 
					
						
							|  |  |  | GOBUILDIMAGE       | Golang image to compile harbor go source code. | 
					
						
							|  |  |  | NOTARYFLAG         | Whether to enable notary in harbor, default:false | 
					
						
							|  |  |  | HTTPPROXY          | Clarity proxy to build UI. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ### Targets
 | 
					
						
							|  |  |  | Target              | Description | 
					
						
							|  |  |  | --------------------|------------- | 
					
						
							| 
									
										
										
										
											2017-04-05 11:12:00 +08:00
										 |  |  | all                 | prepare env, compile binaries, build images and install images | 
					
						
							| 
									
										
										
										
											2017-03-23 15:20:18 +08:00
										 |  |  | prepare             | prepare env | 
					
						
							|  |  |  | compile             | compile ui and jobservice code | 
					
						
							| 
									
										
										
										
											2018-09-08 19:11:44 +08:00
										 |  |  | compile_portal      | compile portal code | 
					
						
							| 
									
										
										
										
											2019-02-22 16:34:26 +08:00
										 |  |  | compile_core        | compile core binary | 
					
						
							| 
									
										
										
										
											2017-03-23 15:20:18 +08:00
										 |  |  | compile_jobservice  | compile jobservice binary | 
					
						
							|  |  |  | build               | build Harbor docker images (default: using build_photon) | 
					
						
							|  |  |  | build_photon        | build Harbor docker images from Photon OS base image | 
					
						
							|  |  |  | install             | compile binaries, build images, prepare specific version of compose file and startup Harbor instance | 
					
						
							| 
									
										
										
										
											2017-04-05 11:12:00 +08:00
										 |  |  | start               | startup Harbor instance | 
					
						
							| 
									
										
										
										
											2017-03-23 15:20:18 +08:00
										 |  |  | down                | shutdown Harbor instance | 
					
						
							|  |  |  | package_online      | prepare online install package | 
					
						
							|  |  |  | package_offline     | prepare offline install package | 
					
						
							|  |  |  | pushimage           | push Harbor images to specific registry server | 
					
						
							|  |  |  | clean all           | remove binary, Harbor images, specific version docker-compose file, specific version tag and online/offline install package | 
					
						
							|  |  |  | cleanbinary         | remove ui and jobservice binary | 
					
						
							| 
									
										
										
										
											2017-04-05 11:12:00 +08:00
										 |  |  | cleanimage          | remove Harbor images | 
					
						
							|  |  |  | cleandockercomposefile  | remove specific version docker-compose | 
					
						
							| 
									
										
										
										
											2017-03-23 15:20:18 +08:00
										 |  |  | cleanversiontag     | remove specific version tag | 
					
						
							|  |  |  | cleanpackage        | remove online/offline install package | 
					
						
							|  |  |  | version				 | set harbor version | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #### EXAMPLE:
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #### Build and run harbor from source code.
 | 
					
						
							| 
									
										
										
										
											2018-11-26 13:27:57 +08:00
										 |  |  | make install GOBUILDIMAGE=golang:1.11.2 COMPILETAG=compile_golangimage NOTARYFLAG=true | 
					
						
							| 
									
										
										
										
											2017-03-23 15:20:18 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | ### Package offline installer
 | 
					
						
							| 
									
										
										
										
											2018-11-26 13:27:57 +08:00
										 |  |  | make package_offline GOBUILDIMAGE=golang:1.11.2 COMPILETAG=compile_golangimage NOTARYFLAG=true | 
					
						
							| 
									
										
										
										
											2017-03-23 15:20:18 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | ### Start harbor with notary
 | 
					
						
							|  |  |  | make -e NOTARYFLAG=true start | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ### Stop harbor with notary
 | 
					
						
							| 
									
										
										
										
											2017-04-05 11:12:00 +08:00
										 |  |  | make -e NOTARYFLAG=true down |