Skip to content

Commit 59a85ee

Browse files
Merge pull request #182 from FromDoppler/DE-971-new-jenkins-compatibility
DE-971 - Compatibility with the new Jenkins
2 parents 1a06b89 + 768c3ab commit 59a85ee

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
Dockerfile
2323
Jenkinsfile
2424
.doppler-ci
25+
doppler-jenkins-ci.groovy
2526
yarn.lock
2627
package-lock.json
2728
[eE]ncrypted.[sS]ecret.*

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ For the moment, it is only a kind of example. In the future, it could be convert
88

99
We base our CI/CD process on Jenkins, Docker Hub, and Docker Swarm.
1010

11-
Jenkins generates the images based on [.doppler-ci](./.doppler-ci) (a symlink to [Jenkisfile](./Jenkinsfile)). We refer to these generated images in a Docker Swarm using an _auto-redeploy_ approach. The [Doppler Swarm repository](https://github.com/MakingSense/doppler-swarm) stores the configuration of our Docker Swarm.
11+
Jenkins generates the images based on [doppler-jenkins-ci.groovy](./doppler-jenkins-ci.groovy) (a symlink to [Jenkisfile](./Jenkinsfile)). We refer to these generated images in a Docker Swarm using an _auto-redeploy_ approach. The [Doppler Swarm repository](https://github.com/MakingSense/doppler-swarm) stores the configuration of our Docker Swarm.
1212

1313
You can find a detailed description of our Git flow and the relation with Docker Hub in [Doppler-Forms repository](https://github.com/MakingSense/doppler-forms/blob/master/README.md#continuous-deployment-to-test-and-production-environments), but basically, it is the following:
1414

@@ -22,7 +22,7 @@ You can find a detailed description of our Git flow and the relation with Docker
2222

2323
## Run validations in local environment
2424

25-
The source of truth related to the build process is [.doppler-ci](./.doppler-ci) (a symlink to [Jenkisfile](./Jenkinsfile)). It basically runs docker build, so, you can reproduce jenkins' build process running `docker build .` or `sh ./verify-w-docker.sh`.
25+
The source of truth related to the build process is [doppler-jenkins-ci.groovy](./doppler-jenkins-ci.groovy) (a symlink to [Jenkisfile](./Jenkinsfile)). It basically runs docker build, so, you can reproduce jenkins' build process running `docker build .` or `sh ./verify-w-docker.sh`.
2626

2727
If you prefer to run these commands without docker, you can read [Dockerfile](./Dockerfile) and follow the steps manually.
2828

@@ -84,12 +84,12 @@ A simple way of doing that is copy all the files and then:
8484

8585
We have `{FC79D827-86F3-4F93-8064-C4927957A1D2}` for the main project, `{646F92A1-8B19-43E0-BED1-8A56B6FB9352}` for the test project, `{9BE75F53-F47E-4B35-9560-AA039EBC5B1C}` for the solution files and `{A6DDDBE4-738F-4679-809B-D7786BD5E7E5}` for the solution itself. It is possible generate new IDs using any tool, for example [Online GUID / UUID Generator](https://www.guidgenerator.com/)
8686

87-
- Ensure that the file `.doppler-ci` is a _symbolic link_ to `Jenkinsfile`
87+
- Ensure that the file `doppler-jenkins-ci.groovy` is a _symbolic link_ to `Jenkinsfile`
8888

8989
**IMPORTANT:** If you do not know what a symlink is, ask.
9090

91-
- In Linux or Mac: `ln -s Jenkinsfile .doppler-ci`
92-
- In Windows (with git bash as administrator): `export MSYS=winsymlinks:nativestrict; ln -s Jenkinsfile .doppler-ci`
91+
- In Linux or Mac: `ln -s Jenkinsfile doppler-jenkins-ci.groovy`
92+
- In Windows (with git bash as administrator): `export MSYS=winsymlinks:nativestrict; ln -s Jenkinsfile doppler-jenkins-ci.groovy`
9393

9494
### Push to GitHub
9595

File renamed without changes.

gitlint.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ export MSYS2_ARG_CONV_EXCL="*"
2020

2121
# See more information in https://jorisroovers.com/gitlint
2222

23-
docker run --ulimit nofile=1024 \
24-
-v "$(pwd)/.git":/repo/.git \
25-
-v "$(pwd)/.gitlint":/repo/.gitlint \
26-
jorisroovers/gitlint:0.18.0 \
27-
--config /repo/.gitlint \
28-
--commits origin/main..HEAD
23+
if [ -x "$(command -v gitlint)" ]; then
24+
gitlint --config .gitlint --commits origin/main..HEAD
25+
else
26+
docker run --ulimit nofile=1024 \
27+
-v "$(pwd)/.git":/repo/.git \
28+
-v "$(pwd)/.gitlint":/repo/.gitlint \
29+
jorisroovers/gitlint:0.18.0 \
30+
--config /repo/.gitlint \
31+
--commits origin/main..HEAD
32+
fi

0 commit comments

Comments
 (0)