Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

CIRRUS_CLONE_DIR #130

Closed
wants to merge 10 commits into from
Closed

CIRRUS_CLONE_DIR #130

wants to merge 10 commits into from

Conversation

fkorotkov
Copy link
Contributor

No description provided.

@edigaryev
Copy link
Contributor

You can greatly simplify the logic by re-using it from the #129. I've ran your tests with it and found the following differences:

  • there's no indirection introduced by injecting CIRRUS_WORKING_DIR/CIRRUS_CLONE_DIR variables to resolve them later — they're resolved in place (since it's already possible)
  • in only working (precreated), only working (monorepo), both (precreated) and both (monorepo + precreated) tests the user-provided CIRRUS_WORKING_DIR/CIRRUS_CLONE_DIR variables are respected even if the pre-created directory exists, which is how it works right now
  • in only clone and only clone (precreated) tests a scratch working directory is provided in the absence CIRRUS_WORKING_DIR, thus making possible to use the configuration pattern described in Separate CIRRUS_CLONE_DIR from CIRRUS_WORKING_DIR #106

@edigaryev
Copy link
Contributor

Err: this allows a user to both clone into some non-standard directory and run some script's in an empty working directory, which may make sense in some cases.

result["CIRRUS_CLONE_DIR"] = executor.preCreatedWorkingDir
hasCloneDir = true
// Need to override working dir too
if hasWorkingDir && !strings.Contains(result["CIRRUS_WORKING_DIR"], "CIRRUS_CLONE_DIR") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if the $CIRRUS_CLONE_DIR variable occurrence in the middle of CIRRUS_WORKING_DIR should be considered as the CIRRUS_WORKING_DIR won't be rooted in CIRRUS_CLONE_DIR this way.

See #129 for a more strict check.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants