diff --git a/docker-compose.yml b/docker-compose.yml index c23861e..f519ca3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,8 @@ services: max-size: '4m' max-file: '10' networks: - - janus-net + - jenkins-net + - apella-net ports: - "80:80" - "443:443" @@ -42,7 +43,8 @@ services: max-size: '4m' max-file: '10' networks: - - janus-net + - jenkins-net + - apella-net volumes: - ./volumes/nginx/conf:/etc/nginx/conf.d - ./volumes/nginx/vhost:/etc/nginx/vhost.d @@ -65,50 +67,19 @@ services: - jenkins_admin_username - jenkins_admin_password networks: - - janus-net + - jenkins-net volumes: - ./volumes/jenkins/log:/var/log/jenkins - jenkins-data:/var/jenkins_home - ./jenkins/downloads:/var/jenkins_home/downloads - /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 # TODO: maybe add/split to separate networks networks: - janus-net: + jenkins-net: driver: bridge - sonar-net: + apella-net: driver: bridge # Secrets in use 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 volumes: jenkins-data: - sonarqube_conf: - sonarqube_data: - sonarqube_extensions: - sonarqube_bundled-plugins: - postgresql: - postgresql_data: \ No newline at end of file diff --git a/env/jenkins.env b/env/jenkins.env index 70f36ec..670654e 100644 --- a/env/jenkins.env +++ b/env/jenkins.env @@ -1,7 +1,5 @@ -VIRTUAL_HOST=jenkins.mthmmy.tk +VIRTUAL_HOST=jenkins.apella.tk VIRTUAL_PORT=8080 -LETSENCRYPT_HOST=jenkins.mthmmy.tk +LETSENCRYPT_HOST=jenkins.apella.tk LETSENCRYPT_EMAIL=apotwohd@gmail.com -SONARQUBE_HOST=127.0.0.1:9000 -JENKINS_URL=https://jenkins.mthmmy.tk/ -GITHUB_TOKEN=testssss \ No newline at end of file +JENKINS_URL=https://jenkins.apella.tk/ diff --git a/env/sonar.env b/env/sonar.env deleted file mode 100644 index 8418aac..0000000 --- a/env/sonar.env +++ /dev/null @@ -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 \ No newline at end of file diff --git a/install.sh b/install.sh index 6464e2b..8415c0b 100755 --- a/install.sh +++ b/install.sh @@ -34,11 +34,3 @@ fi # Installs docker using the get.docker.com method VERSION="18.09" 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 diff --git a/jenkins/Dockerfile b/jenkins/Dockerfile index a65b60c..6a2e449 100644 --- a/jenkins/Dockerfile +++ b/jenkins/Dockerfile @@ -19,11 +19,11 @@ USER jenkins COPY configuration/* /var/jenkins_home/init.groovy.d/ # Automatically installs plugins -COPY plugins.txt /usr/share/jenkins/ref/plugins.txt -RUN /usr/local/bin/install-plugins.sh < /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 # 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 # Gets rid of admin password setup diff --git a/jenkins/plugins.txt b/jenkins/plugins.txt index 48bbc8a..2d2002e 100644 --- a/jenkins/plugins.txt +++ b/jenkins/plugins.txt @@ -1,5 +1,4 @@ ace-editor -ant antisamy-markup-formatter apache-httpcomponents-client-4-api authentication-tokens @@ -26,18 +25,15 @@ blueocean-rest-impl blueocean-web bouncycastle-api branch-api -build-timeout cloudbees-bitbucket-branch-source cloudbees-folder command-launcher credentials credentials-binding -discord-notifier display-url-api docker-commons docker-workflow durable-task -email-ext favorite git git-client @@ -45,8 +41,6 @@ git-server github github-api github-branch-source -gradle -handlebars handy-uri-templates-2-api htmlpublisher jackson2-api @@ -56,17 +50,11 @@ jira jquery-detached jsch junit -ldap -lockable-resources mailer -mapdb-api matrix-auth matrix-project mercurial -momentjs -pam-auth pipeline-build-step -pipeline-github-lib pipeline-graph-analysis pipeline-input-step pipeline-milestone-step @@ -74,25 +62,18 @@ pipeline-model-api pipeline-model-declarative-agent pipeline-model-definition pipeline-model-extensions -pipeline-rest-api pipeline-stage-step pipeline-stage-tags-metadata -pipeline-stage-view plain-credentials pubsub-light -resource-disposer scm-api script-security -sonar sse-gateway ssh-credentials -ssh-slaves structs -subversion -timestamper token-macro +trilead-api variant -workflow-aggregator workflow-api workflow-basic-steps workflow-cps @@ -103,4 +84,3 @@ workflow-multibranch workflow-scm-step workflow-step-api workflow-support -ws-cleanup