There is an android project in V1 directory. I want to run lint check and store artifacts using circle.yml file. I have my circle.yml file in root directory (e.i repository/Android) of GitHub repo. I have 3 branches for V1 Android project e.i Master, QA and Develop.
Below is my yml file for develop branch.
version: 2
jobs:
build_develop:
working_directory: ~/code
docker:
- image: circleci/android:api-25-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout:
path: ~/V1
- restore_cache:
key: jars-{{ checksum "V1/build.gradle" }}-{{ checksum "V1/app/build.gradle" }}
- run:
name: Download Dependencies
command: ./V1/gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "V1/build.gradle" }}-{{ checksum "V1/app/build.gradle" }}
- run:
name: Run lint
command: |
./gradlew lintDebug
- store_artifacts:
path: app/build/reports
destination: reports/
- run:
name: Run build
command: |
./gradlew assembleDebug
- store_artifacts:
path: app/build/outputs/apk
destination: apks/
workflows:
version: 2
build_app:
jobs:
- build_develop:
filters:
branches:
only:
- develop
It gives error like below in CircleCI build dashboard,
I think, i made some mistake in setting working_directory: path and checkout: path:. I don't know that how to set correct path for this scenario.
Thanks in advance.
Here, The project structure already has V1 folder. While checking out you are creating V1 folder again in code folder to check out. We can resolve this by removing Checkout path like below.
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "V1/build.gradle" }}-{{ checksum "V1/app/build.gradle" }}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With