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

Update connector to enable a release workflow #50

Merged
merged 9 commits into from
Dec 9, 2024
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
202 changes: 202 additions & 0 deletions .connector-store/meta.json
Original file line number Diff line number Diff line change
@@ -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.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,
"type": "Connector",
"labels": [
"salesforce"
],
Expand All @@ -18,6 +23,203 @@
"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": "salesforcebulk",
"description": "Connection for bulk data operations in Salesforce."
}
],
"isHidden": false
},
ChinthakaJ98 marked this conversation as resolved.
Show resolved Hide resolved
{
"tagName": "org.wso2.carbon.connector.salesforcebulk-1.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
}
]
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Publish Release

on:
workflow_dispatch:

jobs:
Ubuntu:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/[email protected]
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: Extract project version
run: |
VERSION=$(grep -oPm1 "(?<=<version>)[^<]+" 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
echo "<settings>
<servers>
<server>
<id>nexus-releases</id>
<username>${{ secrets.NEXUS_USERNAME }}</username>
<password>${{ secrets.NEXUS_PASSWORD }}</password>
</server>
</servers>
</settings>" > ~/.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: 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 -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
13 changes: 10 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.connector</groupId>
<artifactId>org.wso2.carbon.connector.salesforcebulk</artifactId>
<groupId>org.wso2.integration.connector</groupId>
<artifactId>mi-connector-salesforcebulk</artifactId>
<packaging>jar</packaging>
<version>1.1.1-SNAPSHOT</version>
<name>WSO2 Carbon - Mediation Library Connector For Salesforcebulk</name>
Expand Down Expand Up @@ -241,6 +241,13 @@
</scm>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand All @@ -257,7 +264,7 @@
<id>email-library</id>
<phase>compile</phase>
<goals>
<goal>attached</goal>
<goal>single</goal>
</goals>
<configuration>
<finalName>${connector.name}-connector-${version}</finalName>
Expand Down