Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage questions - remote & branch default values #51

Open
laur89 opened this issue Jan 19, 2022 · 0 comments
Open

Usage questions - remote & branch default values #51

laur89 opened this issue Jan 19, 2022 · 0 comments

Comments

@laur89
Copy link

laur89 commented Jan 19, 2022

Not an issue, but some clarifying questions to a new user:

  1. Why does remote_name default to deploy as opposed to origin?
  2. why does branch default to master as opposed to whatever branch is currently checked out (ie ${DRONE_BRANCH})?
  3. ssh_key is mandatory right, ie. there's no way to tap into the authentication granted to drone instance itself?
  4. why doesn't remote default to ${DRONE_GIT_SSH_URL}?

This is so the pipeline step definition could be less verbose, assuming the most common use-case would be (commiting and) pushing back to same reporitory & branch.

Following drone step definition works, but feels like it could/should be more terse:

- name: git-push
  image: appleboy/drone-git-push
  settings:
    ssh_key:
      from_secret: github_ssh_key
    branch: "${DRONE_BRANCH}"
    remote: "${DRONE_GIT_SSH_URL}"
    followtags: true
  when:
    branch:
    - master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant