AAE-11622 - remove unused scripts from pipeline (#8329)

* AAE-11622 remove unused scripts

* AAE-11622 remove unused scripts

* AAE-11622 remove unused scripts

* AAE-11622 remove unused scripts
This commit is contained in:
Maurizio Cacace
2023-03-14 14:18:43 +01:00
committed by GitHub
parent 78a7e5d1df
commit a4d57e62f8
20 changed files with 0 additions and 789 deletions

View File

@@ -1,14 +0,0 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/../../../
BRANCH=${GITHUB_REF##*/}
if [[ $BRANCH =~ ^develop(-patch.*)?$ ]]
then
echo "Replace NPM version with new Alpha tag"
NEXT_VERSION=-nextalpha
./scripts/update-version.sh -gnu $NEXT_VERSION || exit 1;
fi

View File

@@ -1,7 +0,0 @@
#!/usr/bin/env bash
# Increase the max_user_watches
sudo sysctl -w fs.inotify.max_user_watches=524288
# Run Playwright Storybook Tests
npx playwright test --config='e2e-playwright/playwright.config.ts' || exit 1

View File

@@ -1,71 +0,0 @@
#!/usr/bin/env node
const GitHub = require('github-api');
let program = require('commander');
const ORGANISATION = 'Alfresco';
const ORIGIN_REPO = 'alfresco-ng2-components';
class PrCreator {
constructor(githubUser, githubRepo, token, commit) {
this.github = new GitHub({token});
this.repoOrigin = this.github.getRepo(githubUser, ORIGIN_REPO);
this.repoDestination = this.github.getRepo(githubUser, githubRepo);
this.commit = commit;
}
async getShaClosedPr(head, base) {
return this.getShaPr(head, base, 'closed');
}
async getShaOpenPr(head, base) {
return this.getShaPr(head, base, 'open');
}
async getShaPr(head, base, status) {
const { data: closedUpstreamPRs } = await this.repoDestination.listPullRequests({ state: status, head: `${ORGANISATION}:${head}`, base });
if (closedUpstreamPRs.length > 0) {
const latestClosedUpstream = closedUpstreamPRs[0];
return latestClosedUpstream.body.split(':')[1].trim();
}
return '';
}
}
async function main() {
program
.version('0.1.0')
.option('--host [type]', 'Remote environment host adf.lab.com ')
.option('-t, --token [type]', 'token')
.option('-h, --head [type]', 'head')
.option('-r, --repo [type]', 'repo')
.option('-c, --commit [type]', 'commit')
.parse(process.argv);
const { token, head, repo, commit } = program,
prCreator = new PrCreator(ORGANISATION, repo, token, commit);
const baseBranchName = 'develop';
const shaOpen = await prCreator.getShaOpenPr(head, baseBranchName);
const shaClosed = await prCreator.getShaClosedPr(head, baseBranchName);
if (shaOpen === commit || shaClosed === commit) {
console.log('ADF sha already exist');
return 'true';
}
return 'false';
}
main()
.then(result => {
process.stdout.write(result);
process.exit(0);
})
.catch(error => {
console.error(error.response.status);
console.error(error.response.statusText);
process.exit(1);
});