Đăng bởi 1 phản hồi

Pipeline with dotnet public git

pipeline {
agent any

// If using the .NET SDK plugin, wrap steps in this block
/* 
tools {
    dotnetsdk 'dotnet-8' 
}
*/

stages {
    stage('Checkout') {
        steps {
            git  branch: 'main',
                url:'https://github.com/congduan2811/DemoJenkins.git'
        }
    }

   stage('Restore') {
        steps {
            sh 'dotnet restore' // Use 'bat' for Windows
        }
    }
    stage('Build') {
        steps {
            sh 'dotnet build --configuration Release'
        }
    }
    stage('Test') {
        steps {
            sh 'dotnet test'
        }
    }
    stage('Publish') {
        steps {
            sh 'dotnet publish -c Release -o ./publish'
        }
    }
}

}

1 bình luận trong “Pipeline with dotnet public git

  1. steps {
    git branch: ‘main_mysql’,
    credentialsId: ‘c21fffbf-afb8-4963-ae02-71b270bb4f59′,
    url:’https://github.com/congduan2811/GiamKichSan.git’
    }

Để lại một bình luận

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *