From 0b64c44a03aef1672af3da5804b923769a98ce54 Mon Sep 17 00:00:00 2001 From: Pavlina Bortlova Date: Mar 12 2020 09:29:33 +0000 Subject: Consolidate jenkins plugins --- diff --git a/c3iaas/Makefile b/c3iaas/Makefile index bf47090..7d0cbfc 100644 --- a/c3iaas/Makefile +++ b/c3iaas/Makefile @@ -29,15 +29,18 @@ create-jenkins-is: $(OC_CMD) import-image jenkins:2 --confirm --scheduled=true \ --from=registry.access.redhat.com/openshift3/jenkins-2-rhel7:v3.11 -install-jenkins: create-jenkins-is +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 jenkins-plugins.txt) \ + -e INSTALL_PLUGINS=$(shell cat default-jenkins-plugins.txt) \ -e JENKINS_JAVA_OVERRIDES="-Dpermissive-script-security.enabled=no_security" -uninstall-jenkins: +remove-jenkins: $(OC_CMD) delete -l app=jenkins-persistent all,sa,rolebindings,pvc uninstall: @@ -48,4 +51,4 @@ uninstall: --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 diff --git a/c3iaas/get-all-jenkins-plugins.sh b/c3iaas/get-all-jenkins-plugins.sh new file mode 100755 index 0000000..14e1804 --- /dev/null +++ b/c3iaas/get-all-jenkins-plugins.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +curl https://raw.githubusercontent.com/openshift/jenkins/master/2/contrib/openshift/base-plugins.txt | grep -vE "(#|prometheus)" |grep -v '^$' | sed 's/:.*/:latest/'| tr '\n' ',' > default-jenkins-plugins.txt + +cat jenkins-plugins.txt | tr '\n' ',' >> default-jenkins-plugins.txt \ No newline at end of file diff --git a/c3iaas/jenkins-plugins.txt b/c3iaas/jenkins-plugins.txt index 7ace28c..0414409 100644 --- a/c3iaas/jenkins-plugins.txt +++ b/c3iaas/jenkins-plugins.txt @@ -1,47 +1,6 @@ -openshift-login:latest\ -openshift-client:latest\ -openshift-sync:latest\ -kubernetes:latest\ -credentials:latest\ -docker-commons:latest\ -pipeline-model-definition:latest\ -lockable-resources:latest\ -config-file-provider:latest\ -htmlpublisher:latest\ -job-dsl:latest\ -mailer:latest\ -parameterized-trigger:latest\ -pipeline-build-step:latest\ -pipeline-input-step:latest\ -script-security:latest\ -ant:latest\ -pam-auth:latest\ -git-client:latest\ -credentials-binding:latest\ -junit:latest\ -workflow-support:latest\ -git:latest\ -mercurial:latest\ -subversion:latest\ -github:latest\ -github-branch-source:latest\ -workflow-cps:latest\ -workflow-cps-global-lib:latest\ -token-macro:latest\ -workflow-remote-loader:latest\ -mapdb-api:latest\ -matrix-project:latest\ -ssh-credentials:latest\ -pipeline-utility-steps:latest\ -pipeline-github-lib:latest\ -github-organization-folder:latest\ -matrix-auth:latest\ -blueocean:latest\ -workflow-aggregator:latest\ -metrics:latest\ -script-security:latest\ -permissive-script-security:latest\ -timestamper:latest\ -http_request:latest\ -antisamy-markup-formatter:latest\ +script-security:latest +permissive-script-security:latest +timestamper:latest +http_request:latest +antisamy-markup-formatter:latest update-sites-manager:latest