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

Add new skip install feature flag for dev mode #398

Merged
merged 6 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,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 @@ -456,6 +457,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 @@ -1844,8 +1846,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 {
info("Skipping liberty:install-feature");
cherylking marked this conversation as resolved.
Show resolved Hide resolved
}
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