Open your pipeline and go to edit mode. Add a new stage below the Build.
Add a new Action Group & Action “Approve”, make sure to select the proper SNS topic. The result should look as follows:
Create an additonal Action called Deploy and select AWS CodeBuild as Action provider:
As previously done, create a new CodeBuild project. Suggested naming is <artifactId>-deploy.
Note: Make sure so select Ubuntu as OS once again!
As Buidlspec, enter deployspec.yml:
Finish the CodeBuild Wizard and return to CodePipeline. Finish the CodePipeline Wizard.
The result should look as follows:
Hit save!
To trigger a new pipeline execution, just modify any file inside the repository and push changes e.g. put a comment in deployspec.yml.
$ git add *
$ git commit -m 'changed deployspec'
$ git push
Now check your pipeline and approve
In case of errors, check the CodeBuild logs -> Build Details.
If you are facing the following “AccessDeniedException”, make sure to modify the respective role.
Go to AWS IAM, locate the mentioned role and add a “AmazonSSMReadOnlyAccess” or similar policy:
Restart the pipeline manually, by pressing “Release change”:
Check for a successful build
Verify, that the deployment has actually taken place, by looking into the Build logs.
From the Build logs, note down the routes URL - you should now be able to launch it via your web browser. The output should look as follows:
Make sure to also check your SAP Cloud Platform Cockpit - Applications Area!