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

Refactor check if a service exists to a basic GET request check without the stage #51

Open
1 task
christian-kreuzberger-dtx opened this issue Nov 2, 2021 · 0 comments
Labels
type:feature New feature or request that provides value to the stakeholders/end-users

Comments

@christian-kreuzberger-dtx
Copy link
Contributor

Right now we need to know project, service and stage in order to check whether a service exists:

def keptnProjectServiceExists(Map args) {
def keptnInit = keptnLoadFromInit(args)
def getProjectServiceResponse = httpRequest customHeaders: [[maskValue: true, name: 'x-token', value: "${keptnInit['keptn_api_token']}"]],
httpMode: 'GET',
responseHandle: 'STRING',
url: "${keptnInit['keptn_endpoint']}/controlPlane/v1/project/${keptnInit['project']}/stage/${keptnInit['stage']}/service/${keptnInit['service']}",
validResponseCodes: "100:404",
ignoreSslErrors: true
echo "Response from get project service: " + getProjectServiceResponse.content
return (getProjectServiceResponse.status == 200)
}

This is a known limitation in the Keptn API.

Definition of Done

  • Use a basic GET Endpoint without the stagename to check whether a service exists

Depends on keptn/TBD

@christian-kreuzberger-dtx christian-kreuzberger-dtx added the type:feature New feature or request that provides value to the stakeholders/end-users label Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request that provides value to the stakeholders/end-users
Projects
None yet
Development

No branches or pull requests

1 participant