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

Add all master changes excluding listener related ones #208

Merged
merged 35 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8ecad50
Fix Native Data Retention Issue
RDPerera Sep 14, 2023
62aac78
Address Review Changes
RDPerera Sep 18, 2023
07d2d0c
Address Review Changes
RDPerera Sep 18, 2023
ed9335e
Addressed review comments
RDPerera Sep 18, 2023
8f726cd
Add test case to check invalid message completes
RDPerera Sep 19, 2023
6ddefb7
Add negative test case for invalid abandon
RDPerera Sep 26, 2023
0edabc3
Use graalvm-community in workflows
gabilang Sep 26, 2023
e676922
Update code owners
NipunaRanasinghe Sep 30, 2023
5cb850e
Migrating a Connector Repository to Gradle
RDPerera Oct 23, 2023
df838a5
[Automated] Update the toml files
RDPerera Nov 17, 2023
d13fa33
Fix build failures
RDPerera Nov 17, 2023
d6e3082
[Automated] Update the toml files
RDPerera Nov 17, 2023
a450c9a
Addressed review comments
RDPerera Nov 17, 2023
c38d8bd
Addressed review comments
RDPerera Nov 17, 2023
319a769
Update PR template
RDPerera Nov 20, 2023
0e038a4
Restructure docs
RDPerera Nov 22, 2023
dcccb16
Update the documentation
RDPerera Nov 23, 2023
8cc0124
Update doc screenshots
RDPerera Nov 23, 2023
bdc0de3
Adress review comments
RDPerera Nov 23, 2023
a8a946c
Update readme badges
RDPerera Nov 23, 2023
c4ab7b9
[Automated] Update the toml files
RDPerera Nov 30, 2023
0154068
[Automated] Update the toml files
RDPerera Nov 30, 2023
293d085
[Automated] Update the toml files
RDPerera Nov 30, 2023
3cc1149
[Automated] Update the toml files
RDPerera Nov 30, 2023
ced3562
[Automated] Update the toml files
RDPerera Dec 2, 2023
02270c2
Update img paths
RDPerera Dec 2, 2023
d8327b6
Adhere to MB structure
RDPerera Jan 1, 2024
77b0fbb
Minor changes
RDPerera Feb 15, 2024
872b0ad
Remove ASB:Listener from docs
RDPerera Mar 20, 2024
6de9a79
Addressed review changes
RDPerera Mar 20, 2024
bf5e334
Update codecov.yml
RDPerera Mar 20, 2024
a03290c
Update Module.md
RDPerera Mar 20, 2024
16ca04d
Update Package.md
RDPerera Mar 20, 2024
53809b1
Update README.md
RDPerera Mar 21, 2024
87e1245
Remove building examples for Trivy
nipunayf Sep 16, 2023
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# See: https://help.github.com/articles/about-codeowners/

# These owners will be the default owners for everything in the repo.
* @indikasampath2000 @abeykoon @RolandHewage @SkNuwanTissera
* @NipunaRanasinghe @niveathika @RDPerera
10 changes: 10 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Purpose

## Examples

## Checklist
- [ ] Linked to an issue
- [ ] Updated the specification
- [ ] Updated the changelog
- [ ] Added tests
- [ ] Checked native-image compatibility
62 changes: 10 additions & 52 deletions .github/workflows/build-with-bal-test-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,16 @@ name: GraalVM Check

on:
schedule:
- cron: '30 18 * * *'
- cron: "30 18 * * *"
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17.0.7

- name: Set Up Ballerina
uses: ballerina-platform/[email protected]
with:
version: latest

- name: Grant execute permission for gradlew
run: chmod +x gradlew
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

- name: Build with Gradle
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
run: |
./gradlew build -x test

- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
version: 'latest'
java-version: '17.0.7'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Check GraalVM installation
run: |
echo "GRAALVM_HOME: ${{ env.GRAALVM_HOME }}"
echo "JAVA_HOME: ${{ env.JAVA_HOME }}"
native-image --version

- name: Run Ballerina tests using the native executable
run: bal test --graalvm ./ballerina
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
CONNECTION_STRING: ${{ secrets.CONNECTION_STRING }}
QUEUE_NAME: ${{ secrets.QUEUE_NAME }}
TOPIC_NAME: ${{ secrets.TOPIC_NAME }}
SUBSCRIPTION_NAME1: ${{ secrets.SUBSCRIPTION_NAME1 }}
SUBSCRIPTION_NAME2: ${{ secrets.SUBSCRIPTION_NAME2 }}
SUBSCRIPTION_NAME3: ${{ secrets.SUBSCRIPTION_NAME3 }}
jobs:
call_workflow_template:
name: Run Workflow Template
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
80 changes: 10 additions & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,18 @@
name: CI
name: Build

on:
push:
branches:
- main
- 2201.[0-9]+.x
repository_dispatch:
types:
check_connector_for_breaking_changes
types: check_connector_for_breaking_changes

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

# Set up Java Environment
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17.0.7

# Setup Ballerina Environment
- name: Set Up Ballerina
uses: ballerina-platform/[email protected]
with:
version: latest

# Grant execute permission to the gradlew script
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Build the project with Gradle
- name: Build with Gradle
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
run: |
./gradlew build -x test

# Build Ballerina Project
- name: Ballerina Build
run: bal pack ./ballerina
env:
JAVA_HOME: /usr/lib/jvm/default-jvm

# Test Ballerina Project
- name: Ballerina Test
run: bal test --test-report --code-coverage --coverage-format=xml ./ballerina
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
CONNECTION_STRING: ${{ secrets.CONNECTION_STRING }}
QUEUE_NAME: ${{ secrets.QUEUE_NAME }}
TOPIC_NAME: ${{ secrets.TOPIC_NAME }}
SUBSCRIPTION_NAME1: ${{ secrets.SUBSCRIPTION_NAME1 }}
SUBSCRIPTION_NAME2: ${{ secrets.SUBSCRIPTION_NAME2 }}
SUBSCRIPTION_NAME3: ${{ secrets.SUBSCRIPTION_NAME3 }}

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3

- name: Alert notifier on failure
if: failure() && (github.event.action == 'check_connector_for_breaking_changes')
run: |
curl -X POST \
'https://api.github.com/repos/ballerina-platform/ballerina-release/dispatches' \
--header 'Accept: application/vnd.github.v3+json' \
--header 'Authorization: Bearer ${{ secrets.BALLERINA_BOT_TOKEN }}' \
--data-raw '{
"event_type": "notify-ballerinax-connector-build-failure",
"client_payload": {
"repoName": "module-ballerinax-azure-service-bus",
"workflow": "CI"
}
}'
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-azure-service-bus
75 changes: 8 additions & 67 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,13 @@ name: Daily build

on:
schedule:
- cron: '30 2 * * *'
- cron: "30 2 * * *"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

# Set up Java Environment
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17.0.7

# Setup Ballerina Environment
- name: Set Up Ballerina
uses: ballerina-platform/[email protected]
with:
version: latest

# Grant execute permission to the gradlew script
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Build the project with Gradle
- name: Build with Gradle
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
run: |
./gradlew build -x test

# Build Ballerina Project
- name: Ballerina Build
run: bal pack ./ballerina
env:
JAVA_HOME: /usr/lib/jvm/default-jvm

# Test Ballerina Project
- name: Ballerina Test
run: bal test --test-report --code-coverage --coverage-format=xml ./ballerina
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
CONNECTION_STRING: ${{ secrets.CONNECTION_STRING }}
QUEUE_NAME: ${{ secrets.QUEUE_NAME }}
TOPIC_NAME: ${{ secrets.TOPIC_NAME }}
SUBSCRIPTION_NAME1: ${{ secrets.SUBSCRIPTION_NAME1 }}
SUBSCRIPTION_NAME2: ${{ secrets.SUBSCRIPTION_NAME2 }}
SUBSCRIPTION_NAME3: ${{ secrets.SUBSCRIPTION_NAME3 }}

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3

# Send notification when build fails
- 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-build-failure\",
\"client_payload\": {
\"repoName\": \"module-ballerinax-azure-service-bus\"
}
}"
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-azure-service-bus
81 changes: 13 additions & 68 deletions .github/workflows/dev-stg-release.yml
Original file line number Diff line number Diff line change
@@ -1,76 +1,21 @@
name: Dev/Staging BCentral Release
name: Publish to the Ballerina Dev\Stage Central

on:
workflow_dispatch:
inputs:
bal_central_environment:
description: Ballerina Central Environment
environment:
type: choice
options:
- STAGE
- DEV
description: Select Environment
required: true
options:
- DEV CENTRAL
- STAGE CENTRAL

jobs:
release:
runs-on: ubuntu-latest
env:
BALLERINA_${{ github.event.inputs.bal_central_environment }}_CENTRAL: true

steps:
- uses: actions/checkout@v3

# Set up Java Environment
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17.0.7

# Setup Ballerina Environment
- name: Set Up Ballerina
uses: ballerina-platform/[email protected]
with:
version: 2201.8.0

# Grant execute permission to the gradlew script
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Build the project with Gradle
- name: Build with Gradle
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
run: |
./gradlew build -x test -x :azure-service-bus-examples:build

# Perform Trivy scan
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: 'rootfs'
scan-ref: '.'
skip-dirs: 'gradle/'
format: 'table'
timeout: '10m0s'
exit-code: '1'

# Push to Ballerina Staging Central
- name: Push to Staging
if: github.event.inputs.bal_central_environment == 'STAGE'
run: bal push
working-directory: ./ballerina
env:
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_STAGE_ACCESS_TOKEN }}
JAVA_HOME: /usr/lib/jvm/default-jvm

# Push to Ballerina Dev Central
- name: Push to Dev
if: github.event.inputs.bal_central_environment == 'DEV'
run: bal push
working-directory: ./ballerina
env:
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }}
JAVA_HOME: /usr/lib/jvm/default-jvm
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 }}
Loading
Loading