mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
return the release project (#5838)
This commit is contained in:
@@ -155,13 +155,16 @@ async function importAndReleaseProject(absoluteFilePath: string) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const project = await alfrescoJsApiModeler.oauth2Auth.callCustomApi(`${args.host}/modeling-service/v1/projects/import`, 'POST', {}, {}, {}, { file: fileContent }, {}, ['multipart/form-data'], ['application/json']);
|
const project = await alfrescoJsApiModeler.oauth2Auth.callCustomApi(`${args.host}/modeling-service/v1/projects/import`, 'POST', {}, {}, {}, { file: fileContent }, {}, ['multipart/form-data'], ['application/json']);
|
||||||
|
logger.info(`Project imported`);
|
||||||
await alfrescoJsApiModeler.oauth2Auth.callCustomApi(`${args.host}/modeling-service/v1/projects/${project.entry.id}/releases`, 'POST', {}, {}, {}, {}, {},
|
logger.info(`Create release`);
|
||||||
|
const release = await alfrescoJsApiModeler.oauth2Auth.callCustomApi(`${args.host}/modeling-service/v1/projects/${project.entry.id}/releases`, 'POST', {}, {}, {}, {}, {},
|
||||||
['application/json'], ['application/json']);
|
['application/json'], ['application/json']);
|
||||||
|
return release;
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Import Projects' + error.status);
|
logger.error(`Not able to import the project/create the release ${absoluteFilePath} with status: ${error}`);
|
||||||
isValid = false;
|
isValid = false;
|
||||||
|
throw(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -392,7 +395,6 @@ async function main(configArgs: ConfigArgs) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
alfrescoJsApiModeler = getAlfrescoJsApiInstance(args);
|
alfrescoJsApiModeler = getAlfrescoJsApiInstance(args);
|
||||||
alfrescoJsApiDevops = getAlfrescoJsApiInstance(args);
|
|
||||||
await alfrescoJsApiModeler.login(args.modelerUsername, args.modelerPassword).then(() => {
|
await alfrescoJsApiModeler.login(args.modelerUsername, args.modelerPassword).then(() => {
|
||||||
logger.info('login SSO ok');
|
logger.info('login SSO ok');
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
@@ -406,6 +408,7 @@ async function main(configArgs: ConfigArgs) {
|
|||||||
|
|
||||||
if (isValid) {
|
if (isValid) {
|
||||||
logger.error('The environment is up and running');
|
logger.error('The environment is up and running');
|
||||||
|
alfrescoJsApiDevops = getAlfrescoJsApiInstance(args);
|
||||||
await alfrescoJsApiDevops.login(args.devopsUsername, args.devopsPassword).then(() => {
|
await alfrescoJsApiDevops.login(args.devopsUsername, args.devopsPassword).then(() => {
|
||||||
logger.info('login SSO ok devopsUsername');
|
logger.info('login SSO ok devopsUsername');
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
|
@@ -20,3 +20,8 @@ else if [ ! -d "./lib/dist" ];
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
cp -R ./lib/cli/dist lib/dist/cli/
|
cp -R ./lib/cli/dist lib/dist/cli/
|
||||||
|
|
||||||
|
echo "====== Move to node_modules ======"
|
||||||
|
rm -rf ./node_modules/@alfresco/adf-cli/ && \
|
||||||
|
mkdir -p ./node_modules/@alfresco/adf-cli/ && \
|
||||||
|
cp -R ./lib/dist/cli/* ./node_modules/@alfresco/adf-cli/
|
Reference in New Issue
Block a user