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

Failed with Cache settings #43

Open
hantsy opened this issue Jul 26, 2023 · 5 comments
Open

Failed with Cache settings #43

hantsy opened this issue Jul 26, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@hantsy
Copy link

hantsy commented Jul 26, 2023

My circle CI config is like the following:

version: 2.1

orbs:
  maven: circleci/[email protected]
  codecov: codecov/[email protected]
executors:
  ubuntu:
    machine:
      image: ubuntu-2204:current
      docker_layer_caching: true    # default - false
  docker-mongo:
    docker:
      - image: cimg/openjdk:17.0
      - image: mongo:latest
jobs:
  build:
    executor: ubuntu
    steps:
      - run:
          name: "Install JDK 17"
          command: |
            sudo apt-get update && sudo apt-get install openjdk-17-jdk
            java -version
      - checkout      
      - run:
          name: Start all services declared in docker-compose.yml
          command: docker-compose -f ./docker-compose.yml up -d
      - maven/with_cache:
          steps:
            - run: mvn -q test verify -Pcoverage
      - maven/process_test_results
      - codecov/upload:
          when: on_success
workflows:
  build:
    jobs:
      - build
      # filters:
      #   branches:
      #     only:
      #       - master

it is failed on CirCle CI due to a cache issue.

#!/bin/bash -eo pipefail
#!/bin/bash
find . -name 'pom.xml' | sort | xargs cat > /tmp/maven_cache_seed

find: ‘./data/journal’: Permission denied

Exited with code exit status 1

CircleCI received exit code 1

Can I specify the cache key directly?

@hantsy hantsy added the bug Something isn't working label Jul 26, 2023
@ryanbourdais
Copy link
Contributor

Hi @hantsy currently that is not a feature of the orb, but is on other orbs. I can add that for the next release, or if you'd like you can submit a PR for me to review.

@ryanbourdais ryanbourdais self-assigned this Jul 26, 2023
@hantsy
Copy link
Author

hantsy commented Aug 6, 2023

Can I skip the cache when building the project? or add without_cache command?

@ryanbourdais
Copy link
Contributor

So you would want to add a command that just runs the verify.sh script? Theres no requirement to use the with_cache command, but without the cache its pretty much just a one liner.

@hantsy
Copy link
Author

hantsy commented Dec 11, 2023

And like Github actions maven cache, it just saves the maven deps (~.m2), not sure here the cache scans the whole build workspace.

@hantsy
Copy link
Author

hantsy commented Dec 11, 2023

And I tried to chown or chmod the .data folder, also report no permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants