Skip to content

NimTechnology

Trình bày các công nghệ CLOUD một cách dễ hiểu.

  • Kubernetes & Container
    • Docker
    • Kubernetes
      • Ingress
    • Helm Chart
    • Isito-EnvoyFilter
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Vault
    • Longhorn – Storage
    • VictoriaMetrics
  • CI/CD
    • ArgoCD
    • ArgoWorkflows
    • Spinnaker
    • Jenkins
  • Coding
    • Terraform
      • GCP – Google Cloud
      • AWS – Amazon Web Service
    • Golang
    • Laravel
    • Jquery & JavaScript
    • Git
    • Selenium
  • Log & Monitor
    • Prometheus
    • Grafana
    • ELK
      • Kibana
      • Logstash
  • BareMetal
  • Toggle search form

[jenkins] Scripted Pipeline lesson 1: Introduction

Posted on November 13, 2021November 13, 2021 By nim No Comments on [jenkins] Scripted Pipeline lesson 1: Introduction

Contents

  • 1) Introduction
    • 1.1) simple Scripted Pipeline
    • 1.2) Stage in scripted pipeline
    • 1.3) Run many agent nodes in a scripted pipeline.
    • 1.4) Run many stages in a scripted pipeline.

1) Introduction

Alo! Scripted Pipeline khác j với với Jenkins Pipeline?
Thằng nào ngon hơn?

Mấy cái câu này bạn cứ dò google trên đó họ phân tích nhiều lắm rồi. Và để tạo ra sự khác biệt mình ko giải thích mà đi vào bài luôn.
Mình nghĩ sau khi các đọc nát google thì hay sài Scripted Pipeline. Tại sao ư.????
Bạn dò google nhé. Vào bài thôi!!!!

1.1) simple Scripted Pipeline

Bạn sẽ tạo 1 Job

node{
    echo "this is scripted pipeline"
}

Anh em sẽ thấy điều khác biệt đâu tiên nó bắt đầu bằng chữ node
Ấn save và run build thôi

Log lá của nó đây

1.2) Stage in scripted pipeline

node{
    stage('build'){
       echo "this is scripted pipeline" 
    }
}
Có stage time nhìn chuyên nghiệp hơn.

1.3) Run many agent nodes in a scripted pipeline.

node{
    stage('build'){
        node('docker-maven'){
            echo "this is scripted pipeline" 
        }
    }
}

Khi mà để node và chả có j hết thì nó sẽ run trên any agent
nếu bạn muốn chỉ định rõ ràng thì node('docker-maven'){}

Và bạn thấy khi run trên agent nào thì nó sử workspace của agent đó

1.4) Run many stages in a scripted pipeline.

node{
    stage('build'){
        node('docker-maven'){
            echo "building" 
        }
    }
    stage('deploy'){
        node('docker-maven'){
            echo "deploying" 
        }
    }
}
This image has an empty alt attribute; its file name is image-210.png
Jenkins

Post navigation

Previous Post: [Istio] Workload injected Istio that can’t connect Database(Redis, PostgreSQL) – excludeOutboundPorts or excludeIPRanges
Next Post: [VMware] Comand check health disk ESXi

More Related Articles

[Jenkins] Lesson 9: Using buildDiscarder to keep build history in Jenkins Jenkins
[Jenkins] Install Jenkins in VM or Physical Server BareMetal
[Jenkins] Lesson 7: Create a From by Jenkins Jenkins
[Jenkins]Scripted Pipeline lesson 16: Tools. Jenkins
[Jenkins] Scripted Pipeline lesson 4: Stage _ When Jenkins
[Jenkins – Kubernestes] Jenkins tạo Jenkins slave trên Kubernetes CI/CD

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Tham Gia Group DevOps nhé!
Để Nim có nhiều động lực ra nhiều bài viết.
Để nhận được những thông báo mới nhất.

Recent Posts

  • Protected: My Assignment  June 24, 2022
  • [Spinnaker] Spinnaker writes too many logs – Reduce spinnaker log level June 22, 2022
  • [Jenkins] Jobs will be created automatically by Jenkins Job Builder June 20, 2022
  • [Postgresql] Install postgresql client and trying a few command postgresql. June 20, 2022
  • [Mount/Nextcloud] How do you mount a hard disk that was used windows into Linux. June 19, 2022

Archives

  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021

Categories

  • BareMetal
  • CI/CD
    • ArgoCD
    • ArgoWorkflows
    • Jenkins
    • Spinnaker
  • Coding
    • Git
    • Golang
    • Jquery & JavaScript
    • Laravel
    • Selenium
    • Terraform
      • AWS – Amazon Web Service
      • GCP – Google Cloud
  • Kubernetes & Container
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Docker
    • Helm Chart
    • Isito-EnvoyFilter
    • Kubernetes
      • Ingress
    • Longhorn – Storage
    • Vault
    • VictoriaMetrics
  • Log & Monitor
    • ELK
      • Kibana
      • Logstash
    • Grafana
    • Prometheus
  • Uncategorized
  • Admin

Copyright © 2022 NimTechnology.