Browse Source

Delete unnecessary tools, plugins and other useless code

master
Apostolos Fanakis 5 years ago
parent
commit
54a114ba00
  1. 49
      docker-compose.yml
  2. 8
      env/jenkins.env
  3. 7
      env/sonar.env
  4. 8
      install.sh
  5. 6
      jenkins/Dockerfile
  6. 22
      jenkins/plugins.txt

49
docker-compose.yml

@ -16,7 +16,8 @@ services:
max-size: '4m' max-size: '4m'
max-file: '10' max-file: '10'
networks: networks:
- janus-net - jenkins-net
- apella-net
ports: ports:
- "80:80" - "80:80"
- "443:443" - "443:443"
@ -42,7 +43,8 @@ services:
max-size: '4m' max-size: '4m'
max-file: '10' max-file: '10'
networks: networks:
- janus-net - jenkins-net
- apella-net
volumes: volumes:
- ./volumes/nginx/conf:/etc/nginx/conf.d - ./volumes/nginx/conf:/etc/nginx/conf.d
- ./volumes/nginx/vhost:/etc/nginx/vhost.d - ./volumes/nginx/vhost:/etc/nginx/vhost.d
@ -65,50 +67,19 @@ services:
- jenkins_admin_username - jenkins_admin_username
- jenkins_admin_password - jenkins_admin_password
networks: networks:
- janus-net - jenkins-net
volumes: volumes:
- ./volumes/jenkins/log:/var/log/jenkins - ./volumes/jenkins/log:/var/log/jenkins
- jenkins-data:/var/jenkins_home - jenkins-data:/var/jenkins_home
- ./jenkins/downloads:/var/jenkins_home/downloads - ./jenkins/downloads:/var/jenkins_home/downloads
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
# Sonarqube continuous inspection of code quality
# References:
# https://docs.sonarqube.org/latest/
# https://github.com/SonarSource/docker-sonarqube/tree/master/recipes
sonarqube:
image: sonarqube
container_name: sonarqube
restart: always
env_file:
- ./env/sonar.env
networks:
- janus-net
- sonar-net
volumes:
- sonarqube_conf:/opt/sonarqube/conf
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins
sonar-db:
image: postgres
container_name: sonar-db
restart: always
environment: # TODO: figure out another way to pass the username and password?
- POSTGRES_USER=sonar
- POSTGRES_PASSWORD=sonar
volumes:
- postgresql:/var/lib/postgresql
- postgresql_data:/var/lib/postgresql/data
networks:
- sonar-net
# Networks in use # Networks in use
# TODO: maybe add/split to separate networks # TODO: maybe add/split to separate networks
networks: networks:
janus-net: jenkins-net:
driver: bridge driver: bridge
sonar-net: apella-net:
driver: bridge driver: bridge
# Secrets in use # Secrets in use
secrets: # TODO: figure out a better way to do this? secrets: # TODO: figure out a better way to do this?
@ -118,9 +89,3 @@ secrets: # TODO: figure out a better way to do this?
file: ./jenkins/pass file: ./jenkins/pass
volumes: volumes:
jenkins-data: jenkins-data:
sonarqube_conf:
sonarqube_data:
sonarqube_extensions:
sonarqube_bundled-plugins:
postgresql:
postgresql_data:

8
env/jenkins.env

@ -1,7 +1,5 @@
VIRTUAL_HOST=jenkins.mthmmy.tk VIRTUAL_HOST=jenkins.apella.tk
VIRTUAL_PORT=8080 VIRTUAL_PORT=8080
LETSENCRYPT_HOST=jenkins.mthmmy.tk LETSENCRYPT_HOST=jenkins.apella.tk
LETSENCRYPT_EMAIL=apotwohd@gmail.com LETSENCRYPT_EMAIL=apotwohd@gmail.com
SONARQUBE_HOST=127.0.0.1:9000 JENKINS_URL=https://jenkins.apella.tk/
JENKINS_URL=https://jenkins.mthmmy.tk/
GITHUB_TOKEN=testssss

7
env/sonar.env

@ -1,7 +0,0 @@
VIRTUAL_HOST=sonar.mthmmy.tk
VIRTUAL_PORT=9000
LETSENCRYPT_HOST=sonar.mthmmy.tk
LETSENCRYPT_EMAIL=apotwohd@gmail.com
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
sonar.jdbc.url=jdbc:postgresql://sonar-db:5432/sonar

8
install.sh

@ -34,11 +34,3 @@ fi
# Installs docker using the get.docker.com method # Installs docker using the get.docker.com method
VERSION="18.09" VERSION="18.09"
curl -fsSL https://get.docker.com -o get-docker.sh | sh curl -fsSL https://get.docker.com -o get-docker.sh | sh
# Bellow settings are needed for Sonarqube to run on linux.
# These settings are valid only for the session and are lost after reboot
# TODO: make the changes permanent
sysctl -w vm.max_map_count=262144
sysctl -w fs.file-max=65536
ulimit -n 65536
ulimit -u 4096

6
jenkins/Dockerfile

@ -19,11 +19,11 @@ USER jenkins
COPY configuration/* /var/jenkins_home/init.groovy.d/ COPY configuration/* /var/jenkins_home/init.groovy.d/
# Automatically installs plugins # Automatically installs plugins
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt # COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt # RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt
# Adds scripts for tool installation # Adds scripts for tool installation
COPY groovy/* /usr/share/jenkins/ref/init.groovy.d/ # COPY groovy/* /usr/share/jenkins/ref/init.groovy.d/
# Sets defaults # Sets defaults
# Gets rid of admin password setup # Gets rid of admin password setup

22
jenkins/plugins.txt

@ -1,5 +1,4 @@
ace-editor ace-editor
ant
antisamy-markup-formatter antisamy-markup-formatter
apache-httpcomponents-client-4-api apache-httpcomponents-client-4-api
authentication-tokens authentication-tokens
@ -26,18 +25,15 @@ blueocean-rest-impl
blueocean-web blueocean-web
bouncycastle-api bouncycastle-api
branch-api branch-api
build-timeout
cloudbees-bitbucket-branch-source cloudbees-bitbucket-branch-source
cloudbees-folder cloudbees-folder
command-launcher command-launcher
credentials credentials
credentials-binding credentials-binding
discord-notifier
display-url-api display-url-api
docker-commons docker-commons
docker-workflow docker-workflow
durable-task durable-task
email-ext
favorite favorite
git git
git-client git-client
@ -45,8 +41,6 @@ git-server
github github
github-api github-api
github-branch-source github-branch-source
gradle
handlebars
handy-uri-templates-2-api handy-uri-templates-2-api
htmlpublisher htmlpublisher
jackson2-api jackson2-api
@ -56,17 +50,11 @@ jira
jquery-detached jquery-detached
jsch jsch
junit junit
ldap
lockable-resources
mailer mailer
mapdb-api
matrix-auth matrix-auth
matrix-project matrix-project
mercurial mercurial
momentjs
pam-auth
pipeline-build-step pipeline-build-step
pipeline-github-lib
pipeline-graph-analysis pipeline-graph-analysis
pipeline-input-step pipeline-input-step
pipeline-milestone-step pipeline-milestone-step
@ -74,25 +62,18 @@ pipeline-model-api
pipeline-model-declarative-agent pipeline-model-declarative-agent
pipeline-model-definition pipeline-model-definition
pipeline-model-extensions pipeline-model-extensions
pipeline-rest-api
pipeline-stage-step pipeline-stage-step
pipeline-stage-tags-metadata pipeline-stage-tags-metadata
pipeline-stage-view
plain-credentials plain-credentials
pubsub-light pubsub-light
resource-disposer
scm-api scm-api
script-security script-security
sonar
sse-gateway sse-gateway
ssh-credentials ssh-credentials
ssh-slaves
structs structs
subversion
timestamper
token-macro token-macro
trilead-api
variant variant
workflow-aggregator
workflow-api workflow-api
workflow-basic-steps workflow-basic-steps
workflow-cps workflow-cps
@ -103,4 +84,3 @@ workflow-multibranch
workflow-scm-step workflow-scm-step
workflow-step-api workflow-step-api
workflow-support workflow-support
ws-cleanup

Loading…
Cancel
Save