md5 library folder
parent
86c7320386
commit
52e756a174
|
|
@ -2080,6 +2080,7 @@ class RemoteBuilder {
|
||||||
static SetupStep(buildUid, buildParameters, branchName, defaultSecretsArray) {
|
static SetupStep(buildUid, buildParameters, branchName, defaultSecretsArray) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
core.info('Starting step 1/4 clone and restore cache)');
|
core.info('Starting step 1/4 clone and restore cache)');
|
||||||
|
const projectPathFull = `/${buildVolumeFolder}/${buildUid}/${repositoryFolder}/${buildParameters.projectPath}`;
|
||||||
yield this.RemoteBuilderProviderPlatform.runBuildTask(buildUid, 'alpine/git', [
|
yield this.RemoteBuilderProviderPlatform.runBuildTask(buildUid, 'alpine/git', [
|
||||||
`apk update;
|
`apk update;
|
||||||
apk add unzip;
|
apk add unzip;
|
||||||
|
|
@ -2110,13 +2111,16 @@ class RemoteBuilder {
|
||||||
echo "Cached Libraries for ${branchName} from previous builds:"
|
echo "Cached Libraries for ${branchName} from previous builds:"
|
||||||
ls
|
ls
|
||||||
echo ''
|
echo ''
|
||||||
ls "/${buildVolumeFolder}/${buildUid}/${repositoryFolder}/${buildParameters.projectPath}"
|
ls "${projectPathFull}"
|
||||||
libDir="/${buildVolumeFolder}/${buildUid}/${repositoryFolder}/${buildParameters.projectPath}/Library"
|
libDir="/${projectPathFull}/Library"
|
||||||
if [ -d "$libDir" ]; then
|
if [ -d "$libDir" ]; then
|
||||||
rm -r "$libDir"
|
rm -r "$libDir"
|
||||||
echo "Setup .gitignore to ignore Library folder and remove it from builds"
|
echo "Setup .gitignore to ignore Library folder and remove it from builds"
|
||||||
fi
|
fi
|
||||||
echo 'Checking cache'
|
echo 'Checking cache'
|
||||||
|
find "${projectPathFull}/Library" -type f -exec md5sum "{}" + > libraryCache.chk
|
||||||
|
ls
|
||||||
|
cat libraryCache.chk
|
||||||
# Restore cache
|
# Restore cache
|
||||||
latest=$(ls -t | head -1)
|
latest=$(ls -t | head -1)
|
||||||
if [ ! -z "$latest" ]; then
|
if [ ! -z "$latest" ]; then
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -87,6 +87,7 @@ class RemoteBuilder {
|
||||||
defaultSecretsArray: RemoteBuilderSecret[],
|
defaultSecretsArray: RemoteBuilderSecret[],
|
||||||
) {
|
) {
|
||||||
core.info('Starting step 1/4 clone and restore cache)');
|
core.info('Starting step 1/4 clone and restore cache)');
|
||||||
|
const projectPathFull = `/${buildVolumeFolder}/${buildUid}/${repositoryFolder}/${buildParameters.projectPath}`;
|
||||||
await this.RemoteBuilderProviderPlatform.runBuildTask(
|
await this.RemoteBuilderProviderPlatform.runBuildTask(
|
||||||
buildUid,
|
buildUid,
|
||||||
'alpine/git',
|
'alpine/git',
|
||||||
|
|
@ -122,13 +123,16 @@ class RemoteBuilder {
|
||||||
echo "Cached Libraries for ${branchName} from previous builds:"
|
echo "Cached Libraries for ${branchName} from previous builds:"
|
||||||
ls
|
ls
|
||||||
echo ''
|
echo ''
|
||||||
ls "/${buildVolumeFolder}/${buildUid}/${repositoryFolder}/${buildParameters.projectPath}"
|
ls "${projectPathFull}"
|
||||||
libDir="/${buildVolumeFolder}/${buildUid}/${repositoryFolder}/${buildParameters.projectPath}/Library"
|
libDir="/${projectPathFull}/Library"
|
||||||
if [ -d "$libDir" ]; then
|
if [ -d "$libDir" ]; then
|
||||||
rm -r "$libDir"
|
rm -r "$libDir"
|
||||||
echo "Setup .gitignore to ignore Library folder and remove it from builds"
|
echo "Setup .gitignore to ignore Library folder and remove it from builds"
|
||||||
fi
|
fi
|
||||||
echo 'Checking cache'
|
echo 'Checking cache'
|
||||||
|
find "${projectPathFull}/Library" -type f -exec md5sum "{}" + > libraryCache.chk
|
||||||
|
ls
|
||||||
|
cat libraryCache.chk
|
||||||
# Restore cache
|
# Restore cache
|
||||||
latest=$(ls -t | head -1)
|
latest=$(ls -t | head -1)
|
||||||
if [ ! -z "$latest" ]; then
|
if [ ! -z "$latest" ]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue