🤖 Move to woodpecker
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/deployment/woodpecker Pipeline was successful

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

33
.woodpecker.yml Normal file
View File

@ -0,0 +1,33 @@
pipeline:
build-only:
image: woodpeckerci/plugin-docker-buildx
settings:
repo: harbor.sebclem.fr/sebclem/${CI_REPO_NAME}
cache_from: harbor.sebclem.fr/sebclem/${CI_REPO_NAME}
registry: harbor.sebclem.fr
dry_run: true
logins:
- registry: https://harbor.sebclem.fr
username:
from_secret: harbor_user
password:
from_secret: harbor_token
when:
event: [push, pull_request, manual]
publish:
image: woodpeckerci/plugin-docker-buildx
settings:
platforms: linux/amd64
tag: latest
repo: harbor.sebclem.fr/sebclem/${CI_REPO_NAME}
cache_from: harbor.sebclem.fr/sebclem/${CI_REPO_NAME}
logins:
- registry: https://harbor.sebclem.fr
username:
from_secret: harbor_user
password:
from_secret: harbor_token
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 ""

View File