Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mmendesas/jenkins-local
Automated jenkins master-agent strategy with docker to test your CI locally
https://github.com/mmendesas/jenkins-local
casc cicd configuration-as-code jenkins jenkins-agent jenkins-master-slave jobdsl local-testing
Last synced: about 5 hours ago
JSON representation
Automated jenkins master-agent strategy with docker to test your CI locally
- Host: GitHub
- URL: https://github.com/mmendesas/jenkins-local
- Owner: mmendesas
- License: mit
- Created: 2022-06-06T17:08:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-21T01:48:45.000Z (over 1 year ago)
- Last Synced: 2024-04-14T06:38:02.758Z (7 months ago)
- Topics: casc, cicd, configuration-as-code, jenkins, jenkins-agent, jenkins-master-slave, jobdsl, local-testing
- Language: Groovy
- Homepage:
- Size: 417 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JENKINS LOCAL
Automated CI/CD structure with jenkins and docker to test/validate your pipeline **`on your own machine`**
- Test out your local projects
- Define your agents based on your project stack
- Use main controller to manage everything (plugins, config etc)
## Getting started
1. Update `.env.jenkins` with your data using env.template
2. From `/jenkins-local` root folder, you can run the command:
**`$ ./scripts/run.sh`**
3. Go to your controller at [http://localhost:8787](http://localhost:8787)
4. Open `admin > __jenkins-jobs` and Build the job
5. Go to `Dashboard` and you can see some examples
## How it works?
- The communication between containers and your local host is managed by exposing **docker-api**
- From containers you can read/fetch your local **app001/.git** project
- From **Jenkins Master** you can spin up an **Agent** to run your CI flow based on your project needs
### Features
- Test your local commits before create a PR
- Jenkins controller with agent communication using docker
- Multiple agents running in parallel
- Control everything you need on your own machine
## How to
### Enable ssh locally
- `Enable ssh in your Mac` - Required to make your host accept ssh connection
- System preferences > Sharing > Remote Login
### Troubleshooting
1. `Error: Connection refused`
- Error message: `stderr: ssh: connect to host host.docker.internal port 22: Connection refused`
- If you are trying to run `__jenkins-jobs` job and get error, you can solve it by enabling your `remote login`
## Built With
- [Docker](https://www.docker.com/) - Container platform
- [JCASC](https://www.jenkins.io/projects/jcasc/) - Jenkins configuration as code
- [docker-plugin](https://plugins.jenkins.io/docker-plugin/) - docker plugin for jenkins
## Author
- **Marcio Mendes** - [mmendesas](https://github.com/mmendesas)
## License
This project is licensed under the MIT License