Skip to content

Commit

Permalink
Zowe Suite v3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zowe-robot authored Sep 12, 2024
2 parents f7142f7 + 440c7bf commit 8a7cf47
Show file tree
Hide file tree
Showing 6 changed files with 652 additions and 260 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/build-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Build Core
on:
push:
branches:
- v2.x/staging
- v3.x/staging
- v3.x/rc
- v3.x/master
pull_request:
types: [opened, reopened, synchronize]

Expand All @@ -28,9 +30,9 @@ on:
description: 'zlux-shared PR number'
required: false
DEFAULT_BRANCH:
description: 'please enter the default branch you would like to build with, default will be v2.x/staging'
description: 'please enter the default branch you would like to build with, default will be v3.x/staging'
required: false
default: 'v2.x/staging'
default: 'v3.x/staging'

jobs:
check-permission:
Expand Down Expand Up @@ -146,17 +148,17 @@ jobs:
${{ runner.os }}-build-cache-node-modules-
- name: '[Prep 2] Setup Node'
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16.15.0
node-version: 18

- name: '[Prep 3] Setup jFrog CLI'
uses: jfrog/setup-jfrog-cli@v2
env:
JF_ARTIFACTORY_1: ${{ secrets.JF_ARTIFACTORY_TOKEN }}

- name: '[Prep 4] prepare workflow'
uses: zowe-actions/zlux-builds/core/prepare@v2.x/main
uses: zowe-actions/zlux-builds/core/prepare@v3.x/main
with:
github-user: ${{ secrets.ZOWE_ROBOT_USER }}
github-password: ${{ secrets.ZOWE_ROBOT_TOKEN }}
Expand All @@ -165,7 +167,7 @@ jobs:
default-base: ${{ github.event.inputs.DEFAULT_BRANCH }}

- name: '[Prep 5] build'
uses: zowe-actions/zlux-builds/core/build@v2.x/main
uses: zowe-actions/zlux-builds/core/build@v3.x/main
with:
zlux-app-manager: ${{ github.event.inputs.ZLUX_APP_MANAGER }}
zlux-app-server: ${{ github.event.inputs.ZLUX_APP_SERVER }}
Expand All @@ -175,12 +177,12 @@ jobs:
zlux-shared: ${{ github.event.inputs.ZLUX_SHARED }}

- name: '[Prep 6] packaging'
uses: zowe-actions/zlux-builds/core/package@v2.x/main
uses: zowe-actions/zlux-builds/core/package@v3.x/main
with:
pax-ssh-username: ${{ secrets.SSH_MARIST_USERNAME }}
pax-ssh-password: ${{ secrets.SSH_MARIST_RACF_PASSWORD }}
pax-name: zlux-core

- name: '[Prep 7] deploy'
uses: zowe-actions/zlux-builds/core/deploy@v2.x/main
uses: zowe-actions/zlux-builds/core/deploy@v3.x/main

35 changes: 30 additions & 5 deletions base/src/plugin-manager/plugin-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,33 @@ export class PluginManager {
}
});

/* Remove skipped plugins */
return plugins.filter(x => x) as Plugin[];
/* Remove skipped plugins and apps not valid for this version*/
let filtered = plugins.filter(x => x) as Plugin[];
const searchParams = new URLSearchParams(window.location.search);
const useV2Desktop = searchParams.has("use-v2-desktop") && (searchParams.get("use-v2-desktop") == 'true');
return filtered.filter((plugin) => {
if (plugin.type != 'application') {
return true;
} else {
const webContent = plugin.webContent;
if (!webContent) {
return true;
} else if ((webContent.framework != 'angular') && (webContent.framework != 'angular2')) {
return true;
} else {
//exclude apps incompatible with the given desktop environment, depending upon their entryPoint content.
if (useV2Desktop && (!webContent.entryPoint || webContent.entryPoint['2.0'])) {
return true;
} else if (!useV2Desktop && webContent.entryPoint && webContent.entryPoint['3.0']) {
return true;
} else {
this.pluginsById.delete(plugin.identifier);
return false;
}
}
}
});

} else {
throw new Error("ZWED5037E - Unable to parse plugin definitions: Missing field 'pluginDefinitions'");
}
Expand All @@ -62,11 +87,11 @@ export class PluginManager {
case 304:
try {
var result = JSON.parse(this.responseText);
let allPlugins = PluginManager.parsePluginDefinitions(result);
let validPlugins = PluginManager.parsePluginDefinitions(result);
if (!pluginType) {
resolve(allPlugins);
resolve(validPlugins);
} else {
const filtered = allPlugins.filter(plugin => plugin.getType() == pluginType)
const filtered = validPlugins.filter(plugin => plugin.getType() == pluginType)
resolve(filtered);
}
} catch (error) {
Expand Down
16 changes: 16 additions & 0 deletions base/src/plugin-manager/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,22 @@ class Plugin_2 extends Plugin_1 {
super(definition);
}

getWebEntrypoint():string|undefined {
let entryPoint = this.webContent?.entryPoint;
if (entryPoint) {
const searchParams = new URLSearchParams(window.location.search);
const useV2Desktop = searchParams.has("use-v2-desktop") && (searchParams.get("use-v2-desktop") == 'true');
if (useV2Desktop || !entryPoint['3.0']) {
return 'main.js';
} else {
return ''+entryPoint['3.0'];
}
} else if (this.webContent) {
return 'main.js';
}
return undefined;
}

}


Expand Down
4 changes: 4 additions & 0 deletions interface/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ declare namespace ZLUX {
getBasePlugin(): any;
}

interface PluginV2 extends Plugin {
getWebEntryPoint():string|undefined;
}

interface ContainerPluginDefinition {
getBasePlugin():Plugin;
}
Expand Down
Loading

0 comments on commit 8a7cf47

Please sign in to comment.