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

CC pipeline property app-name is not set #26

Open
in-1911 opened this issue Oct 3, 2024 · 2 comments
Open

CC pipeline property app-name is not set #26

in-1911 opened this issue Oct 3, 2024 · 2 comments
Assignees

Comments

@in-1911
Copy link
Collaborator

in-1911 commented Oct 3, 2024

CC pipeline expects app-name property to be set when a dynamic scan step is executed, however that property is not set in any of the pipeline or trigger settings.
As a result, the cc-dynamic-scan step fails with an error below.
CI pipeline sets it dynamically during the deploy step.

Using PIPELINE_WORKSPACE as /workspace/app
590 | ERROR | 2024-10-03T19:48:24.837Z | index.ts:37:12 | An unhandled exception occured while processing the command
590 | ERROR | 2024-10-03T19:48:24.866Z | index.ts:38:12 | CLI version: 1.111.1
590 | ERROR | 2024-10-03T19:48:24.878Z | index.ts:39:12 | CLI argv: ["/opt/cocoa/bin/cocoa.linux","/snapshot/cli/build/index.js","inventory","get","--entry=","--org=rag-da-lab","--repo=rag-lab-00-inventory-repo","--environment=prod","--git-provider=gitlab","--git-token-path=./inventory-token","--git-api-url=https://us-south.git.cloud.ibm.com/api/v4","--property=app_artifacts"]
590 | ERROR | 2024-10-03T19:48:24.880Z | index.ts:81:12 | Full stack trace is shown below:
590 | ERROR | 2024-10-03T19:48:24.896Z | index.ts:82:12 | SyntaxError: Unexpected token e in JSON at position 2
590 | ERROR | 2024-10-03T19:48:24.896Z | index.ts:82:12 |     at JSON.parse (<anonymous>)
590 | ERROR | 2024-10-03T19:48:24.897Z | index.ts:82:12 |     at Inventory.getEntry (/snapshot/cli/src/inventory.ts:122:19)
590 | ERROR | 2024-10-03T19:48:24.897Z | index.ts:82:12 |     at Object.handler (/snapshot/cli/src/commands/inventory/get.command.ts:135:24)
@brendankellyibm
Copy link
Collaborator

@in-1911 it's currently set to pull the prod_app_url from inventory once CD pipeline is run. I'll make the script more robust to handle this case (CD not run yet, presumably) and also allow the dynamic scan to run against the dev_app_url if desired.

@in-1911
Copy link
Collaborator Author

in-1911 commented Oct 4, 2024

@brendankellyibm - the problem is with app-name, not app-url. The CD has been completed by the time I started the CC run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants