The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Caches between steps

Fernando Soliva
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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 Champions.
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

TAGS
AUG Leaders

Atlassian Community Events