|
1 | 1 | = Continuous Integration |
2 | 2 |
|
3 | | -image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-mongodb%2Fmain&subject=Moore%20(main)[link=https://jenkins.spring.io/view/SpringData/job/spring-data-mongodb/] |
4 | | -image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-mongodb%2F2.1.x&subject=Lovelace%20(2.1.x)[link=https://jenkins.spring.io/view/SpringData/job/spring-data-mongodb/] |
5 | | -image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-mongodb%2F1.10.x&subject=Ingalls%20(1.10.x)[link=https://jenkins.spring.io/view/SpringData/job/spring-data-mongodb/] |
6 | | - |
7 | 3 | == Running CI tasks locally |
8 | 4 |
|
9 | | -Since this pipeline is purely Docker-based, it's easy to: |
10 | | - |
11 | | -* Debug what went wrong on your local machine. |
12 | | -* Test out a a tweak to your test routine before sending it out. |
13 | | -* Experiment against a new image before submitting your pull request. |
14 | | - |
15 | | -All of these use cases are great reasons to essentially run what the CI server does on your local machine. |
16 | | - |
17 | | -IMPORTANT: To do this you must have Docker installed on your machine. |
18 | | - |
19 | | -1. `docker run -it --mount type=bind,source="$(pwd)",target=/spring-data-mongodb-github springci/spring-data-openjdk17-with-mongodb-5.0.3:latest /bin/bash` |
20 | | -+ |
21 | | -This will launch the Docker image and mount your source code at `spring-data-mongodb-github`. |
22 | | -+ |
23 | | -2. `cd spring-data-mongodb-github` |
24 | | -+ |
25 | | -Next, run the tests from inside the container: |
26 | | -+ |
27 | | -3. `./mvnw clean dependency:list test -Dsort -Dbundlor.enabled=false -B` (or with whatever profile you need to test out) |
28 | | - |
29 | | -Since the container is binding to your source, you can make edits from your IDE and continue to run build jobs. |
30 | | - |
31 | | -If you need to package things up, do this: |
32 | | - |
33 | | -1. `docker run -it --mount type=bind,source="$(pwd)",target=/spring-data-mongodb-github springci/spring-data-openjdk8-with-mongodb-4.0:latest /bin/bash` |
34 | | -+ |
35 | | -This will launch the Docker image and mount your source code at `spring-data-mongodb-github`. |
36 | | -+ |
37 | | -2. `cd spring-data-mongodb-github` |
38 | | -+ |
39 | | -Next, package things from inside the container doing this: |
40 | | -+ |
41 | | -3. `./mvnw clean dependency:list package -Dsort -Dbundlor.enabled=false -B` |
42 | | - |
43 | | -NOTE: Docker containers can eat up disk space fast! From time to time, run `docker system prune` to clean out old images. |
| 5 | +You can run CI jobs locally using Docker and act[https://nektosact.com/]. |
0 commit comments