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

Add option to fail on control repo unreachable #66

Closed
andrewfraley opened this issue Aug 2, 2017 · 1 comment
Closed

Add option to fail on control repo unreachable #66

andrewfraley opened this issue Aug 2, 2017 · 1 comment

Comments

@andrewfraley
Copy link

I didn't see a way to configure this, but if the control repo is unreachable for whatever reason, invalid auth, network, etc., g10k exits 0 with:

WARN: git repository https://myserver/org/r10k.git does not exist or is unreachable at this moment!

I'd like to fail in that case and exit 1.

@xorpaul
Copy link
Owner

xorpaul commented Aug 4, 2017

Fixed with https://github.com/xorpaul/g10k/releases/tag/v0.3.9 f26bfa6

From the README.md

abort g10k run if source repository is unreachable

---
:cachedir: '/tmp/g10k'

sources:
  example:
    remote: 'git://github.com/xorpaul/g10k-environment-unavailable.git'
    basedir: '/tmp/example/'
    exit_if_unreachable: true

If you then call g10k with that config file. You should get:

WARN: git repository git://github.com/xorpaul/g10k-environment-unavailable.git does not exist or is unreachable at this moment!
WARNING: Could not resolve git repository in source 'example' (git://github.com/xorpaul/g10k-environment-unavailable.git)

with an exit code 1

@xorpaul xorpaul closed this as completed Aug 4, 2017
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

2 participants