자동화의 기본. 내가 원하는 때에, 빌드 진행하기.
지금 어떤 방식으로 사용하고 있는지는 ex) 로 기입 해놓았습니다.
파라미터가 필요하다면, Default Value에 값을 넣어줘야한다.
예를들어 브랜치 파라미터가 필요하다면, 어떤 브랜치를 기본으로 할지 정해놓아야한다. 비어있으면, 값이 없는상태로 빌드가 진행된다.
젠킨스에서는 Build Triggers를 통해 여러가지 방식으로 언제 빌드를 할지 정할 수 있다.
Enable this option if you would like to trigger new builds by accessing a special predefined URL (convenient for scripts).
One typical example for this feature would be to trigger new build from the source control system's hook script, when somebody has just committed a change into the repository, or from a script that parses your source control email notifications.
You'll need to provide an authorization token in the form of a string so that only those who know it would be able to remotely trigger this project's builds.
This is most useful when your Jenkins instance grants read access to this job to anonymous users.
When that's not the case, Jenkins will reject requests sent to the trigger URL even when the correct token is specified.
To solve this, the HTTP requests needs to be authenticated as a user with the necessary read permission for the job — but then you could probably just grant this user the permission to build this anyway.
Another option is to use the Build Token Root Plugin, that provides additional URL endpoints to trigger builds using this token, and doesn't require the otherwise necessary Overall/Read and Job/Read permissions to do so.
Set up a trigger so that when some other projects finish building, a new build is scheduled for this project. This is convenient for running an extensive test after a build is complete, for example.
This configuration complements the "Build other projects" section in the "Post-build Actions" of an upstream project, but is preferable when you want to configure the downstream project.
시간 기준 트리거
제일 기본적인 예약법. 스케줄링에는 cron 표현식을 사용한다
ex) 젠킨스 백업(매일 12시), 프로젝트 정적 분석(월요일 오전 7시마다)
Provides a cron-like feature to periodically execute this project.
This feature is primarily for using Jenkins as a cron replacement, and it is not ideal for continuously building software projects. When people first start continuous integration, they are often so used to the idea of regularly scheduled builds like nightly/weekly that they use this feature. However, the point of continuous integration is to start a build as soon as a change is made, to provide a quick feedback to the change. To do that you need to hook up SCM change notification to Jenkins.
Note that this is going to be an expensive operation for CVS, as every polling requires Jenkins to scan the entire workspace and verify it with the server. Consider setting up a "push" trigger to avoid this overhead, as described in this document
'CI&CD > jenkins' 카테고리의 다른 글
[jenkins] parameter만 다른 job 병렬실행 (0) | 2022.11.03 |
---|---|
[jenkins]이중화(백업) (0) | 2022.08.01 |
[jenkins] pipeline 요약 (0) | 2022.07.28 |
[jenkins] jenkins 계정으로 로그인 하는 법 (0) | 2022.07.18 |
[Jenkins] HTTP ERROR 403 No valid crumb was included in the request 해결 방법 (0) | 2022.06.28 |