mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
Fix build scripts (#5461)
* improve check env script * fix update script children
This commit is contained in:
parent
a0926a38d8
commit
c84bb250fb
@ -44,34 +44,35 @@ async function checkEnv() {
|
||||
}
|
||||
|
||||
async function checkDiskSpaceFullEnv() {
|
||||
this.alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility({
|
||||
provider: 'ECM',
|
||||
hostEcm: program.host
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(program.username, program.password);
|
||||
|
||||
let folder;
|
||||
|
||||
try {
|
||||
folder = await alfrescoJsApi.nodes.addNode('-my-', {
|
||||
'name': `try-env`,
|
||||
'relativePath': `Builds`,
|
||||
'nodeType': 'cm:folder'
|
||||
}, {}, {
|
||||
'overwrite': true
|
||||
|
||||
this.alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility({
|
||||
provider: 'ECM',
|
||||
hostEcm: program.host
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
folder = await alfrescoJsApi.nodes.getNode('-my-', {
|
||||
'relativePath': `Builds/try-env`,
|
||||
'nodeType': 'cm:folder'
|
||||
}, {}, {
|
||||
'overwrite': true
|
||||
});
|
||||
}
|
||||
await this.alfrescoJsApi.login(program.username, program.password);
|
||||
|
||||
let folder;
|
||||
|
||||
try {
|
||||
folder = await alfrescoJsApi.nodes.addNode('-my-', {
|
||||
'name': `try-env`,
|
||||
'relativePath': `Builds`,
|
||||
'nodeType': 'cm:folder'
|
||||
}, {}, {
|
||||
'overwrite': true
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
folder = await alfrescoJsApi.nodes.getNode('-my-', {
|
||||
'relativePath': `Builds/try-env`,
|
||||
'nodeType': 'cm:folder'
|
||||
}, {}, {
|
||||
'overwrite': true
|
||||
});
|
||||
}
|
||||
|
||||
try {
|
||||
let pathFile = path.join(__dirname, '../../', 'README.md');
|
||||
let file = fs.createReadStream(pathFile);
|
||||
|
||||
@ -89,11 +90,20 @@ async function checkDiskSpaceFullEnv() {
|
||||
|
||||
this.alfrescoJsApi.node.deleteNode(uploadedFile.entry.id, {permanent: true});
|
||||
} catch (error) {
|
||||
console.log('=============================================================');
|
||||
console.log('================ Not able to upload a file ==================');
|
||||
console.log('================ Possible cause CS is full ==================');
|
||||
console.log('=============================================================');
|
||||
process.exit(1);
|
||||
counter++;
|
||||
|
||||
if (MAX_RETRY === counter) {
|
||||
console.log('=============================================================');
|
||||
console.log('================ Not able to upload a file ==================');
|
||||
console.log('================ Possible cause CS is full ==================');
|
||||
console.log('=============================================================');
|
||||
process.exit(1);
|
||||
} else {
|
||||
console.log(`Retry in 1 minute attempt N ${counter}`);
|
||||
sleep(TIMEOUT);
|
||||
checkDiskSpaceFullEnv();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,15 +1,4 @@
|
||||
#!/bin/sh -f
|
||||
|
||||
# Trigger a new Travis-CI job.
|
||||
|
||||
# Usage:
|
||||
# trigger-travis.sh [--pro] [--branch BRANCH] GITHUBID GITHUBPROJECT TRAVIS_ACCESS_TOKEN [MESSAGE]
|
||||
# For example:
|
||||
# trigger-travis.sh typetools checker-framework `cat ~/private/.travis-access-token` "Trigger for testing"
|
||||
|
||||
# For full documentation, see
|
||||
# https://github.com/plume-lib/trigger-travis/
|
||||
|
||||
#!/usr/bin/env bash
|
||||
|
||||
eval repos=( "alfresco-modeler-app"
|
||||
"alfresco-process-workspace-app"
|
||||
|
Loading…
x
Reference in New Issue
Block a user