mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
parent
0e736f785a
commit
253cd18e89
113
.azure.yml
113
.azure.yml
@ -35,13 +35,6 @@ jobs:
|
|||||||
- checkout: self # represents the repo where the initial Pipelines YAML file was found
|
- checkout: self # represents the repo where the initial Pipelines YAML file was found
|
||||||
submodules: recursive # set to 'recursive' to get submodules of submodules
|
submodules: recursive # set to 'recursive' to get submodules of submodules
|
||||||
|
|
||||||
# read version file
|
|
||||||
- bash: |
|
|
||||||
echo "##vso[task.setvariable variable=semVer]$(cat version)"
|
|
||||||
echo "##vso[task.setvariable variable=preRel]$(grep -oE 'alpha|beta' version)"
|
|
||||||
workingDirectory: '$(Build.SourcesDirectory)'
|
|
||||||
displayName: 'Read and generate pipeline variables'
|
|
||||||
|
|
||||||
# build process
|
# build process
|
||||||
- bash: ./.ci/ci_build.sh
|
- bash: ./.ci/ci_build.sh
|
||||||
displayName: 'Build $(dockerName) packages'
|
displayName: 'Build $(dockerName) packages'
|
||||||
@ -50,41 +43,19 @@ jobs:
|
|||||||
DOCKER_NAME: $(dockerName)
|
DOCKER_NAME: $(dockerName)
|
||||||
PLATFORM: $(platform)
|
PLATFORM: $(platform)
|
||||||
|
|
||||||
# copy files
|
# move files
|
||||||
- bash: 'cp -v deploy/Hyperion-* $(Build.ArtifactStagingDirectory) 2>/dev/null || :'
|
- bash: 'mv -v deploy/Hyperion-* $(Build.ArtifactStagingDirectory) 2>/dev/null || :'
|
||||||
workingDirectory: '$(Build.SourcesDirectory)'
|
workingDirectory: $(Build.SourcesDirectory)
|
||||||
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
||||||
displayName: 'Collecting deployable artifacts'
|
displayName: 'Collect artifacts'
|
||||||
|
|
||||||
# publish artifacts
|
# publish artifacts
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
inputs:
|
inputs:
|
||||||
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
pathtoPublish: $(Build.ArtifactStagingDirectory)
|
||||||
ArtifactName: $(dockerTag)
|
ArtifactName: $(dockerTag)
|
||||||
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
||||||
displayName: 'Publish deployables artifacts'
|
displayName: 'Publish artifacts'
|
||||||
|
|
||||||
# set release to pre-release
|
|
||||||
- bash: echo '##vso[task.setvariable variable=preRelease;]true'
|
|
||||||
condition: and(succeeded(), or(contains(variables['preRel'], 'alpha'), contains(variables['preRel'], 'beta')), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
|
||||||
displayName: 'Mark alpha or beta as pre-release'
|
|
||||||
|
|
||||||
# create or update github release
|
|
||||||
- task: GithubRelease@0
|
|
||||||
inputs:
|
|
||||||
gitHubConnection: 'Hyperion-Bot'
|
|
||||||
repositoryName: $(Build.Repository.Name)
|
|
||||||
action: edit
|
|
||||||
target: $(Build.SourceVersion)
|
|
||||||
tagSource: manual
|
|
||||||
tag: $(Build.SourceBranchName)
|
|
||||||
title: 'Hyperion $(semVer)'
|
|
||||||
assets: '$(Build.ArtifactStagingDirectory)/*'
|
|
||||||
assetUploadMode: 'replace'
|
|
||||||
addChangeLog: false
|
|
||||||
isPreRelease: $(preRelease)
|
|
||||||
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
|
||||||
displayName: Create/Update GitHub release
|
|
||||||
|
|
||||||
######################
|
######################
|
||||||
###### macOS #########
|
###### macOS #########
|
||||||
@ -99,55 +70,85 @@ jobs:
|
|||||||
- checkout: self # represents the repo where the initial Pipelines YAML file was found
|
- checkout: self # represents the repo where the initial Pipelines YAML file was found
|
||||||
submodules: recursive # set to 'recursive' to get submodules of submodules
|
submodules: recursive # set to 'recursive' to get submodules of submodules
|
||||||
|
|
||||||
# read version file
|
|
||||||
- bash: |
|
|
||||||
echo "##vso[task.setvariable variable=semVer]$(cat version)"
|
|
||||||
echo "##vso[task.setvariable variable=preRel]$(grep -oE 'alpha|beta' version)"
|
|
||||||
workingDirectory: '$(Build.SourcesDirectory)'
|
|
||||||
displayName: 'Read and generate pipeline variables'
|
|
||||||
|
|
||||||
# install dependencies
|
# install dependencies
|
||||||
- bash: ./.ci/ci_install.sh
|
- bash: ./.ci/ci_install.sh
|
||||||
displayName: 'Install dependencies'
|
displayName: 'Install dependencies'
|
||||||
|
|
||||||
# build process
|
# build process
|
||||||
- bash: ./.ci/ci_build.sh
|
- bash: ./.ci/ci_build.sh
|
||||||
displayName: 'Build macOS 10.13 packages'
|
|
||||||
env:
|
env:
|
||||||
PLATFORM: 'osx'
|
PLATFORM: 'osx'
|
||||||
|
condition: succeeded()
|
||||||
|
displayName: 'Build macOS 10.13 packages'
|
||||||
|
|
||||||
# copy files
|
# move files
|
||||||
- bash: 'cp -v build/Hyperion-* $(Build.ArtifactStagingDirectory) 2>/dev/null || :'
|
- bash: 'mv -v build/Hyperion-* $(Build.ArtifactStagingDirectory) 2>/dev/null || :'
|
||||||
workingDirectory: '$(Build.SourcesDirectory)'
|
workingDirectory: $(Build.SourcesDirectory)
|
||||||
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
||||||
displayName: 'Collecting deployable artifacts'
|
displayName: 'Collect artifacts'
|
||||||
|
|
||||||
# publish artifacts
|
# publish artifacts
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
inputs:
|
inputs:
|
||||||
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
pathtoPublish: $(Build.ArtifactStagingDirectory)
|
||||||
ArtifactName: 'macos'
|
ArtifactName: 'macos'
|
||||||
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
||||||
displayName: 'Publish deployables artifacts'
|
displayName: 'Publish artifacts'
|
||||||
|
|
||||||
|
################################
|
||||||
|
###### Publish Releases ########
|
||||||
|
################################
|
||||||
|
|
||||||
|
- job: PublishReleases
|
||||||
|
timeoutInMinutes: 120
|
||||||
|
dependsOn:
|
||||||
|
- Linux
|
||||||
|
- macOS
|
||||||
|
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
||||||
|
pool:
|
||||||
|
vmImage: ubuntu-16.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- checkout: self # represents the repo where the initial Pipelines YAML file was found
|
||||||
|
|
||||||
|
# download deployables artifacts
|
||||||
|
- task: DownloadPipelineArtifact@2
|
||||||
|
inputs:
|
||||||
|
path: $(Build.ArtifactStagingDirectory)
|
||||||
|
displayName: Download artifacts
|
||||||
|
|
||||||
|
# read version file
|
||||||
|
- bash: |
|
||||||
|
echo "##vso[task.setvariable variable=semVer]$(cat version)"
|
||||||
|
echo "##vso[task.setvariable variable=preRel]$(grep -oE 'alpha|beta' version)"
|
||||||
|
workingDirectory: '$(Build.SourcesDirectory)'
|
||||||
|
condition: succeeded()
|
||||||
|
displayName: 'Read and generate pipeline variables'
|
||||||
|
|
||||||
# set release to pre-release
|
# set release to pre-release
|
||||||
- bash: echo '##vso[task.setvariable variable=preRelease;]true'
|
- bash: echo '##vso[task.setvariable variable=preRelease;]true'
|
||||||
condition: and(succeeded(), or(contains(variables['preRel'], 'alpha'), contains(variables['preRel'], 'beta')), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
condition: and(succeeded(), or(contains(variables['preRel'], 'alpha'), contains(variables['preRel'], 'beta')), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
||||||
displayName: 'Mark alpha or beta as pre-release'
|
displayName: 'Mark alpha or beta as pre-release'
|
||||||
|
|
||||||
# create or update github release
|
# create github releases
|
||||||
- task: GithubRelease@0
|
- task: GithubRelease@0
|
||||||
inputs:
|
inputs:
|
||||||
gitHubConnection: 'Hyperion-Bot'
|
gitHubConnection: Hyperion-Bot
|
||||||
repositoryName: $(Build.Repository.Name)
|
repositoryName: $(Build.Repository.Name)
|
||||||
action: edit
|
action: create
|
||||||
target: $(Build.SourceVersion)
|
target: $(Build.SourceVersion)
|
||||||
tagSource: manual
|
tagSource: manual
|
||||||
tag: '$(Build.SourceBranchName)'
|
tag: $(Build.SourceBranchName)
|
||||||
title: 'Hyperion $(semVer)'
|
title: 'Hyperion $(semVer)'
|
||||||
assets: '$(Build.ArtifactStagingDirectory)/*'
|
assets: |
|
||||||
|
$(Build.ArtifactStagingDirectory)/amd64/*
|
||||||
|
$(Build.ArtifactStagingDirectory)/i386/*
|
||||||
|
$(Build.ArtifactStagingDirectory)/armv6hf/*
|
||||||
|
$(Build.ArtifactStagingDirectory)/armv7hf/*
|
||||||
|
$(Build.ArtifactStagingDirectory)/aarch64/*
|
||||||
|
$(Build.ArtifactStagingDirectory)/macos/*
|
||||||
assetUploadMode: 'replace'
|
assetUploadMode: 'replace'
|
||||||
addChangeLog: false
|
addChangeLog: false
|
||||||
isPreRelease: $(preRelease)
|
isPreRelease: $(preRelease)
|
||||||
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
condition: succeeded()
|
||||||
displayName: Create/Update GitHub release
|
displayName: Create GitHub releases
|
||||||
|
Loading…
x
Reference in New Issue
Block a user