Skip to content

Commit

Permalink
Merge pull request #53 from ChinthakaJ98/connector-release
Browse files Browse the repository at this point in the history
Update connector to enable a release workflow
  • Loading branch information
ChinthakaJ98 authored Dec 9, 2024
2 parents b0ac9cb + 33b2609 commit eb2463a
Show file tree
Hide file tree
Showing 3 changed files with 174 additions and 2 deletions.
105 changes: 105 additions & 0 deletions .connector-store/meta.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{
"name": "Amazon Simple Queue Service",
"owner": "WSO2",
"product": "MI",
"category": "Developer Tools",
"documentationUrl": "https://mi.docs.wso2.com/en/latest/reference/connectors/amazonsqs-connector/amazonsqs-connector-overview/",
"mavenGroupId": "org.wso2.integration.connector",
"mavenArtifactId": "mi-connector-amazonsqs",
"description": "Amazon SQS offers reliable and scalable hosted queues for storing messages as they travel between computers. By using Amazon SQS, you can move data between distributed components of your applications that perform different tasks without losing messages or requiring each component to be always available. The Amazon SQS connector for WSO2 EI uses the Amazon SQS API and allows you to send and receive messages, facilitating asynchronous messaging between integrated systems.",
"status": "Active",
"rank": 22,
"type": "Connector",
"labels": [
"integration",
"AWS",
Expand All @@ -19,6 +24,104 @@
"MI 4.1.0",
"MI 4.0.0"
],
"operations": [
{
"name":"init",
"description":"Config operation",
"isHidden":true
},
{
"name":"sendMessage",
"description":"Delivers a message to the specified queue",
"isHidden":false
},
{
"name":"sendMessageBatch",
"description":"Delivers batch messages to the specified queue",
"isHidden":false
},
{
"name":"receiveMessage",
"description":"Retrieves one or more messages from the specified queue",
"isHidden":false
},
{
"name":"changeMessageVisibility",
"description":"Changes the visibility timeout of a specified message in a queue",
"isHidden":false
},
{
"name":"changeMessageVisibilityBatch",
"description":"Changes the visibility timeout of multiple messages",
"isHidden":false
},
{
"name":"deleteMessage",
"description":"Deletes the specified message from the specified queue",
"isHidden":false
},
{
"name":"deleteMessageBatch",
"description":"Deletes multiple messages from the specified queue",
"isHidden":false
},
{
"name":"addPermission",
"description":"Adds a permission to a queue for a specific principal which allows access sharing to the queue",
"isHidden":false
},
{
"name":"removePermission",
"description":"Revokes any permissions in the queue policy",
"isHidden":false
},
{
"name":"createQueue",
"description":"Creates a new queue, or returns the URL of an existing one",
"isHidden":false
},
{
"name":"getQueueAttributes",
"description":"Gets attributes for the specified queue",
"isHidden":false
},
{
"name":"setQueueAttributes",
"description":"Sets the value of one or more queue attributes",
"isHidden":false
},
{
"name":"getQueueUrl",
"description":"Returns the URL of an existing queue",
"isHidden":false
},
{
"name":"listQueues",
"description":"Returns a list of queues",
"isHidden":false
},
{
"name":"deleteQueue",
"description":"Deletes the queue specified by the queue URL",
"isHidden":false
},
{
"name":"purgeQueue",
"description":"Deletes the messages in a queue specified by the queue URL",
"isHidden":false
},
{
"name":"listDeadLetterSourceQueues",
"description":"Returns a list of your queues that have the RedrivePolicy queue attribute",
"isHidden":false
}
],
"connections": [
{
"name": "amazonsqs",
"description": "Connection for interacting with Amazon SQS queues."
}
],
"isHidden": false
},
{
Expand All @@ -30,6 +133,8 @@
"MI 4.1.0",
"MI 4.0.0"
],
"operations": [],
"connections": [],
"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
11 changes: 9 additions & 2 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.amazonsqs</artifactId>
<groupId>org.wso2.integration.connector</groupId>
<artifactId>mi-connector-amazonsqs</artifactId>
<packaging>jar</packaging>
<version>2.0.1</version>
<name>WSO2 Carbon - Mediation Library Connector For amazonsqs</name>
Expand Down Expand Up @@ -215,6 +215,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 Down

0 comments on commit eb2463a

Please sign in to comment.