Test woodpecker
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
SebClem 2022-12-18 16:18:24 +01:00
parent 738a505339
commit 94d44d4282
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50
2 changed files with 36 additions and 5 deletions

29
.woodpecker.yml Normal file
View File

@ -0,0 +1,29 @@
pipeline:
# build-only:
# image: woodpeckerci/plugin-docker-buildx
# settings:
# username:
# from_secret: harbor_username
# password:
# from_secret: harbor_password
# repo: harbor.sebclem.fr/sebclem/${CI_REPO_NAME}
# cache_from: harbor.sebclem.fr/sebclem/${CI_REPO_NAME}
# registry: harbor.sebclem.fr
# dry_run: true
# when:
# event: [push, pull_request, manual]
build-and-push:
image: woodpeckerci/plugin-docker-buildx:2.0
settings:
username:
from_secret: harbor_username
password:
from_secret: harbor_password
repo: harbor.sebclem.fr/sebclem/${CI_REPO_NAME}
cache_from: harbor.sebclem.fr/sebclem/${CI_REPO_NAME}
registry: harbor.sebclem.fr
tags: latest
# when:
# environment: production
# event: deployment

View File

@ -9,12 +9,12 @@ run_command(){
}
if [[ -z "$PLUGIN_PLAYBOOK" ]]; then
if [ -z "$PLUGIN_PLAYBOOK" ]; then
echo -e "⚠️ \e[31m'playbook' setting not defined, ABORT!\e[39m"
exit 1
fi
if [[ -z "$PLUGIN_PRIVATE_KEY" ]]; then
if [ -z "$PLUGIN_PRIVATE_KEY" ]; then
echo -e "⚠️ \e[31m[WARN] 'private_key' setting not defined !\e[39m"
else
@ -25,7 +25,7 @@ fi
args=("$PLUGIN_PLAYBOOK")
if [[ -n "$PLUGIN_VAULT_TOKEN" ]]; then
if [ -n "$PLUGIN_VAULT_TOKEN" ]; then
echo "💼 Adding vault token to 'credentials/vault_token'"
run_command "mkdir credentials"
echo "$PLUGIN_VAULT_TOKEN" > credentials/vault_token
@ -33,12 +33,14 @@ if [[ -n "$PLUGIN_VAULT_TOKEN" ]]; then
echo ""
fi
if [[ -f "ansible-ci.cfg" ]]; then
if [ -f "ansible-ci.cfg" ]; then
echo "⚙️ ansible-ci.cfg is present, using it."
rm ansible.cfg
mv ansible-ci.cfg ansible.cfg
echo ""
fi
if [[ -n "$PLUGIN_GALAXY_FILE" ]]; then
if [ -n "$PLUGIN_GALAXY_FILE" ]; then
echo "🚀 Installing Galaxy dependencies ($PLUGIN_GALAXY_FILE)"
run_command "ansible-galaxy install -r $PLUGIN_GALAXY_FILE --force"
echo ""