add option for agent build
This commit is contained in:
		
							parent
							
								
									7793f7e5f9
								
							
						
					
					
						commit
						c039838a9e
					
				| @ -15,7 +15,7 @@ HIGHLIGHT_COLOR='\033[0;32m'; | ||||
| NO_COLOR='\033[0m'; | ||||
| 
 | ||||
| function choose_repo() { | ||||
|     read -p "Choose the working project EE/(CE)/(k8s):" REPO | ||||
|     read -p "Choose the working project EE/(CE)/(k8s)/(agent):" REPO | ||||
| 
 | ||||
|     if [ -z "$REPO" ]; then  | ||||
|         REPO="EE"; | ||||
| @ -29,6 +29,9 @@ function choose_repo() { | ||||
| 
 | ||||
|     elif [[ "${REPO}" == "k8s" || "${REPO}" == "ks" ]]; then  | ||||
|         cd ${WORKDIR}/k8s | ||||
| 
 | ||||
|     elif [[ "${REPO}" == "ag" || "${REPO}" == "agent" ]]; then  | ||||
|         cd ${WORKDIR}/agent | ||||
|     fi | ||||
| } | ||||
| 
 | ||||
| @ -129,6 +132,16 @@ function build_portainer_backend() { | ||||
|     build_portainer_backend_without_prompt | ||||
| } | ||||
| 
 | ||||
| function build_portainer_agent() { | ||||
|     choose_repo  | ||||
| 
 | ||||
|     if ! check_branch; then  | ||||
|         exit; | ||||
|     fi | ||||
| 
 | ||||
|     ./dev.sh compile | ||||
| } | ||||
| 
 | ||||
| function build_portainer_all() { | ||||
|     printf "${HIGHLIGHT_COLOR}Build Portainer all${NO_COLOR}\n" | ||||
| 
 | ||||
| @ -179,36 +192,40 @@ function run_before_commit_k8s() { | ||||
| function menu() { | ||||
|     PS3='Please select the option: ' | ||||
|     OPTIONS=( | ||||
|         'Build Portainer All' | ||||
|         'Build Portainer Frontend' | ||||
|         'Build Portainer Backend' | ||||
|         'Run Before Commit' | ||||
|         'Build Portainer EE/CE All' | ||||
|         'Build Portainer EE/CE Frontend' | ||||
|         'Build Portainer EE/CE Backend' | ||||
|         'Run Before Commit [Portainer EE/CE]' | ||||
|         'Run Before Commit [k8s]' | ||||
|         'Build Portainer Agent' | ||||
|         'Cleanup Temporary Volume' | ||||
|         'Run Before COmmit (k8s)' | ||||
|         'Quit' | ||||
|     ) | ||||
| 
 | ||||
|     select opt in "${OPTIONS[@]}" | ||||
|     do | ||||
|         case $opt in  | ||||
|             'Build Portainer All') | ||||
|             'Build Portainer EE/CE All') | ||||
|                 build_portainer_all | ||||
|                 ;; | ||||
|             'Build Portainer Frontend') | ||||
|             'Build Portainer EE/CE Frontend') | ||||
|                 build_portainer_frontend | ||||
|                 ;; | ||||
|             'Build Portainer Backend') | ||||
|             'Build Portainer EE/CE Backend') | ||||
|                 build_portainer_backend | ||||
|                 ;; | ||||
|             'Run Before Commit') | ||||
|             'Run Before Commit [Portainer EE/CE]') | ||||
|                 run_before_commit | ||||
|                 ;; | ||||
|             'Run Before Commit [k8s]') | ||||
|                 run_before_commit_k8s | ||||
|                 ;; | ||||
|             'Build Portainer Agent') | ||||
|                 build_portainer_agent | ||||
|                 ;; | ||||
|             'Cleanup Temporary Volume') | ||||
|                 cleanup_temporary_volume  | ||||
|                 ;; | ||||
|             'Run Before COmmit (k8s)') | ||||
|                 run_before_commit_k8s | ||||
|                 ;; | ||||
|             'Quit') | ||||
|                 break | ||||
|                 ;; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user