From f86064e8580ce0e86666b8997db4d0c23030b4b0 Mon Sep 17 00:00:00 2001 From: Chinthaka Jayatilake <37581983+ChinthakaJ98@users.noreply.github.com> Date: Mon, 2 Dec 2024 18:01:35 +0530 Subject: [PATCH 1/9] 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 3b78eb15b1f8ab38e6e0fe81ebdb40c2df5c8ee4 Mon Sep 17 00:00:00 2001 From: Chinthaka Jayatilake <37581983+ChinthakaJ98@users.noreply.github.com> Date: Tue, 3 Dec 2024 20:22:46 +0530 Subject: [PATCH 2/9] Update pom.xml for maven release --- pom.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6fda657..da199fb 100644 --- a/pom.xml +++ b/pom.xml @@ -241,6 +241,13 @@ + + org.apache.maven.plugins + maven-release-plugin + + @{project.version} + + org.apache.maven.plugins maven-compiler-plugin @@ -257,7 +264,7 @@ email-library compile - attached + single ${connector.name}-connector-${version} From fb990e9b1236d2ffe98f6fded1987909fd32ed51 Mon Sep 17 00:00:00 2001 From: Chinthaka Jayatilake <37581983+ChinthakaJ98@users.noreply.github.com> Date: Tue, 3 Dec 2024 20:28:00 +0530 Subject: [PATCH 3/9] Update meta.json for connector store --- .connector-store/meta.json | 113 +++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/.connector-store/meta.json b/.connector-store/meta.json index b7fb147..79f6af4 100644 --- a/.connector-store/meta.json +++ b/.connector-store/meta.json @@ -1,10 +1,15 @@ { "name": "SalesforceBulk", "owner": "WSO2", + "product": "MI", "category": "Customer Relationship Management", "documentationUrl": "https://mi.docs.wso2.com/en/latest/reference/connectors/salesforce-connectors/salesforcebulk-v2-reference/", + "mavenGroupId": "org.wso2.carbon.connector", + "mavenArtifactId": "org.wso2.carbon.connector.salesforcebulk", "description": "The SalesforceBulk connector allows you to access the SalesforceBulk REST API through WSO2 ESB. SalesforceBulk is a RESTful API that is optimal for loading or deleting large sets of data. You can use it to query, insert, update, upsert, or delete a large number of records asynchronously by submitting batches that Salesforce processes in the background.", "status": "Active", + "connectorRank": 9, + "type": "Connector", "labels": [ "salesforce" ], @@ -18,6 +23,114 @@ "MI 4.1.0", "MI 4.0.0" ], + "operations": [ + { + "name":"init", + "description":"Init operation", + "isHidden":true + }, + { + "name":"callBulkApi", + "description":"Call Salesforce Bulk API endpoints", + "isHidden":true + }, + { + "name":"callUsingOauth", + "description":"Call endpoint using OAUTH credentials", + "isHidden":true + }, + { + "name":"callUsingAccessToken", + "description":"Call endpoint using OAUTH access token", + "isHidden":true + }, + { + "name":"createJob", + "description":"A operation to create a job in Salesforce using bulk api 2.0", + "isHidden":false + }, + { + "name":"uploadJobData", + "description":"An operation to upload data to a job in Salesforce using bulk api 2.0", + "isHidden":false + }, + { + "name":"closeJob", + "description":"An operation to close a job in Salesforce using bulk api 2.0", + "isHidden":false + }, + { + "name":"abortJob", + "description":"An operation to abort a job in Salesforce using bulk api 2.0", + "isHidden":false + }, + { + "name":"getAllJobInfo", + "description":"An operation to get all job info in Salesforce using bulk api 2.0", + "isHidden":false + }, + { + "name":"getJobInfo", + "description":"An operation to get job info in Salesforce using bulk api 2.0", + "isHidden":false + }, + { + "name":"deleteJob", + "description":"An operation to delete a job in Salesforce using bulk api 2.0", + "isHidden":false + }, + { + "name":"getSuccessfulResults", + "description":"An operation to get successful results of a job in Salesforce using bulk api 2.0", + "isHidden":false + }, + { + "name":"getUnprocessedResults", + "description":"An operation to get unprocessed results of a job in Salesforce using bulk api 2.0", + "isHidden":false + }, + { + "name":"getFailedResults", + "description":"An operation to get failed results of a job in Salesforce using bulk api 2.0", + "isHidden":false + }, + { + "name":"abortQueryJob", + "description":"An operation to abort a running query job in Salesforce using bulk api 2.0", + "isHidden":false + }, + { + "name":"createQueryJob", + "description":"An operation to create a new query job in Salesforce using bulk api 2.0", + "isHidden":false + }, + { + "name":"deleteQueryJob", + "description":"An operation to delete a query job in Salesforce using bulk api 2.0", + "isHidden":false + }, + { + "name":"getQueryJobInfo", + "description":"An operation to get information about a query job in Salesforce using bulk api 2.0", + "isHidden":false + }, + { + "name":"getQueryJobResults", + "description":"An operation to get the results of a query job in Salesforce using bulk api 2.0", + "isHidden":false + }, + { + "name":"getAllQueryJobInfo", + "description":"An operation to get the information of all the query jobs in Salesforce using bulk api 2.0", + "isHidden":false + } + ], + "connections": [ + { + "name": "init", + "description": "Connection for bulk data operations in Salesforce." + } + ], "isHidden": false } ] From c697884e5b3062f1dd8dde5330f603099812fb81 Mon Sep 17 00:00:00 2001 From: Chinthaka Jayatilake <37581983+ChinthakaJ98@users.noreply.github.com> Date: Tue, 3 Dec 2024 21:32:25 +0530 Subject: [PATCH 4/9] 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 79f6af4..a3b8790 100644 --- a/.connector-store/meta.json +++ b/.connector-store/meta.json @@ -8,7 +8,7 @@ "mavenArtifactId": "org.wso2.carbon.connector.salesforcebulk", "description": "The SalesforceBulk connector allows you to access the SalesforceBulk REST API through WSO2 ESB. SalesforceBulk is a RESTful API that is optimal for loading or deleting large sets of data. You can use it to query, insert, update, upsert, or delete a large number of records asynchronously by submitting batches that Salesforce processes in the background.", "status": "Active", - "connectorRank": 9, + "rank": 9, "type": "Connector", "labels": [ "salesforce" From a34ae3e3cf9346fa98110b158b71a7a0b0f987ba Mon Sep 17 00:00:00 2001 From: Chinthaka Jayatilake <37581983+ChinthakaJ98@users.noreply.github.com> Date: Thu, 5 Dec 2024 11:28:17 +0530 Subject: [PATCH 5/9] 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 From 5a5f7b548ed5f52badca149a8899a35452a29ef7 Mon Sep 17 00:00:00 2001 From: Chinthaka Jayatilake <37581983+ChinthakaJ98@users.noreply.github.com> Date: Thu, 5 Dec 2024 20:29:15 +0530 Subject: [PATCH 6/9] Update meta.json for connector store --- .connector-store/meta.json | 96 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 92 insertions(+), 4 deletions(-) diff --git a/.connector-store/meta.json b/.connector-store/meta.json index a3b8790..fcf34ce 100644 --- a/.connector-store/meta.json +++ b/.connector-store/meta.json @@ -4,8 +4,8 @@ "product": "MI", "category": "Customer Relationship Management", "documentationUrl": "https://mi.docs.wso2.com/en/latest/reference/connectors/salesforce-connectors/salesforcebulk-v2-reference/", - "mavenGroupId": "org.wso2.carbon.connector", - "mavenArtifactId": "org.wso2.carbon.connector.salesforcebulk", + "mavenGroupId": "org.wso2.integration.connector", + "mavenArtifactId": "mi-connector-salesforcebulk", "description": "The SalesforceBulk connector allows you to access the SalesforceBulk REST API through WSO2 ESB. SalesforceBulk is a RESTful API that is optimal for loading or deleting large sets of data. You can use it to query, insert, update, upsert, or delete a large number of records asynchronously by submitting batches that Salesforce processes in the background.", "status": "Active", "rank": 9, @@ -127,11 +127,99 @@ ], "connections": [ { - "name": "init", + "name": "salesforcebulk", + "description": "Connection for bulk data operations in Salesforce." + } + ], + "isHidden": false + }, + { + "tagName": "v1.0.7", + "products": [ + "MI 1.2.0", + "MI 4.3.0", + "MI 4.2.0", + "MI 4.1.0", + "MI 4.0.0" + ], + "operations": [ + { + "name":"init", + "description":"Config operation.", + "isHidden":false + }, + { + "name":"callWithRetry", + "description":"Templating the retry call", + "isHidden":false + }, + { + "name":"callOptions", + "description":"Templating the http call types GET, POST, etc.", + "isHidden":false + }, + { + "name":"createJob", + "description":"Create a new job.", + "isHidden":false + }, + { + "name":"updateJob", + "description":"Update an existing job.", + "isHidden":false + }, + { + "name":"getJob", + "description":"Get all details for an existing job.", + "isHidden":false + }, + { + "name":"addBatch", + "description":"Add a new batch to a job.", + "isHidden":false + }, + { + "name":"getBatchStatus", + "description":"Check the status of an individual batch.", + "isHidden":false + }, + { + "name":"getBatchResults", + "description":"Get results of an existing.", + "isHidden":false + }, + { + "name":"getBatchRequest", + "description":"Get an existing batch request.", + "isHidden":false + }, + { + "name":"listBatches", + "description":"Get information about all batches in a job.", + "isHidden":false + }, + { + "name":"getBulkQueryResults", + "description":"Get the results of the query.", + "isHidden":false + }, + { + "name":"createJobToUploadBatchFile", + "description":"Create a job for batches containing Attachment records.", + "isHidden":false + }, + { + "name":"uploadBatchFile", + "description":"Create a batch of Attachment records.", + "isHidden":false + } + ], + "connections": [ + { + "name": "salesforcebulk", "description": "Connection for bulk data operations in Salesforce." } ], "isHidden": false - } ] } From 46c6de68bc1784b69233ff3f309b9ed9ae29fefc Mon Sep 17 00:00:00 2001 From: Chinthaka Jayatilake <37581983+ChinthakaJ98@users.noreply.github.com> Date: Thu, 5 Dec 2024 20:37:04 +0530 Subject: [PATCH 7/9] Update maven groupId and artifactId --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index da199fb..55b853d 100644 --- a/pom.xml +++ b/pom.xml @@ -19,8 +19,8 @@ 4.0.0 - org.wso2.carbon.connector - org.wso2.carbon.connector.salesforcebulk + org.wso2.integration.connector + mi-connector-salesforcebulk jar 1.1.1-SNAPSHOT WSO2 Carbon - Mediation Library Connector For Salesforcebulk From 857d656a968cb006d3a18afe0ce10e0bb20eac75 Mon Sep 17 00:00:00 2001 From: Chinthaka Jayatilake <37581983+ChinthakaJ98@users.noreply.github.com> Date: Thu, 5 Dec 2024 20:49:13 +0530 Subject: [PATCH 8/9] Update meta.json --- .connector-store/meta.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.connector-store/meta.json b/.connector-store/meta.json index fcf34ce..e872b47 100644 --- a/.connector-store/meta.json +++ b/.connector-store/meta.json @@ -221,5 +221,6 @@ } ], "isHidden": false + } ] } From 4719d99dbe3d4bb2f8d1f062c025b9d5e87ed55f Mon Sep 17 00:00:00 2001 From: Chinthaka Jayatilake <37581983+ChinthakaJ98@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:37:26 +0530 Subject: [PATCH 9/9] Update tag name --- .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 e872b47..985d180 100644 --- a/.connector-store/meta.json +++ b/.connector-store/meta.json @@ -134,7 +134,7 @@ "isHidden": false }, { - "tagName": "v1.0.7", + "tagName": "org.wso2.carbon.connector.salesforcebulk-1.0.7", "products": [ "MI 1.2.0", "MI 4.3.0",