-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit aace115
Showing
26 changed files
with
776 additions
and
0 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,9 @@ | ||
# | ||
# 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 | ||
|
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,7 @@ | ||
# 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/ | ||
|
||
# These owners will be the default owners for everything in the repo. | ||
* @NipunaRanasinghe @ayeshLK |
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,19 @@ | ||
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-standard-library/.github/workflows/build-with-bal-test-graalvm-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
additional-build-flags: "-x :guidewire.insnow-examples: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,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-standard-library/.github/workflows/build-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
repo-name: module-ballerinax-guidewire.insnow |
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-standard-library/.github/workflows/daily-build-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
repo-name: module-ballerinax-guidewire.insnow |
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,22 @@ | ||
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-standard-library/.github/workflows/dev-stage-central-publish-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
environment: ${{ github.event.inputs.environment }} | ||
additional-publish-flags: "-x :guidewire.insnow-examples: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,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-standard-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-standard-library/.github/workflows/release-package-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
package-name: guidewire.insnow | ||
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,15 @@ | ||
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-standard-library/.github/workflows/trivy-scan-template.yml@main | ||
secrets: inherit | ||
with: | ||
additional-build-flags: "-x :guidewire.insnow-examples: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,5 @@ | ||
# Ignore Gradle project-specific cache directory | ||
.gradle | ||
|
||
# Ignore Gradle build output directory | ||
build |
Empty file.
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 @@ | ||
[package] | ||
org = "ayesh" | ||
name = "guidewire.insnow" | ||
version = "0.1.0" | ||
distribution = "2201.8.6" | ||
|
||
[build-options] | ||
observabilityIncluded = true |
Empty file.
Empty file.
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.org) All Rights Reserved. | ||
* | ||
* 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 = 'Guidewire InsuranceNow - Ballerina' | ||
|
||
def packageName = "guidewire.insnow" | ||
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.8.5" | ||
org = "ballerinax" | ||
name = "guidewire.insnow" | ||
version = "@toml.version@" | ||
license = ["Apache-2.0"] | ||
authors = ["Ballerina"] | ||
keywords = ["Insurance", "Guidewire", "Cloud API"] | ||
icon = "icon.png" | ||
repository = "https://github.com/ballerina-platform/module-ballerinax-guidewire.insnow" | ||
|
||
[build-options] | ||
observabilityIncluded = false | ||
|
||
[platform.java17] | ||
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,77 @@ | ||
/* | ||
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com) All Rights Reserved. | ||
* | ||
* 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. | ||
*/ | ||
|
||
plugins { | ||
id 'com.github.spotbugs-base' | ||
id 'com.github.johnrengelman.shadow' | ||
id 'de.undercouch.download' | ||
id 'net.researchgate.release' | ||
} | ||
|
||
allprojects { | ||
group = project.group | ||
version = project.version | ||
|
||
apply plugin: 'maven-publish' | ||
|
||
repositories { | ||
mavenLocal() | ||
maven { | ||
url = 'https://maven.wso2.org/nexus/content/repositories/releases/' | ||
} | ||
|
||
maven { | ||
url = 'https://maven.wso2.org/nexus/content/groups/wso2-public/' | ||
} | ||
|
||
maven { | ||
url = 'https://repo.maven.apache.org/maven2' | ||
} | ||
|
||
maven { | ||
url = 'https://maven.pkg.github.com/ballerina-platform/*' | ||
credentials { | ||
username System.getenv("packageUser") | ||
password System.getenv("packagePAT") | ||
} | ||
} | ||
} | ||
|
||
ext { | ||
snapshotVersion = '-SNAPSHOT' | ||
timestampedVersionRegex = '.*-\\d{8}-\\d{6}-\\w.*\$' | ||
} | ||
} | ||
|
||
def moduleVersion = project.version.replace("-SNAPSHOT", "") | ||
|
||
task build { | ||
dependsOn(':guidewire.insnow-ballerina:build') | ||
dependsOn(':guidewire.insnow-examples:build') | ||
} | ||
|
||
release { | ||
buildTasks = ['build'] | ||
failOnSnapshotDependencies = true | ||
versionPropertyFile = 'gradle.properties' | ||
tagTemplate = 'v${version}' | ||
git { | ||
requireBranch = "release-${moduleVersion}" | ||
pushToRemote = 'origin' | ||
} | ||
} |
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 @@ | ||
org.gradle.caching=true | ||
group=io.ballerina.lib | ||
version=0.1.0-SNAPSHOT | ||
|
||
checkstylePluginVersion=10.12.0 | ||
spotbugsPluginVersion=5.0.14 | ||
shadowJarPluginVersion=8.1.1 | ||
downloadPluginVersion=5.4.0 | ||
releasePluginVersion=2.8.0 | ||
testngVersion=7.6.1 | ||
eclipseLsp4jVersion=0.12.0 | ||
ballerinaGradlePluginVersion=2.2.1 | ||
ballerinaLangVersion=2201.8.6 |
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,2 @@ | ||
# This file was generated by the Gradle 'init' task. | ||
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format |
Binary file not shown.
Oops, something went wrong.