drone ci updates #4

Merged
chris merged 26 commits from development into main 2023-11-17 12:00:45 -05:00
2 changed files with 76 additions and 18 deletions

View File

@ -5,26 +5,87 @@ type: docker
steps: steps:
- name: Install requirements, lint, and run Ansible playbook - name: "Verify environment"
image: gitea.thezengarden.net/podman/images/ansible-dev:latest image: gitea.thezengarden.net/podman/images/ansible-dev:latest
environment:
GITEA_TOKEN:
from_secret: gitea_token
ANSIBLE_INVENTORY:
from_secret: ansible_inventory
commands: commands:
- ansible-galaxy install -r $DRONE_WORKSPACE/requirements.yml - git log -1
- ansible-lint --offline $DRONE_WORKSPACE - ansible --version
- ansible-playbook -v -i $ANSIBLE_INVENTORY $DRONE_WORKSPACE/hello.yml - ansible-lint --version
- echo "Build complete and successful for $DRONE_REPO_NAME"
when: when:
branch: branch:
- development - development
event: event: [push]
include:
- push
exclude:
- pull_request ###############################################################################
###############################################################################
###############################################################################
# - name: "Ansible-Galaxy: Install from requirements.yml"
# image: gitea.thezengarden.net/podman/images/ansible-dev:latest
# commands:
# - ansible-galaxy install -r $DRONE_WORKSPACE/requirements.yml
# when:
# branch:
# - development
# event:
# exclude:
# - pull_request
# - name: "Syntax check and Ansible Lint"
# image: gitea.thezengarden.net/podman/images/ansible-dev:latest
# commands:
# - ansible-lint --offline $DRONE_WORKSPACE
# - ansible-playbook --syntax-check $DRONE_WORKSPACE/hello.yml
# when:
# branch:
# - development
# event:
# exclude:
# - pull_request
# - name: "Test playbook execution"
# image: gitea.thezengarden.net/podman/images/ansible-dev:latest
# environment:
# ANSIBLE_INVENTORY:
# from_secret: ansible_inventory
# commands:
# - ansible-playbook -v -i 127.0.0.1, --connection=local $DRONE_WORKSPACE/hello.yml
# when:
# branch:
# - development
# event:
# exclude:
# - pull_request
###############################################################################
###############################################################################
###############################################################################
# - name: Update repo with build stats
# image: appleboy/drone-git-push
# settings:
# branch: testing
# remote: gitea@10.10.10.109:chris/drone-test-1.git
# force: false
# commit: true
# empty_commit: true
# commit_message: "Drone build ${DRONE_COMMIT_SHA:0:7} => ${DRONE_BUILD_STATUS}"
# author_name: "Drone CI"
# author_email: "chris@thezengarden.net"
# skip_verify: true
# ssh_key:
# from_secret: gitea_ssh_privkey
# when:
# branch:
# - development
# --- # ---
# name: Test Ansible Linting of drone-test-1 # name: Test Ansible Linting of drone-test-1

View File

@ -1,5 +1,2 @@
collections: collections:
- community.general - community.general
- ansible.netcommon
- community.docker
- containers.podman