Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Caches between steps

Fernando Soliva March 2, 2019

Hi all,

 

I am trying to use new pipes sharing cache between my previous step and the pipes but the cache is ignored.

 

My configuration is:

pipelines:
default:
- step:
name: Tests and Coverage
script:
- go test -json $(go list ./... | grep -v mock) -cover -coverpkg $(go list ./... | grep -v mock | tr '\n' ',') -coverprofile reports/cover.out

- step:
caches:
- coverage
name: Send SonarCloud Metrics
script:
- pipe: sonarsource/sonarcloud-scan:0.1.5
variables:
SONAR_TOKEN: ${SONAR_TOKEN}
EXTRA_ARGS: -Dsonar.projectKey=file-processor -Dsonar.organization=fernando-soliva -Dsonar.go.coverage.reportPaths=reports/cover.out

 

No metrics are sent to sonar and cover.out is ignored but with sonnar-scanner I got all work ok.

sonar-scanner -Dsonar.projectKey=file-processor -Dsonar.organization=fernando-soliva -Dsonar.login=${SONAR_TOKEN} -Dsonar.go.coverage.reportPaths=reports/cover.out

I didn't find any documentation to help more. There is something wrong and I am not seeing?

 

Tks 

1 answer

1 vote
Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2019

Hi @Fernando Soliva ,

You'll have to define a custom cache. This saves caches from a custom directory. Also, have caches as your first step.

definitions:
  caches:
    coverage: <custom directory>

Caching dependencies

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events