Skip to content

Commit

Permalink
Merge pull request #398 from cherylking/addSkipInstallFeature
Browse files Browse the repository at this point in the history
Add new skip install feature flag for dev mode
  • Loading branch information
cherylking committed Aug 21, 2023
2 parents b08c49b + 5b1ac77 commit 31db687
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,11 @@ private enum FileTrackMode {
private Set<String> testArtifactPaths;
protected final File generatedFeaturesFile;
private File modifiedSrcBuildFile;
protected boolean skipInstallFeature;

public DevUtil(File buildDirectory, File serverDirectory, File sourceDirectory, File testSourceDirectory,
File configDirectory, File projectDirectory, File multiModuleProjectDirectory, List<File> resourceDirs,
boolean hotTests, boolean skipTests, boolean skipUTs, boolean skipITs, String applicationId,
boolean hotTests, boolean skipTests, boolean skipUTs, boolean skipITs, boolean skipInstallFeature, String applicationId,
long serverStartTimeout, int appStartupTimeout, int appUpdateTimeout, long compileWaitMillis,
boolean libertyDebug, boolean useBuildRecompile, boolean gradle, boolean pollingTest, boolean container,
File dockerfile, File dockerBuildContext, String dockerRunOpts, int dockerBuildTimeout,
Expand All @@ -457,6 +458,7 @@ public DevUtil(File buildDirectory, File serverDirectory, File sourceDirectory,
this.skipTests = skipTests;
this.skipUTs = skipUTs;
this.skipITs = skipITs;
this.skipInstallFeature = skipInstallFeature;
this.applicationId = applicationId;
this.serverStartTimeout = serverStartTimeout;
this.appStartupTimeout = appStartupTimeout;
Expand Down Expand Up @@ -1845,8 +1847,11 @@ public void restartServer(boolean buildContainer) throws PluginExecutionExceptio
libertyCreate();
// Skip installing features on container during restart, since the Dockerfile
// should have 'RUN features.sh'
if (!container) {
// Also skip install feature on restart if config parameter specified.
if (!container && !skipInstallFeature) {
libertyInstallFeature();
} else if (skipInstallFeature) {
info("Skipping installation of features due to skipInstallFeature configuration.");
}
libertyDeploy();
startServer(buildContainer, false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2019.
* (C) Copyright IBM Corporation 2019, 2023.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,13 +39,13 @@ public class DevTestUtil extends DevUtil {
public DevTestUtil(File serverDirectory, File sourceDirectory, File testSourceDirectory, File configDirectory,
List<File> resourceDirs, List<Path> webResourceDirs, boolean hotTests, boolean skipTests) throws IOException {
super(temp.newFolder(), serverDirectory, sourceDirectory, testSourceDirectory, configDirectory, null, null,
resourceDirs, hotTests, skipTests, false, false, null, 30, 30, 5, 500, true, false, false, false,
resourceDirs, hotTests, skipTests, false, false, false, null, 30, 30, 5, 500, true, false, false, false,
false, null, null, null, 0, false, null, false, null, null, false, null, null, null, false, null, null, webResourceDirs);
}

public DevTestUtil(File serverDirectory, File buildDir) {
super(buildDir, serverDirectory, null, null, null, null, null,
null, false, false, false, false, null, 30, 30, 5, 500, true, false, false, false,
null, false, false, false, false, false, null, 30, 30, 5, 500, true, false, false, false,
false, null, null, null, 0, false, null, false, null, null, false, null, null, null, false, null, null, null);
}

Expand Down

0 comments on commit 31db687

Please sign in to comment.