[Jenkins] Lesson 6: Parallel in Pipe Jenkins
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
Trình bày các công nghệ CLOUD một cách dễ hiểu.
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” »
Note lại chút, 1 Job trên Jenkins tương tác với gitlab hay github.Mình cần jenkins có được các thông tin của repo như branch nào, commit nào,…??? Trong jenkins file, bạn thực hiện echo env.BRANCH_NAME nhưng lại bị rỗng hay null Lý do: https://stackoverflow.com/questions/43770058/jenkins-pipeline-branch-name-returns-null Vậy thì bạn cần tạo 1 job với type: Multibanch Pipeline…
Read More “[Jenkins/Git] Why do My Jenkins get env.BRANCH_NAME of Git that is Null” »
Vì một số nhu cấu đặc biệt anh/em sẽ cần 1 con jenkins chạy theo kiểu stand alone, có hoặc ko persistent Các file manifest ở link này: https://github.com/mrnim94/jenkins-k8sChỉ cần apply thôi Nếu anh em có như persistem volume của Jenkins để chắc căn và chúng ta kiểm tra lại Nếu anh em persistem Volume…
Read More “[Jenkins] Install Jenkins StandAlone in Kubernetes” »
Nói nhiều 1 chút: các bạn cũng biết trước dây chúng ta cài hệ thống k8s điều đầu tiên chúng ta sẽ cài docker.Nhưng ở thời điển hiện tại thì Kubernetes is deprecating Docker as a container runtime after v1.20 nên việc chúng ta tận dụng các server k8s để build docker cũng đã ít đi dần.Cài k8s…
Read More “[Kaniko/Jenkins] Install Jenkins through helm and build/deploy app in K8s by Kaniko” »
1) Config the connection between Đầu tiên bạn cần tạo 2 con Jenkins tự đặt 1 con là master và 1 con là agent. Trên jenkins master bạn sẽ cấu hình để nhân Jenkins agent 1.1) agent register master(.jar) cd /var/jenkins_home/wget http://192.168.101.8:8080/jnlpJars/agent.jar Hoặc bạn curlcurl http://192.168.101.44:32323/jnlpJars/agent.jar –output agent.jar Kết nôi với jenins-master sau đã có…
Read More “[Jenkins] Hướng dẫn kết nối kết nối Jenkins master và Agent” »