-
Notifications
You must be signed in to change notification settings - Fork 2
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 #1 from TharmiganK/dev
Add initial files
- Loading branch information
Showing
27 changed files
with
1,058 additions
and
73 deletions.
There are no files selected for viewing
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,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. | ||
* @daneshk @TharmiganK |
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,24 @@ | ||
--- | ||
name: "Bug Report" | ||
about: "Report a bug if something is not working as expected" | ||
labels: 'Type/Bug' | ||
|
||
--- | ||
|
||
**Description:** | ||
<!-- Give a brief description of the bug --> | ||
|
||
**Steps to reproduce:** | ||
|
||
**Affected Versions:** | ||
|
||
**OS, DB, other environment details and versions:** | ||
|
||
**Related Issues (optional):** | ||
<!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. --> | ||
|
||
**Suggested Labels (optional):** | ||
<!-- Optional comma separated list of suggested labels. Non committers can’t assign labels to issues, so this will help issue creators who are not a committer to suggest possible labels--> | ||
|
||
**Suggested Assignees (optional):** | ||
<!--Optional comma separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, so this will help issue creators who are not a committer to suggest possible assignees--> |
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: "Improvement Request" | ||
about: "Create an improvement request for an existing feature" | ||
labels: 'Type/Improvement' | ||
|
||
--- | ||
|
||
**Description:** | ||
<!-- Give a brief description of the improvement --> | ||
|
||
**Describe your problem(s)** | ||
|
||
**Describe your solution(s)** | ||
|
||
**Related Issues (optional):** | ||
<!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. --> | ||
|
||
**Suggested Labels (optional):** | ||
<!-- Optional comma separated list of suggested labels. Non committers can’t assign labels to issues, so this will help issue creators who are not a committer to suggest possible labels--> | ||
|
||
**Suggested Assignees (optional):** | ||
<!--Optional comma separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, so this will help issue creators who are not a committer to suggest possible assignees--> |
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: "New Feature Request" | ||
about: "Create a new feature request" | ||
labels: 'Type/NewFeature' | ||
|
||
--- | ||
|
||
**Description:** | ||
<!-- Give a brief description of the new feature --> | ||
|
||
**Describe your problem(s)** | ||
|
||
**Describe your solution(s)** | ||
|
||
**Related Issues (optional):** | ||
<!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. --> | ||
|
||
**Suggested Labels (optional):** | ||
<!-- Optional comma separated list of suggested labels. Non committers can’t assign labels to issues, so this will help issue creators who are not a committer to suggest possible labels--> | ||
|
||
**Suggested Assignees (optional):** | ||
<!--Optional comma separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, so this will help issue creators who are not a committer to suggest possible assignees--> |
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 |
---|---|---|
@@ -1,18 +1,20 @@ | ||
**Description:** | ||
<!-- Give a brief description of the issue --> | ||
|
||
**Suggested Labels:** | ||
<!-- Optional comma separated list of suggested labels. Non committers can’t assign labels to issues, so this will help issue creators who are not a committer to suggest possible labels--> | ||
|
||
**Suggested Assignees:** | ||
<!--Optional comma separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, so this will help issue creators who are not a committer to suggest possible assignees--> | ||
|
||
**Affected Product Version:** | ||
|
||
**OS, DB, other environment details and versions:** | ||
|
||
**Steps to reproduce:** | ||
|
||
|
||
**Related Issues:** | ||
<!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. --> | ||
--- | ||
name: "Task" | ||
about: "Create a task which you want to keep track" | ||
labels: 'Type/Task' | ||
|
||
--- | ||
|
||
**Description:** | ||
<!-- Give a brief description of the task --> | ||
|
||
**Describe your task(s)** | ||
|
||
**Related Issues (optional):** | ||
<!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. --> | ||
|
||
**Suggested Labels (optional):** | ||
<!-- Optional comma separated list of suggested labels. Non committers can’t assign labels to issues, so this will help issue creators who are not a committer to suggest possible labels--> | ||
|
||
**Suggested Assignees (optional):** | ||
<!--Optional comma separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, so this will help issue creators who are not a committer to suggest possible assignees--> |
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,12 @@ | ||
## Purpose | ||
|
||
Fixes: | ||
|
||
## Examples | ||
|
||
## Checklist | ||
- [ ] Linked to an issue | ||
- [ ] Updated the specification | ||
- [ ] Updated the changelog | ||
- [ ] Added tests | ||
- [ ] 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,78 @@ | ||
name: Publish to the Ballerina central | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
type: choice | ||
description: Select environment | ||
required: true | ||
options: | ||
- CENTRAL | ||
- DEV CENTRAL | ||
- STAGE CENTRAL | ||
|
||
jobs: | ||
publish-release: | ||
runs-on: ubuntu-latest | ||
if: github.repository_owner == 'ballerina-platform' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 11 | ||
- name: Build with Gradle | ||
env: | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.GITHUB_TOKEN }} | ||
run: ./gradlew build -x check -x test | ||
- name: Create lib directory if not exists | ||
run: mkdir -p ballerina/lib | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
scan-type: 'rootfs' | ||
scan-ref: '/github/workspace/ballerina/lib' | ||
format: 'table' | ||
timeout: '10m0s' | ||
exit-code: '1' | ||
|
||
- name: Ballerina Central Push | ||
if: ${{ github.event.inputs.environment == 'CENTRAL' }} | ||
env: | ||
BALLERINA_DEV_CENTRAL: false | ||
BALLERINA_STAGE_CENTRAL: false | ||
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_ACCESS_TOKEN }} | ||
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }} | ||
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }} | ||
run: | | ||
./gradlew clean build -PpublishToCentral=true | ||
- name: Ballerina Central Dev Push | ||
if: ${{ github.event.inputs.environment == 'DEV CENTRAL' }} | ||
env: | ||
BALLERINA_DEV_CENTRAL: true | ||
BALLERINA_STAGE_CENTRAL: false | ||
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }} | ||
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }} | ||
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }} | ||
run: | | ||
sed -i 's/version=\(.*\)-SNAPSHOT/version=\1/g' gradle.properties | ||
./gradlew clean build -PpublishToCentral=true | ||
- name: Ballerina Central Stage Push | ||
if: ${{ github.event.inputs.environment == 'STAGE CENTRAL' }} | ||
env: | ||
BALLERINA_DEV_CENTRAL: false | ||
BALLERINA_STAGE_CENTRAL: true | ||
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_STAGE_ACCESS_TOKEN }} | ||
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }} | ||
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }} | ||
run: | | ||
sed -i 's/version=\(.*\)-SNAPSHOT/version=\1/g' gradle.properties | ||
./gradlew clean build -PpublishToCentral=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,67 @@ | ||
# Test cases are disabled in this driver. It is recommended to test the driver with Staging Central and Dev Central | ||
# before publishing to Ballerina Central. | ||
name: Publish release | ||
|
||
on: | ||
workflow_dispatch: | ||
repository_dispatch: | ||
types: [ stdlib-release-pipeline ] | ||
|
||
jobs: | ||
publish-release: | ||
runs-on: ubuntu-latest | ||
if: github.repository_owner == 'ballerina-platform' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 11 | ||
- name: Build with Gradle | ||
env: | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --global user.name ${{ secrets.BALLERINA_BOT_USERNAME }} | ||
git config --global user.email ${{ secrets.BALLERINA_BOT_EMAIL }} | ||
./gradlew build -x check -x test | ||
- name: Create lib directory if not exists | ||
run: mkdir -p ballerina/lib | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
scan-type: 'rootfs' | ||
scan-ref: '/github/workspace/ballerina/lib' | ||
format: 'table' | ||
timeout: '10m0s' | ||
exit-code: '1' | ||
- name: Set version env variable | ||
run: echo "VERSION=$((grep -w 'version' | cut -d= -f2) < gradle.properties | rev | cut --complement -d- -f1 | rev)" >> $GITHUB_ENV | ||
- name: Pre release dependency version update | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }} | ||
run: | | ||
echo "Version: ${VERSION}" | ||
git checkout -b release-${VERSION} | ||
git add gradle.properties | ||
git commit -m "Move dependencies to stable version" || echo "No changes to commit" | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Publish artifact | ||
env: | ||
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_ACCESS_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }} | ||
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }} | ||
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }} | ||
publishUser: ${{ secrets.BALLERINA_BOT_USERNAME }} | ||
publishPAT: ${{ secrets.BALLERINA_BOT_TOKEN }} | ||
run: | | ||
./gradlew clean release -Prelease.useAutomaticVersion=true | ||
./gradlew -Pversion=${VERSION} publish -x test -PpublishToCentral=true | ||
- name: GitHub Release and Release Sync PR | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }} | ||
run: | | ||
gh release create v$VERSION --title "module-ballerinax-h2.driver-v$VERSION" | ||
gh pr create --title "[Automated] Sync main after $VERSION release" --body "Sync main after $VERSION release" |
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,42 @@ | ||
name: PR build | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- 2201.[0-9]+.x | ||
|
||
jobs: | ||
ubuntu-build: | ||
name: Build on Ubuntu | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 11 | ||
- name: Build with Gradle | ||
env: | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.GITHUB_TOKEN }} | ||
run: ./gradlew build | ||
- name: Generate Codecov Report | ||
uses: codecov/codecov-action@v2 | ||
windows-build: | ||
name: Build on Windows | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 11 | ||
- name: Build with Gradle | ||
env: | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.GITHUB_TOKEN }} | ||
run: ./gradlew.bat build -x test | ||
# Disabling tests because no docker in git-action windows |
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: 'Close stale pull requests' | ||
|
||
on: | ||
schedule: | ||
- cron: '30 19 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v3 | ||
with: | ||
stale-pr-message: 'This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the `stale` label is removed or commented.' | ||
close-pr-message: 'Closed PR due to inactivity for more than 18 days.' | ||
days-before-pr-stale: 15 | ||
days-before-pr-close: 3 | ||
days-before-issue-stale: -1 | ||
days-before-issue-close: -1 |
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,47 @@ | ||
name: Trivy | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '30 20 * * *' | ||
|
||
jobs: | ||
ubuntu-build: | ||
name: Build on Ubuntu | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 11 | ||
- name: Build with Gradle | ||
env: | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.GITHUB_TOKEN }} | ||
run: ./gradlew build -x check -x test | ||
- name: Create lib directory if not exists | ||
run: mkdir -p ballerina/lib | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
scan-type: 'rootfs' | ||
scan-ref: '/github/workspace/ballerina/lib' | ||
format: 'table' | ||
timeout: '10m0s' | ||
exit-code: '1' | ||
- name: Notify failure | ||
if: ${{ failure() }} | ||
run: | | ||
curl -X POST \ | ||
'https://api.github.com/repos/ballerina-platform/ballerina-release/dispatches' \ | ||
-H 'Accept: application/vnd.github.v3+json' \ | ||
-H 'Authorization: Bearer ${{ secrets.BALLERINA_BOT_TOKEN }}' \ | ||
--data "{ | ||
\"event_type\": \"notify-trivy-failure\", | ||
\"client_payload\": { | ||
\"repoName\": \"module-ballerinax-h2.driver\", | ||
\"workflow\": \"Trivy\" | ||
} | ||
}" |
Oops, something went wrong.