Skip to content

Commit 18deafc

Browse files
committed
test artifacts, include testing for alpine
1 parent ba7992f commit 18deafc

File tree

6 files changed

+48
-61
lines changed

6 files changed

+48
-61
lines changed

.azurepipelines/artifacts-test.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
1-
parameters:
2-
- name: name # defaults for any parameters that aren't specified
3-
default: ''
4-
- name: vmImage
5-
default: ''
6-
71
jobs:
8-
- job: Artifacts_Test_${{ parameters.name }}
9-
displayName: 'Artifacts Test ${{ parameters.name }}'
10-
pool:
11-
vmImage: ${{ parameters.vmImage }}
12-
dependsOn: Generator
13-
strategy:
14-
matrix: $[ dependencies['Generator'].outputs['Map_${{ parameters.name }}.dockerConfigs'] ]
15-
steps:
16-
- template: common-steps.yml
17-
parameters:
18-
includeArtifacts: true
19-
- pwsh: ./build.ps1 -target Artifacts-Test -DockerDistro $(DISTRO) -DockerDotnetVersion $(DOTNET_VERSION)
20-
displayName: '[Docker Test Artifacts]'
2+
- ${{ each distro in parameters.distros }}:
3+
- ${{ each dotnetVersion in parameters.dotnetVersions }}:
4+
- job:
5+
condition: or( ne('${{ distro }}', 'alpine.3.10-x64'), ne('${{ dotnetVersion }}', '3.1'))
6+
displayName: 'Artifacts Test ${{ distro }} ${{ dotnetVersion }} (${{ parameters.name }})'
7+
pool:
8+
vmImage: ${{ parameters.vmImage }}
9+
steps:
10+
- template: common-steps.yml
11+
parameters:
12+
includeArtifacts: true
13+
- pwsh: ./build.ps1 -target Artifacts-Test -DockerDistro ${{ distro }} -DockerDotnetVersion ${{ dotnetVersion }}
14+
displayName: '[Docker Test Artifacts ${{ distro }}_${{ dotnetVersion }}]'
2115
- job: Artifacts_Test_MsBuild
2216
displayName: Artifacts Test MsBuild (Windows)
2317
pool:

.azurepipelines/docker.yml

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
1-
parameters:
2-
- name: name # defaults for any parameters that aren't specified
3-
default: ''
4-
- name: vmImage
5-
default: ''
6-
71
jobs:
8-
- job: Docker_${{ parameters.name }}
9-
displayName: 'Docker ${{ parameters.name }}'
10-
pool:
11-
vmImage: ${{ parameters.vmImage }}
12-
dependsOn: Generator
13-
strategy:
14-
matrix: $[ dependencies['Generator'].outputs['Map_${{ parameters.name }}.dockerConfigs'] ]
15-
steps:
16-
- template: common-steps.yml
17-
parameters:
18-
includeArtifacts: true
19-
- pwsh: ./build.ps1 -target Publish-DockerHub -DockerDistro $(DISTRO) -DockerDotnetVersion $(DOTNET_VERSION)
20-
displayName: '[Docker build & Test]'
21-
env:
22-
DOCKER_USERNAME: $(DOCKER_USERNAME)
23-
DOCKER_PASSWORD: $(DOCKER_PASSWORD)
24-
ENABLED_PUBLISH_DOCKER: $(ENABLED_PUBLISH_DOCKER)
2+
- ${{ each distro in parameters.distros }}:
3+
- ${{ each dotnetVersion in parameters.dotnetVersions }}:
4+
- job:
5+
displayName: 'Docker ${{ distro }} ${{ dotnetVersion }} (${{ parameters.name }})'
6+
pool:
7+
vmImage: ${{ parameters.vmImage }}
8+
steps:
9+
- template: common-steps.yml
10+
parameters:
11+
includeArtifacts: true
12+
- pwsh: ./build.ps1 -target Publish-DockerHub -DockerDistro ${{ distro }} -DockerDotnetVersion ${{ dotnetVersion }}
13+
displayName: '[Docker build & Test ${{ distro }} ${{ dotnetVersion }}]'
14+
env:
15+
DOCKER_USERNAME: $(DOCKER_USERNAME)
16+
DOCKER_PASSWORD: $(DOCKER_PASSWORD)
17+
ENABLED_PUBLISH_DOCKER: $(ENABLED_PUBLISH_DOCKER)

.azurepipelines/generate-job.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,13 @@ jobs:
102102
runs-on: ubuntu-latest
103103
strategy:
104104
matrix:
105-
os: [linux]
106-
targetFramework: [2.1, 3.1]
107-
distro: [centos.7-x64, debian.9-x64, fedora.30-x64, ubuntu.16.04-x64, ubuntu.18.04-x64]
105+
os: [linux]
106+
targetFramework: [2.1, 3.1]
107+
distro: [alpine.3.10-x64, centos.7-x64, debian.9-x64, fedora.30-x64, ubuntu.16.04-x64, ubuntu.18.04-x64]
108+
exclude:
109+
# for some reason this is not working on CI, but works locally
110+
- targetFramework: 3.1
111+
distro: alpine.3.10-x64
108112
fail-fast: false
109113

110114
steps:
@@ -232,9 +236,9 @@ jobs:
232236
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
233237
strategy:
234238
matrix:
235-
os: [linux]
236-
targetFramework: [2.1, 3.1]
237-
distro: [centos.7-x64, debian.9-x64, fedora.30-x64, ubuntu.16.04-x64, ubuntu.18.04-x64]
239+
os: [linux]
240+
targetFramework: [2.1, 3.1]
241+
distro: [alpine.3.10-x64, centos.7-x64, debian.9-x64, fedora.30-x64, ubuntu.16.04-x64, ubuntu.18.04-x64]
238242
fail-fast: false
239243

240244
steps:

azure-pipelines.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,13 @@ stages:
5555
- Test
5656
condition: succeeded()
5757
jobs:
58-
- template: .azurepipelines/generate-job.yml
58+
# - template: .azurepipelines/generate-job.yml
5959
- template: .azurepipelines/artifacts-test.yml
6060
parameters:
6161
name: Linux
6262
vmImage: 'ubuntu-latest'
63+
distros: [ 'alpine.3.10-x64', 'centos.7-x64', 'debian.9-x64', 'fedora.30-x64', 'ubuntu.16.04-x64', 'ubuntu.18.04-x64' ]
64+
dotnetVersions: [ '2.1', '3.1' ]
6365
# - template: .azurepipelines/artifacts-test.yml
6466
# parameters:
6567
# name: Windows
@@ -70,11 +72,13 @@ stages:
7072
dependsOn: Artifact_Test
7173
condition: succeeded()
7274
jobs:
73-
- template: .azurepipelines/generate-job.yml
75+
# - template: .azurepipelines/generate-job.yml
7476
- template: .azurepipelines/docker.yml
7577
parameters:
7678
name: Linux
7779
vmImage: 'ubuntu-latest'
80+
distros: [ 'alpine.3.10-x64', 'centos.7-x64', 'debian.9-x64', 'fedora.30-x64', 'ubuntu.16.04-x64', 'ubuntu.18.04-x64' ]
81+
dotnetVersions: [ '2.1', '3.1' ]
7882
# - template: .azurepipelines/docker.yml
7983
# parameters:
8084
# name: Windows

src/Docker/docker.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
{
22
"linux": {
33
"2.1": [
4+
"alpine.3.10-x64",
45
"centos.7-x64",
56
"debian.9-x64",
67
"fedora.30-x64",
78
"ubuntu.16.04-x64",
89
"ubuntu.18.04-x64"
910
],
1011
"3.1": [
12+
"alpine.3.10-x64",
1113
"centos.7-x64",
1214
"debian.9-x64",
1315
"fedora.30-x64",
@@ -23,4 +25,4 @@
2325
"nanoserver"
2426
]
2527
}
26-
}
28+
}

0 commit comments

Comments
 (0)