+
Skip to content
This repository was archived by the owner on Feb 28, 2023. It is now read-only.
This repository was archived by the owner on Feb 28, 2023. It is now read-only.

permission denied #39

Open
Open
@oromojunior

Description

@oromojunior

The problem

When running in GitLab CI there

  • anchore_ci_tools.py -a -r --timeout 500 --image $CI_REGISTRY/hello-world:v1.99.99
    ERROR executing script - Exception: [Errno 13] Permission denied: 'anchore-reports/hello-world_v1.99.99-content-os.json'

Environment

GitLab Ci on gitlab.com

Details

Actual Behaviour

$ anchore_ci_tools.py -a -r --timeout 500 --image $CI_REGISTRY/hello-world:v1.99.99

Image submitted to Anchore Engine: hello-world:v1.99.99
Waiting for analysis to complete...
Status: not_analyzed
Status: analyzing..
Status: analyzed
Analysis completed!
ERROR executing script - Exception: [Errno 13] Permission denied: 'anchore-reports/hello-world_v1.99.99-content-os.json'
Authenticating with credentials from /root/.docker/config.json
00:02
Uploading artifacts...
anchore-reports/*: found 5 matching files
Uploading artifacts to coordinator... ok id=12274 responseStatus=201 Created token=o2iy3TDJ
ERROR: Job failed: exit code 1

Expected Behaviour

How do you reproduce the error?

container_scan_service:
stage: Scan
variables:
ANCHORE_CLI_URL: "http://anchore-engine:8228/v1"
GIT_STRATEGY: none
image: docker.io/anchore/inline-scan:latest
services:

  • name: docker.io/anchore/inline-scan:latest
    alias: anchore-engine
    command: ["start"]

script:

  • source /opt/rh/rh-python36/enable && rm -rf anchore-reports
  • anchore-cli system wait
  • anchore-cli image add $CI_REGISTRY/hello-world:v1.99.99
  • anchore-cli registry list
  • anchore-cli --u admin --p foobar image list
  • anchore-cli registry add "$CI_REGISTRY" gitlab-ci-token "$CI_JOB_TOKEN" --skip-validate
  • anchore_ci_tools.py -a -r --timeout 500 --image $CI_REGISTRY/hello-world:v1.99.99

artifacts:
when: always
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}
paths:
- anchore-reports/*

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载