Skip to content

Instantly share code, notes, and snippets.

@fmunozn
Last active November 27, 2018 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fmunozn/3dbf14da8e57de9b446b93639ddc770f to your computer and use it in GitHub Desktop.
Save fmunozn/3dbf14da8e57de9b446b93639ddc770f to your computer and use it in GitHub Desktop.
Kong publisher for CI
def kongManager = new com.fts.api.kong.KongManager(this, templateParams.kongProtocol, templateParams.kongHost, templateParams.kongAdminHost, templateParams.kongPort)
stage('PUBLISH KONG')
container(name:'apiary-kong', shell: '/bin/bash') {
try{
kongManager.register(true, 'ci', 'test-endpoint', '', '/test', 'http://my-test-url.com/test)
}catch(error){
print("This error is because kong is not accessible or the endpoint was not registered")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment