Use a pluggable branch
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
d9ede0ea0d
commit
d0d9e11b0b
|
@ -8,9 +8,13 @@ Use [`abra`](https://git.autonomic.zone/coop-cloud/abra) as a [Drone plugin](htt
|
||||||
|
|
||||||
### Required (no default)
|
### Required (no default)
|
||||||
|
|
||||||
- **deploy_key**: SSH private key part for running `git push` related commands
|
|
||||||
- **command**: The command to run (passed to `abra` executable)
|
- **command**: The command to run (passed to `abra` executable)
|
||||||
|
|
||||||
|
### Optional
|
||||||
|
|
||||||
|
- **deploy_key**: SSH private key part for running `git push` related commands
|
||||||
|
- **recipe_branch** (default: `main`): The target branch to use for recipe release `git push` operations
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|
|
@ -4,6 +4,7 @@ set -e
|
||||||
|
|
||||||
ABRA=/root/.local/bin/abra
|
ABRA=/root/.local/bin/abra
|
||||||
|
|
||||||
|
PLUGIN_BRANCH=${PLUGIN_BRANCH:-main}
|
||||||
PLUGIN_HOST=${PLUGIN_HOST:-git.autonomic.zone}
|
PLUGIN_HOST=${PLUGIN_HOST:-git.autonomic.zone}
|
||||||
PLUGIN_PORT=${PLUGIN_PORT:-2222}
|
PLUGIN_PORT=${PLUGIN_PORT:-2222}
|
||||||
|
|
||||||
|
@ -37,8 +38,7 @@ run_abra_cmd() {
|
||||||
git remote rm origin && \
|
git remote rm origin && \
|
||||||
git remote add origin "ssh://git@git.autonomic.zone:2222/coop-cloud/$recipe.git"
|
git remote add origin "ssh://git@git.autonomic.zone:2222/coop-cloud/$recipe.git"
|
||||||
|
|
||||||
git checkout main && git push --set-upstream origin main > /dev/null 2>&1 || \
|
git push --set-upstream origin "$PLUGIN_BRANCH"
|
||||||
git checkout master && git push --set-upstream origin master > /dev/null 2>&1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
|
|
Loading…
Reference in New Issue