From 13a7912c21f8d52c307438db8a59f1e295f1089d Mon Sep 17 00:00:00 2001
From: Chinthaka Jayatilake <37581983+ChinthakaJ98@users.noreply.github.com>
Date: Mon, 2 Dec 2024 18:00:18 +0530
Subject: [PATCH 1/7] Add maven release workflow
---
.github/workflows/publish-release.yml | 43 +++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
create mode 100644 .github/workflows/publish-release.yml
diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml
new file mode 100644
index 0000000..b47c70a
--- /dev/null
+++ b/.github/workflows/publish-release.yml
@@ -0,0 +1,43 @@
+name: Publish Release
+
+on:
+ workflow_dispatch:
+
+jobs:
+ Ubuntu:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ id: checkout
+ uses: actions/checkout@v2.3.3
+ with:
+ token: ${{ secrets.WSO2_INTEGRATION_BOT_TOKEN }}
+ fetch-depth: 0
+ - name: Set up JDK 11
+ uses: joschi/setup-jdk@v2
+ with:
+ distribution: 'adopt'
+ java-version: 11
+ - name: Configure Maven settings file
+ run: |
+ mkdir -p ~/.m2
+ echo "
+
+
+ nexus-releases
+ ${{ secrets.NEXUS_USERNAME }}
+ ${{ secrets.NEXUS_PASSWORD }}
+
+
+ " > ~/.m2/settings.xml
+ - name: Configure git credentials
+ run: |
+ git config --global user.name ${{ secrets.WSO2_INTEGRATION_BOT_USERNAME }}
+ git config --global user.email ${{ secrets.WSO2_INTEGRATION_BOT_EMAIL }}
+ - name: Deploy artifacts with Maven
+ env:
+ GITHUB_TOKEN: ${{ secrets.WSO2_INTEGRATION_BOT_TOKEN }}
+ run: |
+ mvn --batch-mode release:prepare release:perform
From a0c9d1594a03494577c3947ed381e20451bd4810 Mon Sep 17 00:00:00 2001
From: Chinthaka Jayatilake <37581983+ChinthakaJ98@users.noreply.github.com>
Date: Tue, 3 Dec 2024 15:47:50 +0530
Subject: [PATCH 2/7] Update pom.xml for maven release
---
pom.xml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/pom.xml b/pom.xml
index 2f92417..91de39b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,6 +56,13 @@
+
+ org.apache.maven.plugins
+ maven-release-plugin
+
+ @{project.version}
+
+
org.apache.maven.plugins
maven-compiler-plugin
From 391b3e7d3ce92ca57a5bc08b1fae344b2d465531 Mon Sep 17 00:00:00 2001
From: Chinthaka Jayatilake <37581983+ChinthakaJ98@users.noreply.github.com>
Date: Tue, 3 Dec 2024 16:21:17 +0530
Subject: [PATCH 3/7] Update meta.json for connector store
---
.connector-store/meta.json | 118 +++++++++++++++++++++++++++++++++++++
1 file changed, 118 insertions(+)
diff --git a/.connector-store/meta.json b/.connector-store/meta.json
index e6744ce..eb9d319 100644
--- a/.connector-store/meta.json
+++ b/.connector-store/meta.json
@@ -1,10 +1,15 @@
{
"name": "SharePoint",
"owner": "WSO2",
+ "product": "MI",
"category": "Storage and Content Management",
"documentationUrl": "https://mi.docs.wso2.com/en/latest/reference/connectors/sharepoint-connector/sharepoint-overview/",
+ "mavenGroupId": "org.wso2.carbon.connector",
+ "mavenArtifactId": "org.wso2.carbon.connector.redis",
"description": "The sharePoint connector allows you to access the SharePoint REST API. SharePoint is a web application platform.SharePoint combines various functions which are traditionally separate applications: intranet, extranet, content management, document management, enterprise search, workflow management and web content management.",
"status": "Active",
+ "connectorRank": 52,
+ "type": "Connector",
"releases": [
{
"tagName": "v1.1.0",
@@ -12,6 +17,119 @@
"MI 4.3.0",
"MI 4.2.0"
],
+ "operations":[
+ {
+ "name":"init",
+ "description":"Config operation",
+ "isHidden":true
+ },
+ {
+ "name":"createFolder",
+ "description":"Create a new folder within the specified parent folder.",
+ "isHidden":false
+ },
+ {
+ "name":"createGroup",
+ "description":"Creates a new Microsoft 365 Group, which provisions a connected SharePoint site.",
+ "isHidden":false
+ },
+ {
+ "name":"createList",
+ "description":"Creates a new list in the specified site.",
+ "isHidden":false
+ },
+ {
+ "name":"createListItem",
+ "description":"Creates a new item in the specified list.",
+ "isHidden":false
+ },
+ {
+ "name":"deleteDriveItem",
+ "description":"Deletes the specified file or folder.",
+ "isHidden":false
+ },
+ {
+ "name":"deleteList",
+ "description":"Deletes the specified list.",
+ "isHidden":false
+ },
+ {
+ "name":"deleteListItem",
+ "description":"Deletes the specified list item.",
+ "isHidden":false
+ },
+ {
+ "name":"getDriveItemById",
+ "description":"Retrieves metadata about the specified file or folder.",
+ "isHidden":false
+ },
+ {
+ "name":"getFolderChildren",
+ "description":"Retrieves all items within the specified folder.",
+ "isHidden":false
+ },
+ {
+ "name":"getGroupSite",
+ "description":"Retrieves the root SharePoint site associated with the specified Microsoft 365 Group.",
+ "isHidden":false
+ },
+ {
+ "name":"getListById",
+ "description":"Retrieves a list by its ID or Title/Display name.",
+ "isHidden":false
+ },
+ {
+ "name":"getListItemById",
+ "description":"Retrieves a list item by its ID.",
+ "isHidden":false
+ },
+ {
+ "name":"getListItems",
+ "description":"Retrieves all items in the specified list.",
+ "isHidden":false
+ },
+ {
+ "name":"getLists",
+ "description":"Retrieves all lists in the specified site.",
+ "isHidden":false
+ },
+ {
+ "name":"getRootChildren",
+ "description":"Retrieves all items in the root directory of the drive.",
+ "isHidden":false
+ },
+ {
+ "name":"updateFileContent",
+ "description":"Updates the content of the specified file.",
+ "isHidden":false
+ },
+ {
+ "name":"updateFolder",
+ "description":"Updates the properties of the specified folder.",
+ "isHidden":false
+ },
+ {
+ "name":"updateList",
+ "description":"Updates properties of the specified list.",
+ "isHidden":false
+ },
+ {
+ "name":"updateListItemFields",
+ "description":"Updates the fields of the specified list item.",
+ "isHidden":false
+ },
+ {
+ "name":"uploadFile",
+ "description":"Uploads a new file to the specified folder.",
+ "isHidden":false
+ }
+ ],
+ "connections": [
+ {
+ "name": "sharepoint",
+ "description": "Connection for accessing SharePoint data and files."
+ }
+ ],
"isHidden": false
}
],
From 6072ef7aa145088f5c8e90c663d880a81dc61baa Mon Sep 17 00:00:00 2001
From: Chinthaka Jayatilake <37581983+ChinthakaJ98@users.noreply.github.com>
Date: Tue, 3 Dec 2024 21:45:56 +0530
Subject: [PATCH 4/7] Update connector metadata
---
.connector-store/meta.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.connector-store/meta.json b/.connector-store/meta.json
index eb9d319..3beb5d8 100644
--- a/.connector-store/meta.json
+++ b/.connector-store/meta.json
@@ -8,7 +8,7 @@
"mavenArtifactId": "org.wso2.carbon.connector.redis",
"description": "The sharePoint connector allows you to access the SharePoint REST API. SharePoint is a web application platform.SharePoint combines various functions which are traditionally separate applications: intranet, extranet, content management, document management, enterprise search, workflow management and web content management.",
"status": "Active",
- "connectorRank": 52,
+ "rank": 52,
"type": "Connector",
"releases": [
{
From b2f12e704e63cbd60f11ff93a893711c5f9a0aeb Mon Sep 17 00:00:00 2001
From: Chinthaka Jayatilake <37581983+ChinthakaJ98@users.noreply.github.com>
Date: Wed, 4 Dec 2024 20:35:34 +0530
Subject: [PATCH 5/7] Update maven groupId and artifactId
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 91de39b..2e368e5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,8 +23,8 @@
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- org.wso2.carbon.esb.connector
- sharepoint
+ org.wso2.integration.connector
+ mi-connector-sharepoint
1.1.0
WSO2 Carbon - Sharepoint Connector
From 12fd2d164b0a47f5ec294f27c017a56d6ea59711 Mon Sep 17 00:00:00 2001
From: Chinthaka Jayatilake <37581983+ChinthakaJ98@users.noreply.github.com>
Date: Thu, 5 Dec 2024 10:38:43 +0530
Subject: [PATCH 6/7] Update meta.json for connector store
---
.connector-store/meta.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.connector-store/meta.json b/.connector-store/meta.json
index 3beb5d8..6db6092 100644
--- a/.connector-store/meta.json
+++ b/.connector-store/meta.json
@@ -4,8 +4,8 @@
"product": "MI",
"category": "Storage and Content Management",
"documentationUrl": "https://mi.docs.wso2.com/en/latest/reference/connectors/sharepoint-connector/sharepoint-overview/",
- "mavenGroupId": "org.wso2.carbon.connector",
- "mavenArtifactId": "org.wso2.carbon.connector.redis",
+ "mavenGroupId": "org.wso2.integration.connector",
+ "mavenArtifactId": "mi-connector-sharepoint",
"description": "The sharePoint connector allows you to access the SharePoint REST API. SharePoint is a web application platform.SharePoint combines various functions which are traditionally separate applications: intranet, extranet, content management, document management, enterprise search, workflow management and web content management.",
"status": "Active",
"rank": 52,
From 8949a2a9e550f18b261829cb85c2935c378ab360 Mon Sep 17 00:00:00 2001
From: Chinthaka Jayatilake <37581983+ChinthakaJ98@users.noreply.github.com>
Date: Thu, 5 Dec 2024 12:03:36 +0530
Subject: [PATCH 7/7] Update workflow to add github release functionality
---
.github/workflows/publish-release.yml | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml
index b47c70a..1f25ecf 100644
--- a/.github/workflows/publish-release.yml
+++ b/.github/workflows/publish-release.yml
@@ -10,7 +10,6 @@ jobs:
steps:
- name: Checkout
- id: checkout
uses: actions/checkout@v2.3.3
with:
token: ${{ secrets.WSO2_INTEGRATION_BOT_TOKEN }}
@@ -20,6 +19,11 @@ jobs:
with:
distribution: 'adopt'
java-version: 11
+ - name: Extract project version
+ run: |
+ VERSION=$(grep -oPm1 "(?<=)[^<]+" pom.xml | sed 's/-SNAPSHOT$//')
+ VERSION_TAG="v$VERSION"
+ echo "VERSION_TAG=$VERSION_TAG" >> $GITHUB_ENV
- name: Configure Maven settings file
run: |
mkdir -p ~/.m2
@@ -36,8 +40,21 @@ jobs:
run: |
git config --global user.name ${{ secrets.WSO2_INTEGRATION_BOT_USERNAME }}
git config --global user.email ${{ secrets.WSO2_INTEGRATION_BOT_EMAIL }}
+ - name: Build artifacts
+ run: |
+ mvn clean install
- name: Deploy artifacts with Maven
env:
GITHUB_TOKEN: ${{ secrets.WSO2_INTEGRATION_BOT_TOKEN }}
run: |
- mvn --batch-mode release:prepare release:perform
+ mvn --batch-mode release:prepare release:perform -Dtag=${{ env.VERSION_TAG }}
+ - name: Create Github Release with Assets
+ env:
+ GITHUB_TOKEN: ${{ secrets.WSO2_INTEGRATION_BOT_TOKEN }}
+ run: |
+ find target/ -type f -name '*-SNAPSHOT.zip' -exec rm -f {} \;
+ gh release create "${{ env.VERSION_TAG }}" \
+ --repo="$GITHUB_REPOSITORY" \
+ --title="${{ env.VERSION_TAG }}" \
+ --generate-notes \
+ target/*.zip