Using PrepareKeptnEnv and task version 1.12, prepareKeptnEnv fails:
2022-02-16T05:58:16.0488598Z ##[section]Starting: Prepare Keptn environment
2022-02-16T05:58:16.0496120Z ==============================================================================
2022-02-16T05:58:16.0496503Z Task : Prepare Keptn environment
2022-02-16T05:58:16.0496848Z Description : Initialize Keptn environment with project and stage
2022-02-16T05:58:16.0497126Z Version : 1.12.0
2022-02-16T05:58:16.0497387Z Author : Realdolmen (Bert Van der Heyden)
2022-02-16T05:58:16.0497725Z Help : Initialize Keptn environment with project and stage
2022-02-16T05:58:16.0498098Z
...
2022-02-16T05:58:16.2451611Z using keptnApiEndpoint https://stage-aks.XXXXX.com/api
2022-02-16T05:58:16.2452311Z using project testproject
2022-02-16T05:58:16.2453058Z using service testservice
2022-02-16T05:58:16.2453544Z using stage dev
2022-02-16T05:58:16.3730037Z metadata endpoint exists...
2022-02-16T05:58:16.3733289Z keptnVersion = 0.11.4
2022-02-16T05:58:16.4047780Z { Error: Request failed with status code 405
...
code: 405,
message: 'method GET is not allowed, but [PUT,DELETE]
...
It seems that it is trying to access /api/configuration-service/v1/project/$PROJECT which does not exist (checked in 0.12.0, it's NOT there).
From Keptn Slack:
Using
PrepareKeptnEnv
and task version 1.12,prepareKeptnEnv
fails:It seems that it is trying to access
/api/configuration-service/v1/project/$PROJECT
which does not exist (checked in 0.12.0, it's NOT there).Here is the relevant code: https://github.com/keptn-sandbox/keptn-azure-devops-extension/blob/2464d7fa4ecbc279ec8aaee9a6946ccbdcf3bc28/PrepareKeptnEnvTask/index.ts#L294-L296
Instead we should use
/api/controlPlane/v1/project/$PROJECT