pipeline { agent any environment { deployPath = "/var/www/vhosts/bizgaze.com/qa.Bizgaze.com" } stages { stage('Restore packages') { steps { dir('unibase/platform.tenants') { /*git credentialsId: 'bizgaze_ssh_key', url: 'https://code.bizgaze.com/unibase/tenants.git'*/ checkout([$class: 'GitSCM', branches: [[name: '*/master' ]], extensions: scm.extensions, userRemoteConfigs: [[ url: 'git@code.bizgaze.com:unibase/tenants.git', credentialsId: 'bizgaze_ssh_key' ]] ]) } dir('unibase/platform.analytics') { git url: 'https://code.bizgaze.com/unibase/analytics.git' } dir('unibase/platform.apps') { git url: 'https://code.bizgaze.com/unibase/apps.git' } dir('unibase/platform.automation') { git url: 'https://code.bizgaze.com/unibase/platform.automation.git' } dir('unibase/platform.common') { git url: 'https://code.bizgaze.com/unibase/platform.common.git' } dir('unibase/core') { git url: 'https://code.bizgaze.com/unibase/core.git' } dir('unibase/platform.datasources') { git url: 'https://code.bizgaze.com/unibase/platform.datasources.git' } dir('unibase/platform.gps') { git url: 'https://code.bizgaze.com/unibase/platform.gps.git' } dir('unibase/helpers') { git url: 'https://code.bizgaze.com/unibase/helpers.git' } dir('unibase/platform.integrations') { git url: 'https://code.bizgaze.com/unibase/platform.integrations.git' } dir('unibase/mongdbprovider') { git url: 'https://code.bizgaze.com/unibase/mongdbprovider.git' } dir('unibase/mssqldbprovider') { git url: 'https://code.bizgaze.com/unibase/mssqldbprovider.git' } dir('unibase/pgsqldbprovider') { git url: 'https://code.bizgaze.com/unibase/pgsqldbprovider.git' } dir('unibase/platform') { git url: 'https://code.bizgaze.com/unibase/platform.git' } dir('unibase/platform.server') { git url: 'https://code.bizgaze.com/unibase/platform.server.git' } dir('unibase/platform.templates') { git url: 'https://code.bizgaze.com/unibase/platform.templates.git' } dir('unibase/platform.themes') { git url: 'https://code.bizgaze.com/unibase/platform.themes.git' } dir('unibase/unibase.reference') { git url: 'https://code.bizgaze.com/unibase/unibase.reference.git' } dir('unibase/utilities') { git url: 'https://code.bizgaze.com/unibase/utilities.git' } dir('interface.web') { git url: 'https://code.bizgaze.com/interface.web.git' } dir('bizgaze') { git url: 'https://code.bizgaze.com/bizgaze/solution.git' } dir('bizgaze/bizgaze.reference') { git url: 'https://code.bizgaze.com/bizgaze/bizgaze.reference.git' } dir('bizgaze/communications') { git url: 'https://code.bizgaze.com/bizgaze/communications.git' } dir('bizgaze/crm') { git url: 'https://code.bizgaze.com/bizgaze/crm.git' } dir('bizgaze/crm.companies') { git url: 'https://code.bizgaze.com/bizgaze/crm.companies.git' } dir('bizgaze/crm.contacts') { git url: 'https://code.bizgaze.com/bizgaze/crm.contacts.git' } dir('bizgaze/crm.routes') { git url: 'https://code.bizgaze.com/bizgaze/crm.routes.git' } dir('bizgaze/integration.gst') { git url: 'https://code.bizgaze.com/bizgaze/integration.gst.git' } dir('bizgaze/integration.tally') { git url: 'https://code.bizgaze.com/bizgaze/Integration.Tally.git' } dir('bizgaze/paybacks') { git url: 'https://code.bizgaze.com/bizgaze/paybacks.git' } dir('bizgaze/pm') { git url: 'https://code.bizgaze.com/bizgaze/pm.git' } dir('bizgaze/support') { git url: 'https://code.bizgaze.com/bizgaze/support.git' } dir('bizgaze/tm') { git url: 'https://code.bizgaze.com/bizgaze/tm.git' } dir('bizgaze/transact') { git url: 'https://code.bizgaze.com/bizgaze/transact.git' } dir('bizgaze/transact.accounting') { git url: 'https://code.bizgaze.com/bizgaze/transact.accounting.git' } dir('bizgaze/transact.automation') { git url: 'https://code.bizgaze.com/bizgaze/transact.automation.git' } dir('bizgaze/transact.coupons') { git url: 'https://code.bizgaze.com/bizgaze/transact.coupons.git' } dir('bizgaze/transact.estimates') { git url: 'https://code.bizgaze.com/bizgaze/transact.estimates.git' } dir('bizgaze/transact.expenses') { git url: 'https://code.bizgaze.com/bizgaze/transact.expenses.git' } dir('bizgaze/transact.inventory') { git url: 'https://code.bizgaze.com/bizgaze/transact.inventory.git' } dir('bizgaze/transact.invoices') { git url: 'https://code.bizgaze.com/bizgaze/transact.invoices.git' } dir('bizgaze/transact.offers') { git url: 'https://code.bizgaze.com/bizgaze/transact.offers.git' } dir('bizgaze/transact.orders') { git url: 'https://code.bizgaze.com/bizgaze/transact.orders.git' } dir('bizgaze/transact.payments') { git url: 'https://code.bizgaze.com/bizgaze/transact.payments.git' } dir('bizgaze/transact.pricelists') { git url: 'https://code.bizgaze.com/bizgaze/transact.pricelists.git' } dir('bizgaze/transact.providers') { git url: 'https://code.bizgaze.com/bizgaze/transact.providers.git' } dir('bizgaze/transact.taxes') { git url: 'https://code.bizgaze.com/bizgaze/transact.taxes.git' } dir('bizgaze/transact.wallets') { git url: 'https://code.bizgaze.com/bizgaze/transact.wallets.git' } dir('uniconnect') { git url: 'https://code.bizgaze.com/uniconnect.git' } dir('unidrive') { git url: 'https://code.bizgaze.com/unidrive.git' } dir('sprl') { git url: 'https://code.bizgaze.com/sprl.git' } sh 'dotnet restore ${WORKSPACE}/bizgaze/Bizgaze.Web.Server.publish.sln' } } stage('Clean') { steps { sh 'dotnet clean ${WORKSPACE}/bizgaze/Bizgaze.Web.Server.publish.sln --configuration Release' } } stage('Build') { steps { sh 'dotnet build ${WORKSPACE}/bizgaze/Bizgaze.Web.Server.publish.sln --configuration Release --no-restore' } }/* stage('Test') { steps { sh 'dotnet test ${WORKSPACE}/bizgaze/Bizgaze.Web.Server.publish.sln --no-restore' } }*/ stage('Publish') { steps { sh 'dotnet publish ${WORKSPACE}/bizgaze/Bizgaze.Web.Server.publish.sln -o out --configuration Release --no-restore' } } stage ('Deploy') { steps { sh 'sudo ~/scripts/qa_deploy ${WORKSPACE}/out' } } } post{ success{ emailext body: "${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\n More info at: ${env.BUILD_URL}", recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']], subject: "Jenkins Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}" } always { deleteDir() } cleanup { cleanWs() } } }