mirror of
https://github.com/tribufu/ServerManagers
synced 2026-06-01 09:42:39 +00:00
pipeline file changes
This commit is contained in:
parent
2eacc92203
commit
fcc91a1b02
2 changed files with 29 additions and 2 deletions
|
|
@ -14,6 +14,10 @@ parameters:
|
||||||
type: string
|
type: string
|
||||||
- name: RepositoryFolder
|
- name: RepositoryFolder
|
||||||
type: string
|
type: string
|
||||||
|
- name: GitEmail
|
||||||
|
type: string
|
||||||
|
- name: GitUsername
|
||||||
|
type: string
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- stage: deploy${{parameters.DeploymentType}}
|
- stage: deploy${{parameters.DeploymentType}}
|
||||||
|
|
@ -52,6 +56,7 @@ stages:
|
||||||
- template: output-environment-variables.yml@self
|
- template: output-environment-variables.yml@self
|
||||||
|
|
||||||
- checkout: MasterRepo
|
- checkout: MasterRepo
|
||||||
|
persistCredentials: true
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: Copy ${{parameters.DeploymentType}} Files
|
displayName: Copy ${{parameters.DeploymentType}} Files
|
||||||
|
|
@ -95,15 +100,33 @@ stages:
|
||||||
pwsh: true
|
pwsh: true
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: Commit ${{parameters.DeploymentType}} Files (TODO)
|
displayName: Commit ${{parameters.DeploymentType}} Files
|
||||||
enabled: false
|
enabled: false
|
||||||
env:
|
env:
|
||||||
DEPLOY_SOURCESDIRECTORY: $(Build.SourcesDirectory)
|
DEPLOY_SOURCESDIRECTORY: $(Build.SourcesDirectory)
|
||||||
inputs:
|
inputs:
|
||||||
targetType: inline
|
targetType: inline
|
||||||
script: |
|
script: |
|
||||||
Write-Host "Committing ${{parameters.DeploymentType}} Files"
|
Write-Host "Setting up the global configuration"
|
||||||
|
git config --global user.email "${{parameters.GitEmail}}"
|
||||||
|
git config --global user.name "${{parameters.GitUsername}}"
|
||||||
|
|
||||||
|
Write-Host "Performing Git Add"
|
||||||
|
git add .
|
||||||
|
|
||||||
|
Write-Host "Performing Git Commit"
|
||||||
|
if ('${{parameters.DeploymentType}}' -eq 'Beta') {
|
||||||
|
git commit -m "${{parameters.ApplicationName}} Beta $env:DEPLOY_BUILDNUMBER"
|
||||||
|
}
|
||||||
|
|
||||||
|
if ('${{parameters.DeploymentType}}' -eq 'Production') {
|
||||||
|
git commit -m "${{parameters.ApplicationName}} $env:DEPLOY_BUILDNUMBER"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Performing Git Push"
|
||||||
|
git push --set-upstream origin master --porcelain --force
|
||||||
pwsh: true
|
pwsh: true
|
||||||
|
workingDirectory: '$(Build.SourcesDirectory)'
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: Update Pipeline Version Variables (TODO)
|
displayName: Update Pipeline Version Variables (TODO)
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@ stages:
|
||||||
ApplicationName: $(ApplicationName)
|
ApplicationName: $(ApplicationName)
|
||||||
PublishFolder: $(PublishFolder)
|
PublishFolder: $(PublishFolder)
|
||||||
RepositoryFolder: $(RepositoryFolderBeta)
|
RepositoryFolder: $(RepositoryFolderBeta)
|
||||||
|
GitEmail: $(GitEmail)
|
||||||
|
GitUsername: $(GitUsername)
|
||||||
|
|
||||||
- template: azure-pipelines-deploy.yml@self
|
- template: azure-pipelines-deploy.yml@self
|
||||||
parameters:
|
parameters:
|
||||||
|
|
@ -53,3 +55,5 @@ stages:
|
||||||
ApplicationName: $(ApplicationName)
|
ApplicationName: $(ApplicationName)
|
||||||
PublishFolder: $(PublishFolder)
|
PublishFolder: $(PublishFolder)
|
||||||
RepositoryFolder: $(RepositoryFolderProduction)
|
RepositoryFolder: $(RepositoryFolderProduction)
|
||||||
|
GitEmail: $(GitEmail)
|
||||||
|
GitUsername: $(GitUsername)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue