Skip to content
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

Investigate param --ci, this.config.isCI #168

Open
janpio opened this issue Jun 29, 2019 · 2 comments
Open

Investigate param --ci, this.config.isCI #168

janpio opened this issue Jun 29, 2019 · 2 comments

Comments

@janpio
Copy link
Member

janpio commented Jun 29, 2019

Paramedic has a param --ci that can be read in code via this.config.isCI. There is also a connected plugin ci-plugin that seems to be used in connection. Looking through the code, there is also some "interesting" code that is run or not run depending on this parameter.

Should be investigated if this is useful, if so how, and if not if it can be removed.

@janpio
Copy link
Member Author

janpio commented Jun 29, 2019

if (this.isAndroid && this.config.isCI()) {
logger.info('cordova-paramedic: monkey patching Android platform to disable gradle daemon...');
const gradleBuilderFile = path.join(this.tempFolder.name, 'platforms', 'android', 'cordova', 'lib', 'builders', 'GradleBuilder.js');
// remove the line where the gradle daemon is forced on
if (appPatcher.monkeyPatch(gradleBuilderFile, /args\.push\('-Dorg\.gradle\.daemon=true'\);/, '//args.push(\'-Dorg.gradle.daemon=true\');')) {
logger.info('cordova-paramedic: success!');
} else {
logger.info('cordova-paramedic: couldn\'t apply the patch. It must be good news: does cordova-android not hard-code gradle daemon anymore?');
}
} else if (this.isBrowser && this.config.shouldUseSauce()) {

if (this.config.isCI()) {
additionalPlugins.push(path.join(__dirname, '..', 'ci-plugin'));
}

if (plugins[i].indexOf('cordova-plugin-file-transfer') >= 0 && !this.config.getFileTransferServer() && !this.config.isCI()) {
return this.server.startFileTransferServer(this.tempFolder.name);
}

@janpio
Copy link
Member Author

janpio commented Jun 29, 2019

Re snippet 1: That gradleBuilderFile doesn't exist any more, so probably not working.
Re snippet 2: This plugin somehow tells other plugins they are running in CI. Not clear if used anywhere (most probably not by core plugins though)
Re snippet 3: Deprecated plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant