#48 Add jenkins install/delete to Makefile
Merged 4 years ago by mkovarik. Opened 4 years ago by pbortlov.
pbortlov/c3i-library install-delete-jenkins  into  master

file modified
+20 -1
@@ -24,6 +24,25 @@ 

  			--param-file ./$(JOBS_DIR)/$${job}.env | $(OC_CMD) apply -f -; \

  		echo "[PIPELINE] Pipeline job \"$${job}\" updated" ; \

  	done

+ 

+ create-jenkins-is:

+ 	$(OC_CMD) import-image jenkins:2 --confirm --scheduled=true \

+ 		--from=registry.access.redhat.com/openshift3/jenkins-2-rhel7:v3.11

+ 

+ get-jenkins-plugins:

+ 	$(shell ./get-all-jenkins-plugins.sh)

+ 

+ install-jenkins: create-jenkins-is get-jenkins-plugins

+ 	$(OC_CMD) new-app --template=jenkins-persistent \

+ 		-p MEMORY_LIMIT=2Gi \

+ 		-p VOLUME_CAPACITY=2Gi \

+ 		-p NAMESPACE=$(shell $(OC_CMD) project -q) \

+ 		-e INSTALL_PLUGINS=$(shell cat default-jenkins-plugins.txt) \

+ 		-e JENKINS_JAVA_OVERRIDES="-Dpermissive-script-security.enabled=no_security"

+ 

+ remove-jenkins:

+ 	$(OC_CMD) delete -l app=jenkins-persistent all,sa,rolebindings,pvc

+ 

  uninstall:

  	@for job in $(JOBS); do \

  		echo "[PIPELINE] Deleting pipeline job \"$${job}\"..." ; \
@@ -32,4 +51,4 @@ 

  			--param-file ./$(JOBS_DIR)/$${job}.env | $(OC_CMD) delete -f -; \

  		echo "[PIPELINE] Pipeline job \"$${job}\" deleted" ; \

  	done

- .PHONY: help install uninstall

+ .PHONY: help install install-jenkins remove-jenkins uninstall

@@ -0,0 +1,5 @@ 

+ #!/bin/bash

+ 

+ curl https://raw.githubusercontent.com/openshift/jenkins/master/2/contrib/openshift/base-plugins.txt | grep -v "#" |grep -v '^$' | sed 's/:.*/:latest/'| tr '\n' ',' > default-jenkins-plugins.txt

+ 

+ cat jenkins-plugins.txt | tr '\n' ',' >> default-jenkins-plugins.txt

@@ -0,0 +1,6 @@ 

+ script-security:latest

+ permissive-script-security:latest

+ timestamper:latest

+ http_request:latest

+ antisamy-markup-formatter:latest

+ update-sites-manager:latest

  • add install-jenkins and delet-jenkins to Makefile
  • create jenkins-plugins.txt with list of the Jenkins plugins with versions
    @mkovarik

1 new commit added

  • Consolidate jenkins plugins
4 years ago

1 new commit added

  • Remove prometheus
4 years ago

Pull-Request has been merged by mkovarik

4 years ago