Some checks reported errors
continuous-integration/drone/push Build encountered an error
138 lines
3.2 KiB
YAML
138 lines
3.2 KiB
YAML
# ---
|
|
# kind: pipeline
|
|
# type: docker
|
|
# 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_DOCKER_IMAGE : "gitea.thezengarden.net/podman/images/ansible-dev:latest"
|
|
# ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local"
|
|
# ANSIBLE_PLAYBOOK : "hello.yml"
|
|
|
|
# trigger:
|
|
# branch:
|
|
# exclude:
|
|
# - main
|
|
# event: [push]
|
|
|
|
# steps:
|
|
# - name: "ansible_environment_verify"
|
|
# image: "$ANSIBLE_DOCKER_IMAGE"
|
|
# commands:
|
|
# - git log -1
|
|
# - ansible --version
|
|
# - ansible-lint --version
|
|
|
|
# # - name: "ansible_galaxy_requirements"
|
|
# # image: *ansible_image
|
|
# # commands:
|
|
# # - ansible-galaxy install -r requirements.yml
|
|
|
|
# - name: "ansible_lint"
|
|
# image: "$ANSIBLE_DOCKER_IMAGE"
|
|
# commands:
|
|
# - ansible-lint --offline
|
|
|
|
# - name: "ansible_playbook_execution"
|
|
# image: "$ANSIBLE_DOCKER_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
|
|
- source .drone_env_test
|
|
- echo $dimg
|