Skip to content

Commit

Permalink
Add microsoft.ad as a test requirement (#691)
Browse files Browse the repository at this point in the history
Adds the `microsoft.ad` collection as a requirement to run the tests.
This is needed for incoming modules who need modules to manage a domain.
  • Loading branch information
jborean93 authored Nov 13, 2024
1 parent 2b5397a commit 6ef5491
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 8 deletions.
45 changes: 37 additions & 8 deletions .azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,31 @@ resources:
pool: Standard

stages:
- stage: Dependencies
displayName: Dependencies
jobs:
- job: dep_download
displayName: Download Dependencies
pool:
vmImage: ubuntu-latest
steps:
- checkout: self
fetchDepth: 1
- task: UsePythonVersion@0
inputs:
versionSpec: "3.10"
- bash: python -m pip install ansible-core
displayName: Install Ansible
- bash: ansible-galaxy collection install -r tests/requirements.yml -p collections
displayName: Install collection requirements
- task: PublishPipelineArtifact@1
inputs:
targetPath: collections
artifactName: CollectionRequirements
- stage: Ansible_devel
displayName: Ansible devel
dependsOn: []
dependsOn:
- Dependencies
jobs:
- template: templates/matrix.yml
parameters:
Expand All @@ -58,7 +80,8 @@ stages:
test: lint
- stage: Ansible_2_18
displayName: Ansible 2.18
dependsOn: []
dependsOn:
- Dependencies
jobs:
- template: templates/matrix.yml
parameters:
Expand All @@ -71,7 +94,8 @@ stages:
test: units
- stage: Ansible_2_17
displayName: Ansible 2.17
dependsOn: []
dependsOn:
- Dependencies
jobs:
- template: templates/matrix.yml
parameters:
Expand All @@ -84,7 +108,8 @@ stages:
test: units
- stage: Ansible_2_16
displayName: Ansible 2.16
dependsOn: []
dependsOn:
- Dependencies
jobs:
- template: templates/matrix.yml
parameters:
Expand All @@ -97,7 +122,8 @@ stages:
test: units
- stage: Ansible_2_15
displayName: Ansible 2.15
dependsOn: []
dependsOn:
- Dependencies
jobs:
- template: templates/matrix.yml
parameters:
Expand All @@ -110,7 +136,8 @@ stages:
test: units
- stage: Windows_1
displayName: Windows 1
dependsOn: []
dependsOn:
- Dependencies
jobs:
- template: templates/matrix.yml
parameters:
Expand All @@ -133,7 +160,8 @@ stages:
test: 2025/ssh/key
- stage: Windows_2
displayName: Windows 2
dependsOn: []
dependsOn:
- Dependencies
jobs:
- template: templates/matrix.yml
parameters:
Expand All @@ -156,7 +184,8 @@ stages:
test: 2025/ssh/key
- stage: Windows_3
displayName: Windows 3
dependsOn: []
dependsOn:
- Dependencies
jobs:
- template: templates/matrix.yml
parameters:
Expand Down
8 changes: 8 additions & 0 deletions .azure-pipelines/templates/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ jobs:
- checkout: self
fetchDepth: $(fetchDepth)
path: $(checkoutPath)
- task: DownloadPipelineArtifact@2
inputs:
artifact: CollectionRequirements
path: $(Agent.TempDirectory)
- bash: |
sudo chown -R "$(whoami)" "${PWD}/../../../ansible_collections"
cp -R "$(Agent.TempDirectory)/ansible_collections"/. "${PWD}/../../../ansible_collections"
displayName: Set up dependencies
- bash: .azure-pipelines/scripts/run-tests.sh "$(entryPoint)" "${{ job.test }}" "$(coverageBranches)"
displayName: Run Tests
- bash: .azure-pipelines/scripts/process-results.sh
Expand Down
2 changes: 2 additions & 0 deletions tests/requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
collections:
- name: microsoft.ad

0 comments on commit 6ef5491

Please sign in to comment.