Skip to content
TheChatArchiveThe Chat Archive
Geminigemini-pro-dev-api· GoogleHugging Face Arena Human Preference 55K

create a jenkins file for my dotnet project, it should checkout to master and build the…

  1. User

    create a jenkins file for my dotnet project, it should checkout to master and build the project, path to my project is 'C:/Projects/JenkinsDemo/JenkinsDemo.sln'

  2. Gemini Assistant
    pipeline {
        agent any
    
        stages {
            stage('Checkout') {
                steps {
                    git branch: 'master', url: 'https://github.com/your-username/your-project.git'
                }
            }
    
            stage('Build') {
                steps {
                    bat "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe C:/Projects/JenkinsDemo/JenkinsDemo.sln /p:Configuration=Release"
                }
            }
    
            stage('Test') {
                steps {
                    bat "C:/Projects/JenkinsDemo/run_tests.bat"
                }
            }
    
            stage('Deploy') {
                steps {
                    bat "C:/Projects/JenkinsDemo/deploy.bat"
                }
            }
        }
    }