Skip to content

Commit

Permalink
update and add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaffen committed Sep 5, 2023
1 parent 7915fd6 commit 8a7dc42
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 9 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
on: # yamllint disable-line rule:truthy
push:
branches:
- main
pull_request:

name: ⚒️ CI

jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: yamllint
uses: ibiqlik/action-yamllint@v3
with:
file_or_dir: .
config_file: .yamllint

ansible-lint:
runs-on: ubuntu-latest
container: pipelinecomponents/ansible-lint:latest
steps:
- uses: actions/checkout@v4
- run: |
git --version
ansible-lint --version
ansible-lint -v
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode/
34 changes: 34 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
stages:
- lint

yamllint:
stage: lint
image:
name: cytopia/yamllint:latest
entrypoint: ["/bin/ash", "-c"]
script:
- yamllint --version
- yamllint .

ansible-lint:
stage: lint
image: pipelinecomponents/ansible-lint:latest
script:
- git --version
- ansible-lint --version
- ansible-lint -v

ansible-syntax:
stage: lint
image:
name: cytopia/ansible:latest
entrypoint: ["/bin/sh", "-c"]
variables:
ANSIBLE_ROLES_PATH: roles
script:
- apk add git
- git --version
- ansible-galaxy --version
- ansible-playbook --version
- ansible-playbook --syntax-check --list-tasks playbooks/*.yml
16 changes: 16 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
extends: default

rules:
line-length:
max: 160
empty-lines:
max: 1
max-start: 0
max-end: 1
hyphens:
max-spaces-after: 1
indentation:
spaces: 2
indent-sequences: whatever
check-multi-line-strings: false
1 change: 0 additions & 1 deletion requirements.yml → collections/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
---
collections: []
roles: []
17 changes: 9 additions & 8 deletions roles/common/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
galaxy_info:
author: betadots GmbH
description: Common role
Expand Down Expand Up @@ -26,14 +27,14 @@ galaxy_info:
# - 7
# - 99.99

# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.

# List your role dependencies here, one per line. Be sure to remove the '[]',
# if you add dependencies to this list.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
2 changes: 2 additions & 0 deletions roles/requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
roles: []

0 comments on commit 8a7dc42

Please sign in to comment.