Skip to content

Commit

Permalink
Add docker image w/ both Android SDK and an x64 crossroot (#901)
Browse files Browse the repository at this point in the history
Co-authored-by: Logan Bussell <loganbussell@microsoft.com>
  • Loading branch information
directhex and lbussell committed Jul 10, 2023
1 parent 9de0cb6 commit af78485
Show file tree
Hide file tree
Showing 28 changed files with 73 additions and 25 deletions.
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-all-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ variables:
- template: variables/common.yml

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ variables:
- template: variables/common.yml

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-almalinux-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/almalinux/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-almalinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/almalinux/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-alpine-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/alpine/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/alpine/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-centos-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/centos/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/centos/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-debian-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/debian/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ variables:
value: --path 'src/debian/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-eng.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ variables:
value: --path '*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-fedora-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/fedora/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/fedora/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-mariner-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/cbl-mariner/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-mariner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/cbl-mariner/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-nanoserver-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/nanoserver/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-nanoserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/nanoserver/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-opensuse-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/opensuse/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-opensuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/opensuse/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-raspbian-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/raspbian/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-raspbian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ variables:
value: --path 'src/raspbian/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-ubuntu-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/ubuntu/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/dotnet-buildtools-prereqs-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/ubuntu/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/windowsservercore/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
value: --path 'src/windowsservercore/*'

stages:
- template: ../common/templates/stages/dotnet/build-test-publish-repo.yml
- template: stages/build-test-publish-repo.yml
parameters:
internalProjectName: ${{ variables.internalProjectName }}
publicProjectName: ${{ variables.publicProjectName }}
29 changes: 29 additions & 0 deletions eng/pipelines/stages/build-test-publish-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
parameters:
noCache: false
internalProjectName: null
publicProjectName: null
linuxAmdBuildJobTimeout: null
linuxArmBuildJobTimeout: null
customBuildInitSteps: []
customCopyBaseImagesInitSteps: []

stages:
- template: ../../common/templates/stages/dotnet/build-test-publish-repo.yml
parameters:
noCache: ${{ parameters.noCache }}
internalProjectName: ${{ parameters.internalProjectName }}
publicProjectName: ${{ parameters.publicProjectName }}

linuxAmd64Pool:
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals build.ubuntu.2204.amd64
${{ else }}:
name: NetCore-Public
demands: ImageOverride -equals build.ubuntu.2204.amd64.open

linuxAmdBuildJobTimeout: ${{ parameters.linuxAmdBuildJobTimeout }}
linuxArmBuildJobTimeout: ${{ parameters.linuxArmBuildJobTimeout }}

customBuildInitSteps: ${{ parameters.customBuildInitSteps }}
customCopyBaseImagesInitSteps: ${{ parameters.customCopyBaseImagesInitSteps }}
6 changes: 6 additions & 0 deletions src/cbl-mariner/2.0/cross/android/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-amd64-local AS crossrootx64

FROM mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-android-local

# Copy crossrootfs from AMD64 build image, so we can build Android-targeting code for that arch
COPY --from=crossrootx64 /crossrootfs/x64 /crossrootfs/x64
13 changes: 13 additions & 0 deletions src/cbl-mariner/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,19 @@
}
]
},
{
"platforms": [
{
"dockerfile": "src/cbl-mariner/2.0/cross/android/amd64",
"os": "linux",
"osVersion": "cbl-mariner2.0",
"tags": {
"cbl-mariner-2.0-cross-android-amd64-$(System:TimeStamp)-$(System:DockerfileGitCommitSha)": {},
"cbl-mariner-2.0-cross-android-amd64$(FloatingTagSuffix)": {}
}
}
]
},
{
"platforms": [
{
Expand Down

0 comments on commit af78485

Please sign in to comment.