Skip to content
Snippets Groups Projects
Commit 40cdf41d authored by Norman Stetter's avatar Norman Stetter
Browse files

CI: Speed up repo syncing

* Include .repo directory in cache to greatly speed up sync
* Add additional parameters to repo sync to ensure we use the revisions set in
manifest when using cache
parent 6bb5f660
No related branches found
No related tags found
1 merge request!26CI: Speed up repo syncing
...@@ -34,7 +34,7 @@ variables: ...@@ -34,7 +34,7 @@ variables:
# setup build dir # setup build dir
- cd ${CI_PROJECT_DIR} - cd ${CI_PROJECT_DIR}
- ~/repo init -u ${MANIFEST_URL} -b ${CI_DEFAULT_BRANCH} - ~/repo init -u ${MANIFEST_URL} -b ${CI_DEFAULT_BRANCH}
- ~/repo sync --force-sync - ~/repo sync --detach --current-branch --no-tags --force-remove-dirty --optimized-fetch --force-sync
.checkout_commit: &checkout_commit .checkout_commit: &checkout_commit
# checkout the commit that triggered the pipeline # checkout the commit that triggered the pipeline
...@@ -50,6 +50,7 @@ prepare_environment: ...@@ -50,6 +50,7 @@ prepare_environment:
tags: tags:
- builds - builds
stage: prepare stage: prepare
timeout: 10m
before_script: before_script:
- *setup_ssh - *setup_ssh
script: script:
...@@ -60,7 +61,7 @@ prepare_environment: ...@@ -60,7 +61,7 @@ prepare_environment:
artifacts: artifacts:
expire_in: 3h expire_in: 3h
paths: paths:
- "*" - "./"
cache: cache:
untracked: false untracked: false
key: key:
...@@ -68,12 +69,14 @@ prepare_environment: ...@@ -68,12 +69,14 @@ prepare_environment:
- .repo/manifests/default.xml - .repo/manifests/default.xml
prefix: layers prefix: layers
paths: paths:
- "sources/*/{[^.git]}*/*" # - "sources/*/{[^.git]}*/*"
- "./"
.build: .build:
tags: tags:
- builds - builds
stage: build stage: build
timeout: 8h
variables: variables:
SETUPSCRIPT: "setup-environment" SETUPSCRIPT: "setup-environment"
IMAGEPATH: "tmp/deploy/images" IMAGEPATH: "tmp/deploy/images"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment