{"id":18293702,"url":"https://github.com/nowheresly/jenkins-sandbox","last_synced_at":"2026-04-17T07:31:52.913Z","repository":{"id":91381415,"uuid":"106197393","full_name":"Nowheresly/jenkins-sandbox","owner":"Nowheresly","description":null,"archived":false,"fork":false,"pushed_at":"2017-12-19T23:25:12.000Z","size":230,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T08:17:40.643Z","etag":null,"topics":["docker","docker-compose","elk","elk-stack","jenkinsfile","microservices","pipelines-as-code","spring-boot","traefik"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nowheresly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-08T17:55:13.000Z","updated_at":"2017-11-28T17:13:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"0fbf9a42-4dea-413d-ab5f-bd4c7bebae60","html_url":"https://github.com/Nowheresly/jenkins-sandbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Nowheresly/jenkins-sandbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowheresly%2Fjenkins-sandbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowheresly%2Fjenkins-sandbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowheresly%2Fjenkins-sandbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowheresly%2Fjenkins-sandbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nowheresly","download_url":"https://codeload.github.com/Nowheresly/jenkins-sandbox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowheresly%2Fjenkins-sandbox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31919916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","elk","elk-stack","jenkinsfile","microservices","pipelines-as-code","spring-boot","traefik"],"created_at":"2024-11-05T14:25:48.545Z","updated_at":"2026-04-17T07:31:52.893Z","avatar_url":"https://github.com/Nowheresly.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microservices proof-of-concept\n\nA microserice sample using spring boot, docker, traefik, ELK...\n\n# Pipeline-As-Code using Jenkins with Microservices\n\n## Context\nLet's say you want to develop some microservices.\nTo avoid creating too much git repositories, you decide to put all of them in a single git repository.\n\nAs CI-CD tool, you decide to use [Jenkins](https://jenkins.io/) with its feature: pipeline-as-code.\n\nNow come the bad news: so far [jenkins does not support several Jenkinsfiles per repository](https://issues.jenkins-ci.org/browse/JENKINS-43749).\n\nThis project is an attempt to bypass this current limitation.\n\n## Solution\nThis idea is to have a single Jenkinsfile at the root of the repository.\n\nWhen a given microservice is updated, this Jenkinsfile will perform a diff to identify\nwhich microservice is impacted by the changeset and will trigger only the build for those microservices.\n\nAt the end of the build, a dedicated tag (`lastbuild_\u003cbranchname\u003e`) is pushed to the repository so that it would be possible to\ncalculate the changeset with the previous successful build.\n\n\n# Docker\n## How to build docker images\nfor each project\n\n`mvn clean package docker:build` \n\n# Traefik\nAll microservices mcr* are behind a reverse proxy called [Traefik](https://docs.traefik.io/).\n\nStart the compose file:\n\n`docker-scripts/docker-compose up`\n\nOr better, use swarm:\n\n`docker swarm init`\n\n`docker stack deploy -c ./docker-scripts/docker-compose.yml mcr`\n\nTest it :\n- [http://localhost:80/mcr1/health](http://localhost:80/mcr1/health)\n- [http://localhost:80/mcr2/health](http://localhost:80/mcr2/health)\n- [http://localhost:80/mcr3/health](http://localhost:80/mcr3/health)\n\n# Keycloak\nrun the following commands to create the keycloak user and db:\n\n`createuser -c 20 -D -E -l -S -R -i -h localhost -p 5432 -U postgres -W ukeycloak -P`\n\n`createdb -h localhost -p 5432 -U postgres -W -O ukeycloak -E utf-8 keycloak`\n\n\n# Logging\nIn order to activate logging in an ELK stack, you need to deploy `docker-compose-logging.yml` in a docker stack.\nFollow the steps below:\n\n## How to create your swarm?\nRun this command: \n\n`docker swarm init`\n\n## How to create logstash config?\nRun this command: \n\n`docker config create logstash.conf ./etc/logstash.conf`\n\n## How to create the log network?\nRun this command: \n\n`docker network create -d overlay log`\n\n## How to deploy the logging stack?\nRun this command: \n\n`docker stack deploy -c ./docker-scripts/docker-compose-logging.yml log`\n\nA new stack named `log` is created.\n\n## How to remove the logging stack?\nRun this command: \n\n`docker stack rm log`\n\nThe stack named `log` is removed.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnowheresly%2Fjenkins-sandbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnowheresly%2Fjenkins-sandbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnowheresly%2Fjenkins-sandbox/lists"}