+
Skip to content

Revert cp -Lr, which caused issues with the volume #221

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

Merged
merged 3 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/config/getAttachWorkspaceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ export default function getAttachWorkspaceCommand(step: Step): string {
echo "Warning: tried to attach_workspace to ${CONTAINER_STORAGE_DIRECTORY}, but it's empty. It might require a job to run before it."
else
echo "Attaching ${attachFrom}"
cp -Lr ${attachFrom} ${step?.attach_workspace?.at}
cp -rn ${attachFrom} ${step?.attach_workspace?.at} || cp -ru ${attachFrom} ${step?.attach_workspace?.at}
fi`;
}
2 changes: 1 addition & 1 deletion src/config/test/getAttachWorkspaceCommand.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('getAttachWorkspaceCommand', () => {
echo "Warning: tried to attach_workspace to /tmp/local-ci, but it's empty. It might require a job to run before it."
else
echo "Attaching /tmp/local-ci/."
cp -Lr /tmp/local-ci/. /foo/baz
cp -rn /tmp/local-ci/. /foo/baz || cp -ru /tmp/local-ci/. /foo/baz
fi`
)
);
Expand Down
4 changes: 2 additions & 2 deletions src/process/ProcessFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export default class ProcessFile {
);

return `echo "Persisting ${pathToPersist}"
cp -Lr ${pathToPersist} ${CONTAINER_STORAGE_DIRECTORY}`;
cp -rn ${pathToPersist} ${CONTAINER_STORAGE_DIRECTORY} || cp -ru ${pathToPersist} ${CONTAINER_STORAGE_DIRECTORY}`;
}

return step?.persist_to_workspace?.paths.reduce(
Expand All @@ -206,7 +206,7 @@ export default class ProcessFile {
);

return `${accumulator} echo "Persisting ${pathToPersist}"
cp -Lr ${pathToPersist} ${CONTAINER_STORAGE_DIRECTORY}\n`;
cp -rn ${pathToPersist} ${CONTAINER_STORAGE_DIRECTORY} || cp -ru ${pathToPersist} ${CONTAINER_STORAGE_DIRECTORY}\n`;
},
''
);
Expand Down
18 changes: 9 additions & 9 deletions src/test-tool/expected/with-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
name: Persist to workspace
command: |-
echo "Persisting ."
cp -Lr . /tmp/local-ci
cp -rn . /tmp/local-ci || cp -ru . /tmp/local-ci
run-prettier:
executor: default-executor
steps:
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
echo "Warning: tried to attach_workspace to /tmp/local-ci, but it's empty. It might require a job to run before it."
else
echo "Attaching /tmp/local-ci/."
cp -Lr /tmp/local-ci/. .
cp -rn /tmp/local-ci/. . || cp -ru /tmp/local-ci/. .
fi
- run:
name: Run prettier check on project files
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
echo "Warning: tried to attach_workspace to /tmp/local-ci, but it's empty. It might require a job to run before it."
else
echo "Attaching /tmp/local-ci/."
cp -Lr /tmp/local-ci/. .
cp -rn /tmp/local-ci/. . || cp -ru /tmp/local-ci/. .
fi
- run:
name: Run linter
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:
echo "Warning: tried to attach_workspace to /tmp/local-ci, but it's empty. It might require a job to run before it."
else
echo "Attaching /tmp/local-ci/."
cp -Lr /tmp/local-ci/. .
cp -rn /tmp/local-ci/. . || cp -ru /tmp/local-ci/. .
fi
- run:
name: Run unit tests
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
echo "Warning: tried to attach_workspace to /tmp/local-ci, but it's empty. It might require a job to run before it."
else
echo "Attaching /tmp/local-ci/."
cp -Lr /tmp/local-ci/. .
cp -rn /tmp/local-ci/. . || cp -ru /tmp/local-ci/. .
fi
- run:
name: Restore cache
Expand Down Expand Up @@ -283,7 +283,7 @@ jobs:
echo "Warning: tried to attach_workspace to /tmp/local-ci, but it's empty. It might require a job to run before it."
else
echo "Attaching /tmp/local-ci/."
cp -Lr /tmp/local-ci/. .
cp -rn /tmp/local-ci/. . || cp -ru /tmp/local-ci/. .
fi
- run:
name: Build
Expand All @@ -292,7 +292,7 @@ jobs:
name: Persist to workspace
command: |-
echo "Persisting ."
cp -Lr . /tmp/local-ci
cp -rn . /tmp/local-ci || cp -ru . /tmp/local-ci
verify-bundles-sizes:
executor: default-executor
steps:
Expand Down Expand Up @@ -321,7 +321,7 @@ jobs:
echo "Warning: tried to attach_workspace to /tmp/local-ci, but it's empty. It might require a job to run before it."
else
echo "Attaching /tmp/local-ci/."
cp -Lr /tmp/local-ci/. .
cp -rn /tmp/local-ci/. . || cp -ru /tmp/local-ci/. .
fi
- run:
name: Check bundles sizes
Expand Down Expand Up @@ -354,7 +354,7 @@ jobs:
echo "Warning: tried to attach_workspace to /tmp/local-ci, but it's empty. It might require a job to run before it."
else
echo "Attaching /tmp/local-ci/."
cp -Lr /tmp/local-ci/. .
cp -rn /tmp/local-ci/. . || cp -ru /tmp/local-ci/. .
fi
- run:
name: Firebase deploy
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载