Skip to content

Commit

Permalink
Bugfix Jenkins not autodetecting under a URL path
Browse files Browse the repository at this point in the history
  • Loading branch information
samrocketman committed Aug 3, 2018
1 parent 6c74b99 commit 290be92
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/jenkins-call-url
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ try:
except ImportError:
socks_supported = False

version = "0.4"
version = "0.5"

parser = argparse.ArgumentParser(description="Reads Jenkins API and can make calls to arbitrary Jenkins URL endpoints. Useful for calling Jenkins URLs for killing jobs or executing script console scripts.", epilog="""
environment variables:
Expand Down Expand Up @@ -278,6 +278,8 @@ if args.auto_jenkins_web:
if jenkins_web.split('/')[-1] in ['job', 'view']:
continue
jenkins_root_api_response = getJSONUrl(jenkins_web + '/api/json', headers)
if "useSecurity" in jenkins_root_api_response:
break

if len(args.load_headers_file) == 0 or args.force_crumb or not os.path.exists(args.load_headers_file):
if not args.auto_jenkins_web:
Expand Down Expand Up @@ -349,6 +351,9 @@ if reason:
sys.exit(STATUS)

# CHANGELOG
# 0.5
# - Bugfix --automatic-jenkins-server not working when Jenkins is under a URL
# path. e.g. https://example.com/jenkins/
# 0.4
# - Bugfix incorrect host header being set when --automatic-jenkins-server.
# - Bugfix --curl and --curl-init options rendering wrong HEAD method.
Expand Down

0 comments on commit 290be92

Please sign in to comment.