nre-learning / antidote-selfmedicate

Configs and scripts for spinning up a local instance of Antidote on your laptop for testing and lesson development
Apache License 2.0
12 stars 19 forks source link

Error when clone non-default branch of git repo #5

Closed jnpr-raylam closed 6 years ago

jnpr-raylam commented 6 years ago

https://github.com/nre-learning/antidote-selfmedicate/blob/af911038605a3a7309173872cc6b5908d3c6cb56/syringe.yml#L23-L25

If provide the branch name, git-clone.sh will throw error:

Cloning into '/antidote'...
fatal: ambiguous argument 'lesson-24': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:

Seems git reset supports existing refs only Suggest modify to git checkout --force $REF so that we can provide either commit id or branch name in the initContainers args.

After the modification, the syringe pod starts successfully and clones the non-default branch of my git repo.

Similar modification should apply to file syringe/scheduler/scheduler.go also

Mierdin commented 6 years ago

Fixed in https://github.com/nre-learning/antidote-selfmedicate/commit/65bdb1e04e2454acb207d4996e1861dc18548213 and https://github.com/nre-learning/syringe/commit/fbcb8a52143e67bc91dcbe35a144440ad8ec1353