mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
ci: select docker registry based on branch
This commit is contained in:
parent
4e4cb12ed4
commit
e22a2a7395
@ -49,7 +49,7 @@ jobs:
|
||||
${{ if ne(parameters.toolset, 'make_homebrew_macos') }}:
|
||||
container:
|
||||
image: '$(dockerImagePrefix)$(DockerImageName):$(dockerBuildNumber)'
|
||||
endpoint: 'rnd-docker-niartifacts-pre-readonly'
|
||||
endpoint: ${{ variables.dockerRegistryReadOnly }}
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
|
||||
@ -64,7 +64,7 @@ jobs:
|
||||
matrix: $[ variables.dockerImageMatrixFedoraRpm ]
|
||||
container:
|
||||
image: '$(dockerImagePrefix)$(DockerImageName):$(dockerBuildNumber)'
|
||||
endpoint: 'rnd-docker-niartifacts-pre-readonly'
|
||||
endpoint: ${{ variables.dockerRegistryReadOnly }}
|
||||
${{ if eq(parameters.toolset, 'ubuntu_deb') }}:
|
||||
#pbuilder requires access to /proc
|
||||
options: --privileged
|
||||
|
||||
@ -63,7 +63,7 @@ jobs:
|
||||
${{ if ne(parameters.toolset, 'make_homebrew_macos') }}:
|
||||
container:
|
||||
image: '$(dockerImagePrefix)$(DockerImageName):$(dockerBuildNumber)'
|
||||
endpoint: 'rnd-docker-niartifacts-pre-readonly'
|
||||
endpoint: ${{ variables.dockerRegistryReadOnly }}
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
|
||||
@ -34,7 +34,7 @@ jobs:
|
||||
clean: all
|
||||
container:
|
||||
image: '$(dockerImagePrefix)$(DockerImageName):$(dockerBuildNumber)'
|
||||
endpoint: 'rnd-docker-niartifacts-pre-readonly'
|
||||
endpoint: ${{ variables.dockerRegistryReadOnly }}
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
|
||||
@ -71,9 +71,6 @@ variables:
|
||||
value:
|
||||
"{'VS2019-x64-builder':{'buildOSName':'win-vs19-v142-x64','dockerImageName':'uhd-builder-vs2019-v142-x64','cmakeCompiler':'Visual Studio 16 2019','cmakeArch':'x64','vsArch':'x64','vsYear':'2019'}}"
|
||||
|
||||
- name: dockerImagePrefix
|
||||
value: 'rnd-docker-pre/ni/rfsdr/'
|
||||
|
||||
jobs:
|
||||
- job: build_image_linux
|
||||
displayName: Build Docker Image
|
||||
@ -92,7 +89,7 @@ jobs:
|
||||
inputs:
|
||||
command: 'build'
|
||||
Dockerfile: '$(Build.SourcesDirectory)/.ci/docker/$(dockerImageName).Dockerfile'
|
||||
containerRegistry: 'rnd-docker-niartifacts-pre-publish'
|
||||
containerRegistry: ${{ variables.dockerRegistryPublish }}
|
||||
repository: '$(dockerImagePrefix)$(dockerImageName)'
|
||||
tags: $(Build.BuildNumber)
|
||||
arguments: --no-cache --pull
|
||||
@ -100,7 +97,7 @@ jobs:
|
||||
displayName: Push Image
|
||||
inputs:
|
||||
command: 'push'
|
||||
containerRegistry: 'rnd-docker-niartifacts-pre-publish'
|
||||
containerRegistry: ${{ variables.dockerRegistryPublish }}
|
||||
repository: '$(dockerImagePrefix)$(dockerImageName)'
|
||||
tags: $(Build.BuildNumber)
|
||||
|
||||
@ -116,7 +113,7 @@ jobs:
|
||||
matrix: $[ variables.linuxDockerImages ]
|
||||
container:
|
||||
image: '$(dockerImagePrefix)$(dockerImageName):$(Build.BuildNumber)'
|
||||
endpoint: 'rnd-docker-niartifacts-pre-readonly'
|
||||
endpoint: ${{ variables.dockerRegistryReadOnly }}
|
||||
workspace:
|
||||
clean: outputs
|
||||
steps:
|
||||
@ -155,7 +152,7 @@ jobs:
|
||||
inputs:
|
||||
command: 'build'
|
||||
Dockerfile: '$(Build.SourcesDirectory)/.ci/docker/$(dockerImageName).Dockerfile'
|
||||
containerRegistry: 'rnd-docker-niartifacts-pre-publish'
|
||||
containerRegistry: ${{ variables.dockerRegistryPublish }}
|
||||
repository: '$(dockerImagePrefix)$(dockerImageName)'
|
||||
tags: $(Build.BuildNumber)
|
||||
buildContext: $(Build.SourcesDirectory)
|
||||
@ -164,7 +161,7 @@ jobs:
|
||||
displayName: Push Image
|
||||
inputs:
|
||||
command: 'push'
|
||||
containerRegistry: 'rnd-docker-niartifacts-pre-publish'
|
||||
containerRegistry: ${{ variables.dockerRegistryPublish }}
|
||||
repository: '$(dockerImagePrefix)$(dockerImageName)'
|
||||
tags: $(Build.BuildNumber)
|
||||
|
||||
@ -181,7 +178,7 @@ jobs:
|
||||
matrix: $[ variables.winDockerImages ]
|
||||
container:
|
||||
image: '$(dockerImagePrefix)$(dockerImageName):$(Build.BuildNumber)'
|
||||
endpoint: 'rnd-docker-niartifacts-pre-readonly'
|
||||
endpoint: ${{ variables.dockerRegistryReadOnly }}
|
||||
workspace:
|
||||
clean: outputs
|
||||
steps:
|
||||
|
||||
@ -1,3 +1,23 @@
|
||||
variables:
|
||||
- name: UHDPipelineDockerImageArtifactName
|
||||
value: 'DockerImageNames'
|
||||
# The rnd-docker-pre artifactory repo has a retention policy of 7 days. This is fine for
|
||||
# PR builds, but for our mainline and release branches, we need to use the rnd-docker-ci
|
||||
# repo to keep them around longer.
|
||||
# The standard rnd-docker-niartifacts-ci-publish service connection only allows
|
||||
# certain branch names, which don't include UHD's release branch naming. We were given
|
||||
# a special sdr-specific service connection to allow this use case.
|
||||
- ${{ if or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/heads/UHD-')) }}:
|
||||
- name: dockerRegistryPublish
|
||||
value: rnd-docker-niartifacts-sdr-ci-publish
|
||||
- name: dockerRegistryReadOnly
|
||||
value: rnd-docker-niartifacts-ci-readonly
|
||||
- name: dockerImagePrefix
|
||||
value: 'rnd-docker-ci/ni/rfsdr/'
|
||||
- ${{ else }}:
|
||||
- name: dockerRegistryPublish
|
||||
value: rnd-docker-niartifacts-pre-publish
|
||||
- name: dockerRegistryReadOnly
|
||||
value: rnd-docker-niartifacts-pre-readonly
|
||||
- name: dockerImagePrefix
|
||||
value: 'rnd-docker-pre/ni/rfsdr/'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user