diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..1cbc72c --- /dev/null +++ b/.woodpecker.yml @@ -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 diff --git a/entrypoint b/entrypoint index ed03c45..58fd7a6 100755 --- a/entrypoint +++ b/entrypoint @@ -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 "" diff --git a/.drone.yml b/old.yml similarity index 100% rename from .drone.yml rename to old.yml