aws-samples / aws-samples/aws-devops-pipeline-accelerator

Gitlab CDK DPA: cdk-build.sh: command not found

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HCL
Stars
47
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Hi!

I have been setting up DPA for a new project using `gitlab` and `cdk`. Trying to run the pipeline after defining the environment variables and building/pushing the docker images, the "CDK Build (synth)" step fails with this output:

```shell
Running with gitlab-runner REDACTED (REDACTED)
------SNIP------
Getting source from Git repository
Fetching changes with git depth set to 20...
Initialized empty Git repository in /builds/REDACTED/.git/
Created fresh repository.
Checking out REDACTED as detached HEAD (ref is REDACTED_ci_cd_pipeline)...
Skipping Git submodules setup
Executing "step_script" stage of the job script
$ cdk-build.sh
/scripts-5281-15826941/step_script: line 188: cdk-build.sh: command not found
```

This step seems to be defined here:

https://github.com/aws-samples/aws-devops-pipeline-accelerator/blob/ba6ee0fc667c1ea0f86ae46c591b6fa2ff462e5d/gitlab-ci/stages/build/cdk/cdk-build.yml#L7

And the cdk docker image has these scripts (as per https://github.com/aws-samples/aws-devops-pipeline-accelerator/tree/main/shared-docker/docker-images/cdk/scripts and https://github.com/aws-samples/aws-devops-pipeline-accelerator/blob/main/shared-docker/docker-images/cdk/Dockerfile#L18)

```
aws-auth.sh
cdk-apply.sh
cdk-destroy.sh
cdk-init.sh
cdk-plan.sh
cdk-set-variables.sh
ckd-validate-envs.sh
validate-env-vars.sh
```

What exactly is this `cdk-build.sh` supposed to contain? And why is it not included in the scripts directory for the cdk image? It is expected to exist in the `PATH` as the step is `cdk-build.sh` and not `./cdk-build.sh`.

Br, Axel

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.