Last active
April 27, 2024 15:47
Revisions
-
ahmetkucukoglu revised this gist
Sep 5, 2019 . 1 changed file with 0 additions and 10 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,9 +7,6 @@ String projectName = "CISample/CISample.App" //Kaynak kodun publish edileceği dizin String publishedPath = "CISample\\CISample.App\\bin\\Release\\netcoreapp2.2\\publish" //Hedef makinesindeki IIS'de tanımlı olan sitenizin ismi String iisApplicationName = "cisample" @@ -36,13 +33,6 @@ node () { dotnet publish -c Release --no-build """ } stage('Deploy'){ withCredentials([usernamePassword(credentialsId: 'iis-credential', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) { bat """ "C:\\Program Files (x86)\\IIS\\Microsoft Web Deploy V3\\msdeploy.exe" -verb:sync -source:iisApp="${WORKSPACE}\\${publishedPath}" -enableRule:AppOffline -dest:iisApp="${iisApplicationName}",ComputerName="https://${targetServerIP}:8172/msdeploy.axd",UserName="$USERNAME",Password="$PASSWORD",AuthType="Basic" -allowUntrusted"""} } -
ahmetkucukoglu revised this gist
Jul 27, 2019 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,6 +41,7 @@ node () { winRMClient credentialsId: 'iis-credential', hostName: """ "${targetServerIP}" """, winRMOperations: [invokeCommand(""" rm "${backupPath}.zip" """)] winRMClient credentialsId: 'iis-credential', hostName: """ "${targetServerIP}" """, winRMOperations: [invokeCommand(""" mkdir "${backupPath}" """)] winRMClient credentialsId: 'iis-credential', hostName: """ "${targetServerIP}" """, winRMOperations: [invokeCommand(""" xcopy /i /s /Y "${iisApplicationPath}" "${backupPath}" """)] winRMClient credentialsId: 'iis-credential', hostName: """ "${targetServerIP}" """, winRMOperations: [invokeCommand(""" Compress-Archive -Path "${backupPath}" -DestinationPath "${backupPath}.zip" """)] } stage('Deploy'){ withCredentials([usernamePassword(credentialsId: 'iis-credential', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) { bat """ "C:\\Program Files (x86)\\IIS\\Microsoft Web Deploy V3\\msdeploy.exe" -verb:sync -source:iisApp="${WORKSPACE}\\${publishedPath}" -enableRule:AppOffline -dest:iisApp="${iisApplicationName}",ComputerName="https://${targetServerIP}:8172/msdeploy.axd",UserName="$USERNAME",Password="$PASSWORD",AuthType="Basic" -allowUntrusted"""} -
ahmetkucukoglu revised this gist
Jul 27, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ String githubUrl = "https://github.com/ahmetkucukoglu/aspnetcore-ci-sample" String projectName = "CISample/CISample.App" //Kaynak kodun publish edileceği dizin String publishedPath = "CISample\\CISample.App\\bin\\Release\\netcoreapp2.2\\publish" //Hedef makinesinde yedeklemenin yapılacağı dizin String backupPath = "D:\\Backups\\cisample" -
ahmetkucukoglu renamed this gist
Jul 27, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
ahmetkucukoglu revised this gist
Jul 26, 2019 . 1 changed file with 9 additions and 8 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,20 +1,20 @@ //Kaynak kodun adresi String githubUrl = "https://github.com/ahmetkucukoglu/aspnetcore-ci-sample" //Kaynak kodun içerisindeki projenin ismi String projectName = "CISample/CISample.App" //Kaynak kodun publish edileceği dizin String publishedPath = "CISample/CISample.App\\bin\\Release\\netcoreapp2.2\\publish" //Hedef makinesinde yedeklemenin yapılacağı dizin String backupPath = "D:\\Backups\\cisample" //Hedef makinesindeki IIS'de tanımlı olan sitenizin ismi String iisApplicationName = "cisample" //Hedef makinesindeki IIS'de tanımlı olan sitenizin dizini String iisApplicationPath = "D:\\WebSites\\cisample" //Hedef makinesinin IP'si String targetServerIP = "0.0.0.0" @@ -27,12 +27,13 @@ node () { doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: """ "${githubUrl}" """]]]) } stage('Build') { bat """ cd ${projectName} dotnet build -c Release /p:Version=${BUILD_NUMBER} dotnet publish -c Release --no-build """ } stage ('Backup') { -
ahmetkucukoglu created this gist
Jul 26, 2019 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ //Kaynak kodun adresi String githubUrl = "https://github.com/xxx/xxx" //Kaynak kodun içerisindeki projenin ismi String projectName = "xxx" //Kaynak kodun publish edileceği dizin String publishedPath = "xxx\\bin\\Release\\netcoreapp2.2\\publish" //Hedef makinesinde yedeklemenin yapılacağı dizin String backupPath = "D:\\Backups\\xxx" //Hedef makinesindeki IIS'de tanımlı olan sitenizin ismi String iisApplicationName = "xxx" //Hedef makinesindeki IIS'de tanımlı olan sitenizin dizini String iisApplicationPath = "D:\\Sites\\xxx" //Hedef makinesinin IP'si String targetServerIP = "0.0.0.0" node () { stage('Checkout') { checkout([ $class: 'GitSCM', branches: [[name: 'master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'github-credential', url: """ "${githubUrl}" """]]]) } stage('Build') { bat """ cd ${projectName} dotnet publish -c Release """ } stage ('Backup') { winRMClient credentialsId: 'iis-credential', hostName: """ "${targetServerIP}" """, winRMOperations: [invokeCommand(""" Remove-Item "${backupPath}" -recurse""")] winRMClient credentialsId: 'iis-credential', hostName: """ "${targetServerIP}" """, winRMOperations: [invokeCommand(""" rm "${backupPath}.zip" """)] winRMClient credentialsId: 'iis-credential', hostName: """ "${targetServerIP}" """, winRMOperations: [invokeCommand(""" mkdir "${backupPath}" """)] winRMClient credentialsId: 'iis-credential', hostName: """ "${targetServerIP}" """, winRMOperations: [invokeCommand(""" xcopy /i /s /Y "${iisApplicationPath}" "${backupPath}" """)] } stage('Deploy'){ withCredentials([usernamePassword(credentialsId: 'iis-credential', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) { bat """ "C:\\Program Files (x86)\\IIS\\Microsoft Web Deploy V3\\msdeploy.exe" -verb:sync -source:iisApp="${WORKSPACE}\\${publishedPath}" -enableRule:AppOffline -dest:iisApp="${iisApplicationName}",ComputerName="https://${targetServerIP}:8172/msdeploy.axd",UserName="$USERNAME",Password="$PASSWORD",AuthType="Basic" -allowUntrusted"""} } }