This repository has been archived by the owner on Feb 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
122 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
--- | ||
skip_list: | ||
- '304' # Detect CMake option "-DPYTHON3=ON" and environment variable. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[flake8] | ||
filename = *.py,src/ | ||
max-line-length = 88 | ||
extend-ignore = E203, E402 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
extends: default | ||
rules: | ||
line-length: disable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
--- | ||
name: Ansible Role Accelize DRM | ||
|
||
trigger: | ||
batch: true | ||
branches: | ||
include: | ||
- master | ||
tags: | ||
include: | ||
- "*" | ||
paths: | ||
exclude: | ||
- "*.md" | ||
- ".gitignore" | ||
- "LICENSE" | ||
|
||
pr: none | ||
|
||
pool: | ||
vmImage: ubuntu-20.04 | ||
|
||
jobs: | ||
- job: tests | ||
displayName: Tests | ||
variables: | ||
cacheDir: /tmp/.pipeline_cache | ||
steps: | ||
|
||
- checkout: self | ||
fetchDepth: 1 | ||
path: ansible-role-accelize-drm # Must match role name in molecule/converge.yml | ||
|
||
- task: Cache@2 | ||
inputs: | ||
key: cache | ||
path: $(cacheDir) | ||
displayName: Cache packages | ||
|
||
- script: | | ||
echo "##vso[task.prependpath]$HOME/.local/bin" | ||
pip install --disable-pip-version-check --cache-dir $(cacheDir)/.pip_packages -U ansible flake8 yamllint ansible-lint black bandit molecule-docker pytest-testinfra | ||
displayName: Get dependencies | ||
condition: always() | ||
- script: flake8 | ||
displayName: Lint Python modules | ||
condition: always() | ||
|
||
- script: black . --check --diff | ||
displayName: Check black style is applied | ||
condition: always() | ||
|
||
- script: bandit -r . -x ./molecule | ||
displayName: Check Python security | ||
condition: always() | ||
|
||
- script: yamllint -s . | ||
displayName: Lint YAML files | ||
condition: always() | ||
|
||
- script: ansible-lint . | ||
displayName: Lint Ansible configuration | ||
condition: always() | ||
|
||
- script: molecule test | ||
displayName: Test Ansible role | ||
condition: always() | ||
env: | ||
ANSIBLE_STDOUT_CALLBACK: debug | ||
ANSIBLE_FORCE_COLOR: "True" | ||
ANSIBLE_NOCOLOR": "False" | ||
|
||
- job: | ||
displayName: Ansible Galaxy publish | ||
dependsOn: tests | ||
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags'), ne(variables['Build.Reason'], 'Schedule')) | ||
variables: | ||
- group: ansibleGalaxy | ||
steps: | ||
|
||
- checkout: none | ||
|
||
- script: ansible-galaxy role import --token $(AnsibleGalaxyToken) --role-name accelize.accelize_drm Accelize ansible-role-accelize-drm | ||
displayName: Publish role to Ansible Galaxy | ||
|
||
- task: GitHubRelease@1 | ||
displayName: Publish GitHub release | ||
inputs: | ||
gitHubConnection: Accelize-application | ||
repositoryName: $(Build.Repository.Name) | ||
action: create | ||
target: $(Build.SourceVersion) | ||
tagSource: gitTag | ||
tagPattern: '[0-9]+\.[0-9]+\.[0-9]+' | ||
isPreRelease: contains($(libraryVersion.version), '-') | ||
releaseNotesSource: inline | ||
releaseNotesInline: Role Available on Ansible galaxy. | ||
changeLogCompareToRelease: lastFullRelease | ||
changeLogType: commitBased |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters