Skip to content
Snippets Groups Projects

Draft: .oniro-ci: use CI_ONIRO_RUNNER_EPHEMERAL_STORAGE

Open Zygmunt Krynicki requested to merge zyga/oniro:tweak/ci-ephemeral-storage into kirkstone
1 unresolved thread
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -28,7 +28,7 @@
# Create scratch space, being careful not to pollute the working directory.
# This is done so that we are not attached to the contents of
# $CI_PROJECT_DIR which contains something that GitLab CI prepared for us.
- SCRATCH_DIR="$(mktemp -p /tmp -d workspace.XXXXXXXXXX)"
- SCRATCH_DIR="$(mktemp -p "${CI_ONIRO_RUNNER_EPHEMERAL_STORAGE:-/tmp}" -d workspace.XXXXXXXXXX)"
    • Why is this changed from CI_ONIRO_RUNNER_PERSISTENT_STORAGE (which is what we still use in meta-openharmony) ?

      Edited by Esben Haabendal
      • Author Developer

        I don't know why you would want to create the whole workspace there. The idea is that instead of using the default docker storage, you create the workspace in tmpfs, and in result, perform all the builds there, for a huge speedup.

        If you really use persistent storage for the repo workspace in meta-openharmony, can you explain how is that useful and how do you deal with concurrency issues (as that storage is shared by many builds)

      • Would it be possible to get away with mounting tmpfs in /build ?

      • Author Developer

        It depends on how the jobs are written. The .workspace job does not really use the default build dir. In addition, in practice, tuning is useful (unless you have ridiculous amount of ram on hand). In my case I've defined the tmpfs for tmp/ but moved tmp/deploy back to docker storage as that only grows and is huge, eating lots of memory for almost no gain.

        Edited by Zygmunt Krynicki
      • Please register or sign in to reply
Please register or sign in to reply
- echo "$SCRATCH_DIR" > "$CI_PROJECT_DIR"/.scratch-dir-name
- cd "$SCRATCH_DIR"
Loading