[Jenkins] Lesson 10: disable Concurrent Builds in Jenkins Pipeline
Thường khi click liên tục build thì các job sẽ được song song như hình dưới nếu bạn muốn disable Concurrent Builds thì làm như sau: Bài ngắn vl
Trình bày các công nghệ CLOUD một cách dễ hiểu.
Thường khi click liên tục build thì các job sẽ được song song như hình dưới nếu bạn muốn disable Concurrent Builds thì làm như sau: Bài ngắn vl
Thường thì bạn ấn build trên Jenkins thì bạn thấy nó tạo history build Nếu bạn có hàng ngàn job build thì việc lưu quá nhiều history sẽ gây tốn Storage.Vậy làm sao để giảm được.
Post https://www.jenkins.io/doc/book/pipeline/syntax/#postpost ở đây là khi bạn completed 1 Pipeline hay 1 stage thì chúng ta chạy “post” để kiểm tra cuốiNghe vẫn khó hiểu thì bay ngay vào ví dụ. success, failure, always Giờ ta sửa cho stages bị error change giờ click lại luôn và không sửa pipeline unstable thêm post unstable thì…
Read More “[Jenkins] Lesson 8: example of Post in Jenkins Pipeline.” »
Parallel nghĩ các stage trong pipeline sẽ chạy đồng thời. Parallel if pipeline doesn’t have problem. if a stage was error
When nếu mà match với điều kiện when thì sẽ action step trong stage(“Đó”)nếu ko match với điều kiện when thì skip step trong stage(“Đó”)nghe hơi ngáo vậy đi vào ví dụ thôi Environment When này sẽ check environment nếu trả về true thì action steps bên dưới. equals Các bạn để ý kĩ chỗ…
Read More “[Jenkins] Lesson 5: Condition “When” in Pipeline Jenkins” »
Environment standard example 1: sample example 2: environment didn’t declared in stage Pipeline Example 3: environment declared at both global and stage Pipeline example 4: print env of system credential
Option in Pipeline Scipt https://www.jenkins.io/doc/book/pipeline/syntax/#options option – retry – steps – error option – retry – not work with currentBuild.result = “FAILURE” option – timeout – steps – sleep option – timestamp() – Invalid option type “timestamps” Invalid https://issues.jenkins.io/browse/JENKINS-48556 resolve above problem Anh em biết cách fix chỉ mình nhé. options-skipdefaultcheckout skip default checkout Sau…
Read More “[Jenkins] Lesson 3: Option in Pipeline Jenkins” »
Ở bài này chúng app dụng một ít code đơn giản groovy vào trong pipeline nhé 1) def, if else, sleep, println, echo 2) retry, timeout 3) tools https://www.jenkins.io/doc/pipeline/steps/workflow-durable-task-step/ Bài tiếp theo chúng ta sẽ làm việc với option trong pipelinehttps://www.jenkins.io/doc/book/pipeline/syntax/#options
1) first prepare Đầu tiên bạn cần cài con Jenkins và bạn cho nó 1 nhiệm vụ làm master. tiếp đến cài 1 con jenkins và kết nối nó vào master 2) Hello world – Pipeline script 3) Hello world – Pipeline Agent 3.1) agent = none 3.2 agent = slave label 3.3 Custom workspace…
Read More “[Jenkins] Lesson 1: Hello World – Pipeline Script & Agent” »