revert .drone.yml to run ansible tests only
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f58229937d
commit
18ed3a2197
139
.drone.yml
139
.drone.yml
@ -1,7 +1,16 @@
|
|||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: exec
|
type: docker
|
||||||
name: setup_env
|
name: run_ansible_tests
|
||||||
|
|
||||||
|
global-variables:
|
||||||
|
ansible_image : &ansible_image "gitea.thezengarden.net/podman/images/ansible-dev:latest"
|
||||||
|
ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local"
|
||||||
|
ansible_playbook : &ansible_playbook "hello.yml"
|
||||||
|
|
||||||
|
environment:
|
||||||
|
ANSIBLE_INVENTORY : *ansible_inventory
|
||||||
|
ANSIBLE_PLAYBOOK : *ansible_playbook
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
@ -10,19 +19,119 @@ trigger:
|
|||||||
event: [push]
|
event: [push]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: write_vars
|
- name: "ansible_environment_verify"
|
||||||
environment:
|
image: *ansible_image
|
||||||
DIMG:
|
|
||||||
from_secret: docker_image
|
|
||||||
commands:
|
commands:
|
||||||
- pwd
|
- git log -1
|
||||||
- ls -ltra
|
- ansible --version
|
||||||
- echo "dimg=$DIMG" > .drone_env_test
|
- ansible-lint --version
|
||||||
|
|
||||||
- name: read_vars
|
- name: "ansible_galaxy_requirements"
|
||||||
|
image: *ansible_image
|
||||||
commands:
|
commands:
|
||||||
- pwd
|
- ansible-galaxy install -r requirements.yml
|
||||||
- ls -ltra
|
|
||||||
- cat .drone_env_test
|
- name: "ansible_lint"
|
||||||
- source .drone_env_test
|
image: *ansible_image
|
||||||
- echo $dimg
|
commands:
|
||||||
|
- ansible-lint --offline
|
||||||
|
|
||||||
|
- name: "ansible_playbook_execution"
|
||||||
|
image: *ansible_image
|
||||||
|
commands:
|
||||||
|
- ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK
|
||||||
|
|
||||||
|
# ---
|
||||||
|
# kind: pipeline
|
||||||
|
# type: exec
|
||||||
|
# name: check_docker
|
||||||
|
|
||||||
|
# trigger:
|
||||||
|
# branch:
|
||||||
|
# exclude:
|
||||||
|
# - main
|
||||||
|
# event: [push]
|
||||||
|
# status: [success]
|
||||||
|
|
||||||
|
# depends_on:
|
||||||
|
# - run_ansible_tests
|
||||||
|
|
||||||
|
# steps:
|
||||||
|
# - name: check_env
|
||||||
|
# commands:
|
||||||
|
# - whoami
|
||||||
|
# - hostnamectl
|
||||||
|
# - env
|
||||||
|
# - pwd
|
||||||
|
# - tree
|
||||||
|
# - cat requirements.yml
|
||||||
|
|
||||||
|
# - name: docker_info
|
||||||
|
# commands:
|
||||||
|
# - docker info
|
||||||
|
|
||||||
|
# - name: docker_build
|
||||||
|
# environment:
|
||||||
|
# REGISTRY : gitea.thezengarden.net
|
||||||
|
# BUILD_PREFIX : "podman/images"
|
||||||
|
# BUILD_NAME : ansible-dev
|
||||||
|
# commands:
|
||||||
|
# - echo "docker build --no-cache -t $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_BUILD_NUMBER ."
|
||||||
|
# - docker build --no-cache -t $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_BUILD_NUMBER .
|
||||||
|
|
||||||
|
# - name: docker_login
|
||||||
|
# environment:
|
||||||
|
# REGISTRY : gitea.thezengarden.net
|
||||||
|
# GITEA_USER :
|
||||||
|
# from_secret: gitea_user
|
||||||
|
# GITEA_PASSWORD :
|
||||||
|
# from_secret: gitea_password
|
||||||
|
# commands:
|
||||||
|
# - echo "$GITEA_PASSWORD" | docker login --username chris --password-stdin $REGISTRY
|
||||||
|
|
||||||
|
# - name: docker_push
|
||||||
|
# environment:
|
||||||
|
# REGISTRY : gitea.thezengarden.net
|
||||||
|
# BUILD_PREFIX : "podman/images"
|
||||||
|
# BUILD_NAME : ansible-dev
|
||||||
|
# commands:
|
||||||
|
# - docker push $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_BUILD_NUMBER
|
||||||
|
# - docker images | grep "$REGISTRY/$BUILD_PREFIX/$BUILD_NAME"
|
||||||
|
|
||||||
|
# - name: docker_images
|
||||||
|
# environment:
|
||||||
|
# REGISTRY : gitea.thezengarden.net
|
||||||
|
# BUILD_PREFIX : "podman/images"
|
||||||
|
# BUILD_NAME : ansible-dev
|
||||||
|
# commands:
|
||||||
|
# - docker images | grep "$REGISTRY/$BUILD_PREFIX/$BUILD_NAME"
|
||||||
|
|
||||||
|
|
||||||
|
# ---
|
||||||
|
# kind: pipeline
|
||||||
|
# type: exec
|
||||||
|
# name: setup_env
|
||||||
|
|
||||||
|
# trigger:
|
||||||
|
# branch:
|
||||||
|
# exclude:
|
||||||
|
# - main
|
||||||
|
# event: [push]
|
||||||
|
|
||||||
|
# steps:
|
||||||
|
# - name: write_vars
|
||||||
|
# environment:
|
||||||
|
# DIMG:
|
||||||
|
# from_secret: docker_image
|
||||||
|
# commands:
|
||||||
|
# - pwd
|
||||||
|
# - ls -ltra
|
||||||
|
# - echo "dimg=$DIMG" > .drone_env_test
|
||||||
|
|
||||||
|
# - name: read_vars
|
||||||
|
# commands:
|
||||||
|
# - pwd
|
||||||
|
# - ls -ltra
|
||||||
|
# - cat .drone_env_test
|
||||||
|
# - source .drone_env_test
|
||||||
|
# - echo $dimg
|
||||||
|
Loading…
x
Reference in New Issue
Block a user