From 73d4cf92b75ed8261d96577317f105eb7b942fef Mon Sep 17 00:00:00 2001 From: Paannda Date: Mon, 29 Mar 2021 02:06:24 +0000 Subject: [PATCH] Adding custom pipeline settings --- .azuredevops/pipelines/publish-job.yml | 115 +++++++++---------------- 1 file changed, 39 insertions(+), 76 deletions(-) diff --git a/.azuredevops/pipelines/publish-job.yml b/.azuredevops/pipelines/publish-job.yml index 78697830b..480795ef6 100644 --- a/.azuredevops/pipelines/publish-job.yml +++ b/.azuredevops/pipelines/publish-job.yml @@ -6,8 +6,7 @@ stages: - stage: build jobs: - job: Build - pool: - vmImage: ${{ variables.vmImage }} + pool: TestPipeline steps: - template: templates/build-steps.yml @@ -16,32 +15,11 @@ stages: - job: strategy: matrix: - win10-x64: - runtime: win10-x64 - format: zip - compression: zip - win10-x86: - runtime: win10-x86 - format: zip - compression: zip - osx-x64: - runtime: osx-x64 - format: tar.gz - compression: tar linux-x64: runtime: linux-x64 format: tar.gz compression: tar - linux-arm: - runtime: linux-arm - format: tar.gz - compression: tar - linux-arm64: - runtime: linux-arm64 - format: tar.gz - compression: tar - pool: - vmImage: ${{ variables.vmImage }} + pool: TestPipeline steps: - template: templates/publish-os-steps.yml @@ -63,56 +41,41 @@ stages: $response = Invoke-WebRequest -Uri "https://ombireleasenote.azurewebsites.net/api/ReleaseNotesFunction?buildId=$(Build.BuildId)" Write-Host "##vso[task.setvariable variable=ReleaseNotes;]$response" - - task: GitHubRelease@1 - displayName: 'Ombi.Releases Release' - inputs: - gitHubConnection: 'PAT' - repositoryName: 'Ombi-app/Ombi.Releases' - action: 'create' - target: 'c7fcbb77b58aef1076d635a9ef99e4374abc8672' - tagSource: 'userSpecifiedTag' - tag: '$(gitTag)' - releaseNotesSource: 'inline' - releaseNotesInline: '$(ReleaseNotes)' - assets: | - $(System.ArtifactsDirectory)/**/*.zip - $(System.ArtifactsDirectory)/**/*.tar.gz - isPreRelease: true - changeLogCompareToRelease: 'lastNonDraftRelease' - changeLogType: 'commitBased' + # - task: GitHubRelease@1 + # inputs: + # gitHubConnection: 'github.com_tidusjar' + # repositoryName: 'tidusjar/Ombi' + # action: 'create' + # target: '$(Build.SourceVersion)' + # tagSource: 'userSpecifiedTag' + # tag: '$(gitTag)' + # isDraft: true + # changeLogCompareToRelease: 'lastNonDraftRelease' + # changeLogType: 'commitBased' - - task: GitHubRelease@1 - displayName: 'Ombi Release' - inputs: - gitHubConnection: 'PAT' - repositoryName: 'Ombi-app/Ombi' - action: 'create' - target: '$(Build.SourceVersion)' - tagSource: 'userSpecifiedTag' - tag: '$(gitTag)' - releaseNotesSource: 'inline' - releaseNotesInline: '$(ReleaseNotes)' - assets: | - $(System.ArtifactsDirectory)/**/*.zip - $(System.ArtifactsDirectory)/**/*.tar.gz - isPreRelease: true - changeLogCompareToRelease: 'lastNonDraftRelease' - changeLogType: 'commitBased' - - - task: PowerShell@2 - displayName: "Trigger APT build" - inputs: - targetType: 'inline' - script: | - $body = @{ - "ref"="main" - "inputs"= @{"version"= "$(gitTag)"} - } | ConvertTo-Json - - $header = @{ - "Accept"="application/vnd.github.v3+json" - "Authorization"="Bearer $(APTPAT)" - "User-Agent"="Ombi" - } - - Invoke-RestMethod -Uri "https://api.github.com/repos/Ombi-app/Ombi.Apt/actions/workflows/build-deb.yml/dispatches" -Method 'Post' -Body $body -Headers $header \ No newline at end of file + #- task: GitHubRelease@1 + # inputs: + # gitHubConnection: 'github.com_tidusjar' + # repositoryName: 'tidusjar/Ombi.Releases' + # action: 'create' + # target: 'c7fcbb77b58aef1076d635a9ef99e4374abc8672' + # tagSource: 'userSpecifiedTag' + # tag: '$(gitTag)' + # releaseNotesSource: 'inline' + # releaseNotesInline: '$(ReleaseNotes)' + # assets: | + # $(System.ArtifactsDirectory)/**/*.zip + # $(System.ArtifactsDirectory)/**/*.tar.gz + # isPreRelease: true + # changeLogCompareToRelease: 'lastNonDraftRelease' + # changeLogType: 'commitBased' + - deployment: VMDeploy + displayName: web + environment: + name: Test1 + resourceType: VirtualMachine + strategy: + runOnce: + deploy: + steps: + - script: tar xvf /home/azure/azagent/_work/1/linux-x64/linux-x64.tar.gz -C /home/azure/azagent/_work/1/linux-x64/ && sudo systemctl stop ombi && cp -R /home/azure/azagent/_work/1/linux-x64/* /opt/ombi && sudo systemctl start ombi \ No newline at end of file