-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ballerina-platform#1 from ballerina-platform/apply…
…-templates-79 Add Generated Connector Template (Standard)
- Loading branch information
Showing
32 changed files
with
1,129 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# | ||
# Linux start script should use lf | ||
/gradlew text eol=lf | ||
|
||
# These are Windows script files and should use crlf | ||
*.bat text eol=crlf |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Lines starting with '#' are comments. | ||
# Each line is a file pattern followed by one or more owners. | ||
|
||
# See: https://help.github.com/articles/about-codeowners/ | ||
|
||
# TODO: Add code owners | ||
# These owners will be the default owners for everything in the repo. | ||
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## Purpose | ||
|
||
## Examples | ||
|
||
## Checklist | ||
- [ ] Linked to an issue | ||
- [ ] Updated the changelog | ||
- [ ] Added tests | ||
- [ ] Updated the spec | ||
- [ ] Checked native-image compatibility |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: GraalVM Check | ||
|
||
on: | ||
schedule: | ||
- cron: "30 18 * * *" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
call_stdlib_workflow: | ||
name: Run StdLib Workflow | ||
if: ${{ github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'ballerina-platform') }} | ||
uses: ballerina-platform/ballerina-library/.github/workflows/build-with-bal-test-graalvm-connector-template.yml@main | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- 2201.[0-9]+.x | ||
repository_dispatch: | ||
types: check_connector_for_breaking_changes | ||
|
||
jobs: | ||
call_workflow: | ||
name: Run Connector Build Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-library/.github/workflows/build-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
repo-name: module-ballerinax-hubspot.crm.commerce.quotes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Daily build | ||
|
||
on: | ||
schedule: | ||
- cron: "30 2 * * *" | ||
|
||
jobs: | ||
call_workflow: | ||
name: Run Daily Build Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-library/.github/workflows/daily-build-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
repo-name: module-ballerinax-hubspot.crm.commerce.quotes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Publish to the Ballerina Dev\Stage Central | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
type: choice | ||
description: Select Environment | ||
required: true | ||
options: | ||
- DEV CENTRAL | ||
- STAGE CENTRAL | ||
|
||
jobs: | ||
call_workflow: | ||
name: Run Dev\Stage Central Publish Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-library/.github/workflows/dev-stage-central-publish-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
environment: ${{ github.event.inputs.environment }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: PR Build | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
call_workflow: | ||
name: Run PR Build Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-library/.github/workflows/pr-build-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
additional-test-flags: ${{ github.event.pull_request.head.repo.full_name != github.repository && '-x test' || ''}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Publish Release | ||
|
||
on: | ||
workflow_dispatch: | ||
repository_dispatch: | ||
types: [ stdlib-release-pipeline ] | ||
|
||
jobs: | ||
call_workflow: | ||
name: Run Release Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-library/.github/workflows/release-package-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
package-name: hubspot.crm.commerce.quotes | ||
package-org: ballerinax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Trivy | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "30 20 * * *" | ||
|
||
jobs: | ||
call_workflow: | ||
name: Run Trivy Scan Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-library/.github/workflows/trivy-scan-template.yml@main | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
distribution = "2201.10.0" | ||
org = "ballerinax" | ||
name = "hubspot.crm.commerce.quotes" | ||
version = "1.0.0" | ||
license = ["Apache-2.0"] | ||
authors = ["Ballerina"] | ||
keywords = [] | ||
# icon = "icon.png" # TODO: update icon.png | ||
repository = "https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.commerce.quotes" | ||
|
||
[build-options] | ||
observabilityIncluded = true | ||
|
||
[platform.java21] | ||
graalvmCompatible = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## Overview | ||
|
||
[//]: # (TODO: Add overview mentioning the purpose of the module, supported REST API versions, and other high-level details.) | ||
|
||
## Setup guide | ||
|
||
[//]: # (TODO: Add detailed steps to obtain credentials and configure the module.) | ||
|
||
## Quickstart | ||
|
||
[//]: # (TODO: Add a quickstart guide to demonstrate a basic functionality of the module, including sample code snippets.) | ||
|
||
## Examples | ||
|
||
The `HubSpot CRM Commerce Quotes` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/module-ballerinax-hubspot.crm.commerce.quotes/tree/main/examples/), covering the following use cases: | ||
|
||
[//]: # (TODO: Add examples) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## Overview | ||
|
||
[//]: # (TODO: Add overview mentioning the purpose of the module, supported REST API versions, and other high-level details.) | ||
|
||
## Setup guide | ||
|
||
[//]: # (TODO: Add detailed steps to obtain credentials and configure the module.) | ||
|
||
## Quickstart | ||
|
||
[//]: # (TODO: Add a quickstart guide to demonstrate a basic functionality of the module, including sample code snippets.) | ||
|
||
## Examples | ||
|
||
The `HubSpot CRM Commerce Quotes` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/module-ballerinax-hubspot.crm.commerce.quotes/tree/main/examples/), covering the following use cases: | ||
|
||
[//]: # (TODO: Add examples) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
/* | ||
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). | ||
* | ||
* WSO2 LLC. licenses this file to you under the Apache License, | ||
* Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import org.apache.tools.ant.taskdefs.condition.Os | ||
|
||
plugins { | ||
id 'io.ballerina.plugin' | ||
} | ||
|
||
description = 'HubSpot CRM Commerce Quotes - Ballerina' | ||
|
||
def packageName = "hubspot.crm.commerce.quotes" | ||
def packageOrg = "ballerinax" | ||
def tomlVersion = stripBallerinaExtensionVersion("${project.version}") | ||
def ballerinaTomlFilePlaceHolder = new File("${project.rootDir}/build-config/resources/Ballerina.toml") | ||
def ballerinaTomlFile = new File("$project.projectDir/Ballerina.toml") | ||
|
||
def stripBallerinaExtensionVersion(String extVersion) { | ||
if (extVersion.matches(project.ext.timestampedVersionRegex)) { | ||
def splitVersion = extVersion.split('-') | ||
if (splitVersion.length > 3) { | ||
def strippedValues = splitVersion[0..-4] | ||
return strippedValues.join('-') | ||
} else { | ||
return extVersion | ||
} | ||
} else { | ||
return extVersion.replace("${project.ext.snapshotVersion}", "") | ||
} | ||
} | ||
|
||
ballerina { | ||
packageOrganization = packageOrg | ||
module = packageName | ||
testCoverageParam = "--code-coverage --coverage-format=xml" | ||
isConnector = true | ||
platform = "any" | ||
} | ||
|
||
task updateTomlFiles { | ||
doLast { | ||
def newBallerinaToml = ballerinaTomlFilePlaceHolder.text.replace("@project.version@", project.version) | ||
newBallerinaToml = newBallerinaToml.replace("@toml.version@", tomlVersion) | ||
ballerinaTomlFile.text = newBallerinaToml | ||
} | ||
} | ||
|
||
task commitTomlFiles { | ||
doLast { | ||
project.exec { | ||
ignoreExitValue true | ||
if (Os.isFamily(Os.FAMILY_WINDOWS)) { | ||
commandLine 'cmd', '/c', "git commit -m \"[Automated] Update the toml files\" Ballerina.toml Dependencies.toml" | ||
} else { | ||
commandLine 'sh', '-c', "git commit -m '[Automated] Update the toml files' Ballerina.toml Dependencies.toml" | ||
} | ||
} | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
artifact source: createArtifactZip, extension: 'zip' | ||
} | ||
} | ||
repositories { | ||
maven { | ||
name = "GitHubPackages" | ||
url = uri("https://maven.pkg.github.com/ballerina-platform/module-${packageOrg}-${packageName}") | ||
credentials { | ||
username = System.getenv("publishUser") | ||
password = System.getenv("publishPAT") | ||
} | ||
} | ||
} | ||
} | ||
|
||
clean { | ||
delete 'build' | ||
} | ||
|
||
build.dependsOn "generatePomFileForMavenPublication" | ||
publishToMavenLocal.dependsOn build | ||
publish.dependsOn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). | ||
// | ||
// WSO2 LLC. licenses this file to you under the Apache License, | ||
// Version 2.0 (the "License"); you may not use this file except | ||
// in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
distribution = "2201.10.0" | ||
org = "ballerinax" | ||
name = "hubspot.crm.commerce.quotes" | ||
version = "@toml.version@" | ||
license = ["Apache-2.0"] | ||
authors = ["Ballerina"] | ||
keywords = [] # TODO: Add keywords | ||
# icon = "icon.png" # TODO: Add icon | ||
repository = "https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.commerce.quotes" | ||
|
||
[build-options] | ||
observabilityIncluded = true | ||
|
||
[platform.java21] | ||
graalvmCompatible = true |
Oops, something went wrong.