-
Notifications
You must be signed in to change notification settings - Fork 83
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
62 changed files
with
1,457 additions
and
1,465 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
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
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,18 +1,17 @@ | ||
--- | ||
on: | ||
on: | ||
pull_request: | ||
|
||
name: Check changelog fragment | ||
jobs: | ||
check_fragment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Check that changelog fragment exists | ||
run: ./hacking/check_fragment.sh | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PR_NUMBER: ${{ github.event.number }} | ||
- name: Check that changelog fragment exists | ||
run: ./hacking/check_fragment.sh | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PR_NUMBER: ${{ github.event.number }} |
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,6 +1,7 @@ | ||
--- | ||
# https://github.com/marketplace/actions/automatic-rebase | ||
# GitHub Actions don't automatically rebase before running, so add support for people to type `/rebase` | ||
on: | ||
on: | ||
issue_comment: | ||
types: [created] | ||
name: Automatic Rebase | ||
|
@@ -10,11 +11,11 @@ jobs: | |
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Automatic Rebase | ||
uses: cirrus-actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions/checkout@v2 | ||
- name: Automatic Rebase | ||
uses: cirrus-actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# https://github.community/t5/GitHub-Actions/Workflow-is-failing-if-no-job-can-be-ran-due-to-condition/m-p/38186#M3250 | ||
always_job: | ||
name: Aways run job | ||
|
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,2 @@ | ||
minor_changes: | ||
- run ansible-lint on yaml files |
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,6 +1,7 @@ | ||
--- | ||
coverage: | ||
precision: 2 | ||
round: down | ||
range: "70...100" | ||
range: 70...100 | ||
fixes: | ||
- "/ansible_collections/community/grafana/::" | ||
- "/ansible_collections/community/grafana/::" |
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,3 +1,4 @@ | ||
--- | ||
namespace: community | ||
name: grafana | ||
version: 1.6.1 | ||
|
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,5 +1,5 @@ | ||
--- | ||
requires_ansible: '>=2.9.0' | ||
requires_ansible: ">=2.9.0" | ||
action_groups: | ||
grafana: | ||
- grafana_dashboard | ||
|
8 changes: 3 additions & 5 deletions
8
tests/integration/targets/grafana_dashboard/defaults/main.yml
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,7 +1,5 @@ | ||
--- | ||
|
||
grafana_url: "http://grafana:3000/" | ||
grafana_username: "admin" | ||
grafana_password: "admin" | ||
|
||
... | ||
grafana_url: http://grafana:3000/ | ||
grafana_username: admin | ||
grafana_password: admin |
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
44 changes: 22 additions & 22 deletions
44
tests/integration/targets/grafana_dashboard/tasks/dashboard-folder-destination.yml
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,33 +1,33 @@ | ||
--- | ||
- name: copy dashboard file | ||
copy: | ||
src: "files/dashboard.json" | ||
dest: "/tmp/dashboard.json" | ||
- name: Copy dashboard file | ||
ansible.builtin.copy: | ||
src: files/dashboard.json | ||
dest: /tmp/dashboard.json | ||
|
||
- block: | ||
- name: Check import grafana dashboard from file to unknown folder fails | ||
grafana_dashboard: | ||
grafana_url: "{{ grafana_url }}" | ||
grafana_user: "{{ grafana_username }}" | ||
grafana_password: "{{ grafana_password }}" | ||
state: present | ||
commit_message: Updated by ansible | ||
path: /tmp/dashboard.json | ||
overwrite: true | ||
folder: inexistent | ||
register: result | ||
ignore_errors: true | ||
- name: Check import grafana dashboard from file to unknown folder fails | ||
community.grafana.grafana_dashboard: | ||
grafana_url: "{{ grafana_url }}" | ||
grafana_user: "{{ grafana_username }}" | ||
grafana_password: "{{ grafana_password }}" | ||
state: present | ||
commit_message: Updated by ansible | ||
path: /tmp/dashboard.json | ||
overwrite: true | ||
folder: inexistent | ||
register: result | ||
ignore_errors: true | ||
|
||
- debug: | ||
- ansible.builtin.debug: | ||
var: result | ||
|
||
- set_fact: | ||
- ansible.builtin.set_fact: | ||
# XXX: Too many quotes of different types to do inline. | ||
# I did not manage to find a good way of having it inline. | ||
expected_error: "error : Dashboard folder 'inexistent' does not exist." | ||
|
||
- assert: | ||
- ansible.builtin.assert: | ||
that: | ||
- "result.changed == false" | ||
- "result.failed == true" | ||
- "result.msg == expected_error" | ||
- result.changed == false | ||
- result.failed == true | ||
- result.msg == expected_error |
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
Oops, something went wrong.