Skip to content

Commit

Permalink
Add driver modules to the dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
niveathika committed Sep 15, 2024
1 parent 8765aa6 commit 3b12b3a
Show file tree
Hide file tree
Showing 7 changed files with 173 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,21 @@ These are the generated Ballerina connector modules that are used to connect to
|[twitter](https://github.com/ballerina-platform/module-ballerinax-twitter)|[![Latest Release](https://img.shields.io/github/v/release/ballerina-platform/module-ballerinax-twitter?color=30c955&label=)](https://github.com/ballerina-platform/module-ballerinax-twitter/releases/tag/v4.0.0)|[![Build](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-twitter/daily-build.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-twitter/actions/workflows/daily-build.yml)|[![Trivy](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-twitter/trivy-scan.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-twitter/actions/workflows/trivy-scan.yml)|[![Bugs](https://img.shields.io/github/issues-search/ballerina-platform/ballerina-library?query=is%3Aopen%20label%3Amodule%2Ftwitter%20label%3AType%2FBug&color=yellow&label=)](https://github.com/ballerina-platform/ballerina-library/issues?q=is%3Aopen%20label%3Amodule%2Ftwitter%20label%3AType%2FBug)|[![Pull Requests](https://img.shields.io/github/issues-pr-raw/ballerina-platform/module-ballerinax-twitter.svg?label=)](https://github.com/ballerina-platform/module-ballerinax-twitter/pulls)|[![GraalVM Check](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-twitter/build-with-bal-test-graalvm.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-twitter/actions/workflows/build-with-bal-test-graalvm.yml)|
|[zendesk](https://github.com/ballerina-platform/module-ballerinax-zendesk)|[![Latest Release](https://img.shields.io/github/v/release/ballerina-platform/module-ballerinax-zendesk?color=30c955&label=)](https://github.com/ballerina-platform/module-ballerinax-zendesk/releases/tag/v2.0.0)|[![Build](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-zendesk/daily-build.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-zendesk/actions/workflows/daily-build.yml)|[![Trivy](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-zendesk/trivy-scan.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-zendesk/actions/workflows/trivy-scan.yml)|[![Bugs](https://img.shields.io/github/issues-search/ballerina-platform/ballerina-library?query=is%3Aopen%20label%3Amodule%2Fzendesk%20label%3AType%2FBug&color=30c955&label=)](https://github.com/ballerina-platform/ballerina-library/issues?q=is%3Aopen%20label%3Amodule%2Fzendesk%20label%3AType%2FBug)|[![Pull Requests](https://img.shields.io/github/issues-pr-raw/ballerina-platform/module-ballerinax-zendesk.svg?label=)](https://github.com/ballerina-platform/module-ballerinax-zendesk/pulls)|[![GraalVM Check](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-zendesk/build-with-bal-test-graalvm.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-zendesk/actions/workflows/build-with-bal-test-graalvm.yml)|

### Ballerina Driver Modules

These Ballerina modules bundle database drivers, making it easier to use Ballerina database connectors. They are published under the `ballerinax` organization. These modules only bundle drivers, so only build, latest release, and security checks are applicable to these modules.

| Name | Latest Version | Build | Security Check |
|:---:|:---:|:---:|:---:|
|[activemq.driver](https://github.com/ballerina-platform/module-ballerinax-activemq.driver)|[![Latest Release](https://img.shields.io/github/v/release/ballerina-platform/module-ballerinax-activemq.driver?color=30c955&label=)](https://github.com/ballerina-platform/module-ballerinax-activemq.driver/releases/tag/v1.0.1)|[![Build](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-activemq.driver/build-timestamped-master.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-activemq.driver/actions/workflows/build-timestamped-master.yml)|[![Trivy](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-activemq.driver/trivy-scan.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-activemq.driver/actions/workflows/trivy-scan.yml)|
|[aws.redshift.driver](https://github.com/ballerina-platform/module-ballerinax-aws.redshift.driver)|[![Latest Release](https://img.shields.io/github/v/release/ballerina-platform/module-ballerinax-aws.redshift.driver?color=30c955&label=)](https://github.com/ballerina-platform/module-ballerinax-aws.redshift.driver/releases/tag/v1.0.0)|[![Build](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-aws.redshift.driver/daily-build.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-aws.redshift.driver/actions/workflows/daily-build.yml)|[![Trivy](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-aws.redshift.driver/trivy-scan.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-aws.redshift.driver/actions/workflows/trivy-scan.yml)|
|[h2.driver](https://github.com/ballerina-platform/module-ballerinax-h2.driver)|[![Latest Release](https://img.shields.io/github/v/release/ballerina-platform/module-ballerinax-h2.driver?color=30c955&label=)](https://github.com/ballerina-platform/module-ballerinax-h2.driver/releases/tag/v1.1.0)|[![Build](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-h2.driver/build-timestamped-master.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-h2.driver/actions/workflows/build-timestamped-master.yml)|[![Trivy](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-h2.driver/trivy-scan.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-h2.driver/actions/workflows/trivy-scan.yml)|
|[mssql.driver](https://github.com/ballerina-platform/module-ballerinax-mssql.driver)|[![Latest Release](https://img.shields.io/github/v/release/ballerina-platform/module-ballerinax-mssql.driver?color=30c955&label=)](https://github.com/ballerina-platform/module-ballerinax-mssql.driver/releases/tag/v1.6.0)|[![Build](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-mssql.driver/build-timestamped-master.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-mssql.driver/actions/workflows/build-timestamped-master.yml)|[![Trivy](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-mssql.driver/trivy-scan.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-mssql.driver/actions/workflows/trivy-scan.yml)|
|[mysql.driver](https://github.com/ballerina-platform/module-ballerinax-mysql.driver)|[![Latest Release](https://img.shields.io/github/v/release/ballerina-platform/module-ballerinax-mysql.driver?color=30c955&label=)](https://github.com/ballerina-platform/module-ballerinax-mysql.driver/releases/tag/v1.7.0)|[![Build](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-mysql.driver/build-timestamped-master.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-mysql.driver/actions/workflows/build-timestamped-master.yml)|[![Trivy](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-mysql.driver/trivy-scan.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-mysql.driver/actions/workflows/trivy-scan.yml)|
|[oracledb.driver](https://github.com/ballerina-platform/module-ballerinax-oracledb.driver)|[![Latest Release](https://img.shields.io/github/v/release/ballerina-platform/module-ballerinax-oracledb.driver?color=30c955&label=)](https://github.com/ballerina-platform/module-ballerinax-oracledb.driver/releases/tag/v1.4.0)|[![Build](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-oracledb.driver/build-timestamped-master.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-oracledb.driver/actions/workflows/build-timestamped-master.yml)|[![Trivy](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-oracledb.driver/trivy-scan.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-oracledb.driver/actions/workflows/trivy-scan.yml)|
|[postgresql.driver](https://github.com/ballerina-platform/module-ballerinax-postgresql.driver)|[![Latest Release](https://img.shields.io/github/v/release/ballerina-platform/module-ballerinax-postgresql.driver?color=30c955&label=)](https://github.com/ballerina-platform/module-ballerinax-postgresql.driver/releases/tag/v1.5.1)|[![Build](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-postgresql.driver/build-timestamped-master.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-postgresql.driver/actions/workflows/build-timestamped-master.yml)|[![Trivy](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-postgresql.driver/trivy-scan.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-postgresql.driver/actions/workflows/trivy-scan.yml)|
|[snowflake.driver](https://github.com/ballerina-platform/module-ballerinax-snowflake.driver)|[![Latest Release](https://img.shields.io/github/v/release/ballerina-platform/module-ballerinax-snowflake.driver?color=30c955&label=)](https://github.com/ballerina-platform/module-ballerinax-snowflake.driver/releases/tag/v2.7.0)|[![N/A](https://img.shields.io/badge/-N%2FA-yellow)]("")|[![Trivy](https://img.shields.io/github/actions/workflow/status/ballerina-platform/module-ballerinax-snowflake.driver/trivy-scan.yml?branch=main&label=)](https://github.com/ballerina-platform/module-ballerinax-snowflake.driver/actions/workflows/trivy-scan.yml)|

### Ballerina Tools

These are the Ballerina CLI tools maintained by the Ballerina Library team.
Expand Down
4 changes: 4 additions & 0 deletions dashboard/constants.bal
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,28 @@ const HEADER_LIBRARY_MODULES_DASHBOARD = "| Level | Name | Latest Version | Buil
const HEADER_EXTENDED_MODULES_DASHBOARD = "| Name | Latest Version | Build | Security Check | Code Coverage | Bugs | Open PRs | Load Test Results | GraalVM Check |";
const HEADER_HANDWRITTEN_CONNECTOR_DASHBOARD = "| Name | Latest Version | Build | Security Check | Code Coverage | Bugs | Open PRs | Load Test Results | GraalVM Check |";
const HEADER_GENERATED_CONNECTOR_DASHBOARD = "| Name | Latest Version | Build | Security Check | Bugs | Open PRs | GraalVM Check |";
const HEADER_DRIVER_CONNECTOR_DASHBOARD = "| Name | Latest Version | Build | Security Check |";
const HEADER_TOOLS_DASHBOARD = "| Name | Latest Version | Build | Security Check | Code Coverage | Bugs | Open PRs |";

const HEADER_SEPARATOR_LIBRARY_MODULES = "|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|";
const HEADER_SEPARATOR_EXTENDED_MODULES = "|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|";
const HEADER_SEPARATOR_HANDWRITTEN_CONNECTORS = "|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|";
const HEADER_SEPARATOR_GENERATED_CONNECTORS = "|:---:|:---:|:---:|:---:|:---:|:---:|:---:|";
const HEADER_SEPARATOR_DRIVER_CONNECTORS = "|:---:|:---:|:---:|:---:|";
const HEADER_SEPARATOR_TOOLS = "|:---:|:---:|:---:|:---:|:---:|:---:|:---:|";

const TITLE_LIBRARY_MODULES = "### Ballerina Modules";
const TITLE_EXTENDED_MODULES = "### Ballerina Extended Modules";
const TITLE_HANDWRITTEN_CONNECTORS = "### Ballerina Handwritten Connector Modules";
const TITLE_GENERATED_CONNECTORS = "### Ballerina Generated Connector Modules";
const TITLE_DRIVER_CONNECTORS = "### Ballerina Driver Modules";
const TITLE_TOOLS = "### Ballerina Tools";

const DESCRIPTION_LIBRARY_MODULES = "These modules are published under the `ballerina` organization and packed with the Ballerina distribution.";
const DESCRIPTION_EXTENDED_MODULES = "These modules are protocol modules that are not packed with the Ballerina distribution.";
const DESCRIPTION_HANDWRITTEN_CONNECTORS = "These are the handwritten Ballerina connector modules that are used to connect to third-party services. They are published under the `ballerinax` organization ";
const DESCRIPTION_GENERATED_CONNECTORS = "These are the generated Ballerina connector modules that are used to connect to third-party services. They are published under the `ballerinax` organization. The modules are generated using the Ballerina OpenAPI tool using the third-party service's OpenAPI definition. Since these are auto-generated, they only contain a smoke test suite rather than a comprehensive test suite. Due to this nature, the code coverage and load test results are not applicable for these modules. Some repositories such as `sap.s4hana.sales` contain multiple connectors which are highly co-related. These have multiple releases and thus not indicated here.";
const DESCRIPTION_DRIVER_CONNECTORS = "These Ballerina modules bundle database drivers, making it easier to use Ballerina database connectors. They are published under the `ballerinax` organization. These modules only bundle drivers, so only build, latest release, and security checks are applicable to these modules.";
const DESCRIPTION_TOOLS = "These are the Ballerina CLI tools maintained by the Ballerina Library team.";

// Workflow files
Expand Down
15 changes: 15 additions & 0 deletions dashboard/main.bal
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ public function main() returns error? {
Module[] extendedModules = moduleDetails.extended_modules;
Module[] handwrittenConnectors = moduleDetails.handwritten_connectors;
Module[] generatedConnectors = moduleDetails.generated_connectors;
Module[] driver_connectors = moduleDetails.driver_connectors;
Module[] tools = moduleDetails.tools;

Module[] modules = [
...libraryModules,
...extendedModules,
...handwrittenConnectors,
...generatedConnectors,
...driver_connectors,
...tools
];

Expand All @@ -58,6 +60,7 @@ function getSortedModuleNameList() returns List|error {
extended_modules: sortModuleArray(moduleList.extended_modules),
handwritten_connectors: sortModuleArray(moduleList.handwritten_connectors),
generated_connectors: sortModuleArray(moduleList.generated_connectors),
driver_connectors: sortModuleArray(moduleList.driver_connectors),
tools: sortModuleArray(moduleList.tools)
};

Expand All @@ -77,6 +80,7 @@ function initializeModuleDetails(List moduleNameList) returns List|error {
extended_modules: check initializeModuleList(moduleNameList.extended_modules),
handwritten_connectors: check initializeModuleList(moduleNameList.handwritten_connectors, MAX_LEVEL),
generated_connectors: check initializeModuleList(moduleNameList.generated_connectors, MAX_LEVEL),
driver_connectors: check initializeModuleList(moduleNameList.driver_connectors),
tools: check initializeModuleList(moduleNameList.tools)
};
}
Expand Down Expand Up @@ -282,6 +286,7 @@ function updateDashboard(List moduleDetails) returns error? {
updatedReadmeFile += check getExtendedModulesDashboard(moduleDetails.extended_modules);
updatedReadmeFile += check getHandwrittenConnectorDashboard(moduleDetails.handwritten_connectors);
updatedReadmeFile += check getGeneratedConnectorDashboard(moduleDetails.generated_connectors);
updatedReadmeFile += check getDriverModulesDashboard(moduleDetails.driver_connectors);
updatedReadmeFile += check getBallerinaToolsDashboard(moduleDetails.tools);

io:Error? fileWriteString = io:fileWriteString(README_FILE, updatedReadmeFile);
Expand Down Expand Up @@ -337,6 +342,16 @@ isolated function getGeneratedConnectorDashboard(Module[] modules) returns strin
HEADER_GENERATED_CONNECTOR_DASHBOARD, HEADER_SEPARATOR_GENERATED_CONNECTORS, data);
}

function getDriverModulesDashboard(Module[] modules) returns string|error {
string data = "";

foreach Module module in modules {
data += check getDriverConnectorsDashboardRow(module) + "\n";
}
return getDashboard(TITLE_DRIVER_CONNECTORS, DESCRIPTION_DRIVER_CONNECTORS,
HEADER_DRIVER_CONNECTOR_DASHBOARD, HEADER_SEPARATOR_DRIVER_CONNECTORS, data);
}

isolated function getBallerinaToolsDashboard(Module[] modules) returns string|error {
string data = "";

Expand Down
1 change: 1 addition & 0 deletions dashboard/types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type List record {|
Module[] extended_modules;
Module[] handwritten_connectors;
Module[] generated_connectors;
Module[] driver_connectors;
Module[] tools;
|};

Expand Down
9 changes: 9 additions & 0 deletions dashboard/utils.bal
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ isolated function getGeneratedConnectorDashboardRow(Module module) returns strin
return string `|${repoLink}|${releaseBadge}|${buildStatusBadge}|${trivyBadge}|${bugsBadge}|${pullRequestsBadge}|${graalvmCheck}|`;
}

function getDriverConnectorsDashboardRow(Module module) returns string|error {
RepoBadges repoBadges = check getRepoBadges(module);
string repoLink = getRepoLink(module.name);
string releaseBadge = getBadge(repoBadges.release);
string buildStatusBadge = getBadge(repoBadges.buildStatus);
string trivyBadge = getBadge(repoBadges.trivy);
return string `|${repoLink}|${releaseBadge}|${buildStatusBadge}|${trivyBadge}|`;
}

isolated function getRepoLink(string moduleName) returns string {
string shortName = getModuleShortName(moduleName);
return string `[${shortName}](${BALLERINA_ORG_URL}/${moduleName})`;
Expand Down
33 changes: 33 additions & 0 deletions release/resources/module_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,39 @@
"name": "module-ballerinax-zendesk"
}
],
"driver_connectors": [
{
"name": "module-ballerinax-activemq.driver",
"version_key": "activeMQDriverVersion"
},
{
"name": "module-ballerinax-aws.redshift.driver"
},
{
"name": "module-ballerinax-h2.driver",
"version_key": "stdlibH2DriverVersion"
},
{
"name": "module-ballerinax-mssql.driver",
"version_key": "stdlibMssqlDriverVersion"
},
{
"name": "module-ballerinax-mysql.driver",
"version_key": "stdlibMysqlDriverVersion"
},
{
"name": "module-ballerinax-oracledb.driver",
"version_key": "stdlibOracledbDriverVersion"
},
{
"name": "module-ballerinax-postgresql.driver",
"version_key": "stdlibPostgresqlDriverVersion"
},
{
"name": "module-ballerinax-snowflake.driver",
"version_key": "snowflakeDriverVersion"
}
],
"tools": [
{
"name": "asyncapi-tools"
Expand Down
Loading

0 comments on commit 3b12b3a

Please sign in to comment.