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

Added ServiceNow Vancouver version to the Release #526

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .github/workflows/publish.servicenow.plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
cat <<'EOF' > build.sh
#!/usr/bin/env bash
MID_SERVER_URLS=''
MID_SERVER_URLS=${MID_SERVER_URLS},https://install.service-now.com/glide/distribution/builds/package/mid/2023/07/26/mid.vancouver-07-06-2023__patch0-07-18-2023_07-26-2023_1029.linux.x86-64.zip
MID_SERVER_URLS=${MID_SERVER_URLS},https://install.service-now.com/glide/distribution/builds/package/mid/2023/08/20/mid.utah-12-21-2022__patch6-08-09-2023_08-20-2023_0545.linux.x86-64.zip
MID_SERVER_URLS=${MID_SERVER_URLS},https://install.service-now.com/glide/distribution/builds/package/mid/2023/06/23/mid.tokyo-07-08-2022__patch9-hotfix2-06-07-2023_06-23-2023_1740.linux.x86-64.zip
MID_SERVER_URLS=${MID_SERVER_URLS},https://install.service-now.com/glide/distribution/builds/package/mid/2023/03/07/mid.sandiego-12-22-2021__patch10-hotfix2-03-06-2023_03-07-2023_0439.linux.x86-64.zip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ dependencies {
compileOnly 'com.snc:commons-glide'
compileOnly 'com.snc:commons-core-automation'
compileOnly 'com.snc:snc-automation-api'

// NB! JDK16+/Vancouver+ may require: export _JAVA_OPTIONS="--add-opens=java.base/sun.security.util=ALL-UNNAMED"
// Vancouver and newer: IFileSystem is in the new mid-api.jar
if( !fileTree("$midserver_agent_dir").filter{File f -> (f.name == "mid-api.jar")}.isEmpty() ) {
compileOnly 'com.snc:mid-api'
}
}

jar {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void config(Map<String, String> configMap) {

ksmConfig = configMap.get(KSM_CONFIG);
if(isNullOrEmpty(ksmConfig))
fLogger.error("[Vault] INFO - CredentialResolver ksmConfig not set!");
fLogger.error("[Vault] ERROR - CredentialResolver ksmConfig not set!");
String configMask = new String(new char[ksmConfig.length()]).replace('\0', '*');
fLogger.info("ksmConfig: " + configMask);

Expand Down Expand Up @@ -460,18 +460,18 @@ public static String getCacheDir() {
}

public static String getCacheFilename() {
String workPath = getCacheDir();
return FileSystem.get().combinePath(workPath, "ksm_cache.dat");
return Paths.get(getCacheDir(), "ksm_cache.dat").toString();
}

public static String getCacheTmpFilename() {
String workPath = getCacheDir();
return FileSystem.get().combinePath(workPath, "ksm_cache.tmp");
return Paths.get(getCacheDir(), "ksm_cache.tmp").toString();
}

//main method to test locally, provide KSM config and test it
// TODO: Remove this before moving to production
/*
// Note Java16+ needs following setup (Vancouver+ switched from Java11 to Java17)
// export _JAVA_OPTIONS="--add-opens=java.base/sun.security.util=ALL-UNNAMED"
public static void main(String[] args) {
CredentialResolver credResolver = new CredentialResolver();
credResolver.ksmConfig = "[Base64_KSM_Config]";
Expand Down