Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
13 changes: 8 additions & 5 deletions .github/workflows/build-connector-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Get Ballerina Version
run: |
BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev)
BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev)
if [ -z "$BAL_VERSION" ]; then
BAL_VERSION="latest"
fi
Expand All @@ -60,10 +60,10 @@ jobs:
updatedVersion=$VERSION-$startTime-$latestCommit
echo $updatedVersion
sed -i "s/version=\(.*\)/version=$updatedVersion/g" gradle.properties

- name: Set ENV Variables
run: |
echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV
echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV

- name: Build the Package
env:
Expand All @@ -73,8 +73,11 @@ jobs:
./gradlew build -x -PbuildUsingDocker="2201.11.0-pre-rc1" test ${{ inputs.additional-build-flags }}
./gradlew test -PbuildUsingDocker="2201.11.0-pre-rc1" ${{ inputs.additional-test-flags }}

- name: Generate Codecov Report
uses: codecov/codecov-action@v3
- name: Generate CodeCov Report
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ballerina-platform/${{ github.event.inputs.repo }}

- name: Publish Connector
if: ${{ inputs.publish-required == true }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/build-timestamp-master-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

- name: Set ENV Variables
run: |
echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV
echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV

- name: Build with Gradle
env:
Expand All @@ -47,7 +47,10 @@ jobs:
run: ./gradlew publish --no-daemon --scan ${{ inputs.additional-build-flags }}

- name: Generate CodeCov Report
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ballerina-platform/${{ github.event.inputs.repo }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
Expand Down
41 changes: 22 additions & 19 deletions .github/workflows/pr-build-connector-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
group: ${{ github.head_ref }}-ubuntu-build
cancel-in-progress: true
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Checkout Repository
uses: actions/checkout@v3

- name: Get Ballerina Version
run: |
BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev)
BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev)
if [ -z "$BAL_VERSION" ]; then
BAL_VERSION="latest"
fi
Expand All @@ -38,23 +38,26 @@ jobs:
with:
version: nightly

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

- name: Set ENV Variables
run: |
echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV
echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV

- name: Build the Package
env:
packageUser: ${{ github.actor }}
packagePAT: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew build -x test -PbuildUsingDocker="2201.11.0-pre-rc1" ${{ inputs.additional-build-flags }}
./gradlew test -PbuildUsingDocker="2201.11.0-pre-rc1" ${{ inputs.additional-test-flags }}
- name: Build the Package
env:
packageUser: ${{ github.actor }}
packagePAT: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew build -x test -PbuildUsingDocker="2201.11.0-pre-rc1" ${{ inputs.additional-build-flags }}
./gradlew test -PbuildUsingDocker="2201.11.0-pre-rc1" ${{ inputs.additional-test-flags }}

- name: Generate Codecov Report
uses: codecov/codecov-action@v3
- name: Generate CodeCov Report
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ballerina-platform/${{ github.event.inputs.repo }}
13 changes: 7 additions & 6 deletions .github/workflows/pull-request-build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- name: Set ENV Variables
run: |
echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV
echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV

- name: Build the Package
env:
Expand All @@ -52,10 +52,11 @@ jobs:
./gradlew build -x test ${{ inputs.additional-ubuntu-build-flags }}
./gradlew test ${{ inputs.additional-ubuntu-test-flags }}

- name: Generate Codecov Report
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Generate CodeCov Report
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ballerina-platform/${{ github.event.inputs.repo }}

windows-build:
name: Build on Windows
Expand All @@ -75,7 +76,7 @@ jobs:

- name: Set ENV Variables
run: |
echo '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' | Out-File -FilePath $env:GITHUB_ENV -Append
echo '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' | Out-File -FilePath $env:GITHUB_ENV -Append

- name: Build the Project
env:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
required: true
default: false
type: boolean
release_driver_modules:
description: 'Release Ballerina Driver Modules (ballerinax/mysql.driver, ballerinax/mssql.driver, etc.)'
required: true
default: false
type: boolean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Driver modules are not released in every release. It is mainly on-demand releases.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for cases where we have to release all in a single go, and I agree, that isn't the main case. But for completeness, I'd be happy to keep this option.

release_handwritten_connectors:
description: 'Release Ballerina Handwritten Connectors (ballerinax/mongodb, ballerinax/mysql, etc.)'
required: true
Expand Down Expand Up @@ -47,6 +52,7 @@ jobs:
RELEASE_LIBS: ${{ github.event.inputs.release_libs }}
RELEASE_EXTENSIONS: ${{ github.event.inputs.release_extensions }}
RELEASE_TOOLS: ${{ github.event.inputs.release_tools }}
RELEASE_DRIVER_MODULES: ${{ github.event.inputs.release_driver_modules }}
RELEASE_HANDWRITTEN_CONNECTORS: ${{ github.event.inputs.release_handwritten_connectors }}
RELEASE_GENERATED_CONNECTORS: ${{ github.event.inputs.release_generated_connectors }}
BAL_CONFIG_VAR_WORKFLOW: "publish-release.yml"
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/s4hana-build-connector-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- name: Get Ballerina Version
run: |
BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev)
BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev)
if [ -z "$BAL_VERSION" ]; then
BAL_VERSION="latest"
fi
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
if [[ "$dir" == resources ]]; then
continue
fi
folders+=("$dir");
folders+=("$dir");
done
echo "directories=$(jq -nc --args '$ARGS.positional' ${folders[@]})" >> $GITHUB_OUTPUT

Expand Down Expand Up @@ -102,5 +102,8 @@ jobs:
- name: Download coverage reports
uses: actions/download-artifact@v4

- name: Generate Codecov Report
uses: codecov/codecov-action@v3
- name: Generate CodeCov Report
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ballerina-platform/${{ github.event.inputs.repo }}
11 changes: 7 additions & 4 deletions .github/workflows/s4hana-pr-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
if [[ "$dir" == resources ]]; then
continue
fi
folders+=("$dir");
folders+=("$dir");
done
echo "directories=$(jq -nc --args '$ARGS.positional' ${folders[@]})" >> $GITHUB_OUTPUT

Expand Down Expand Up @@ -68,8 +68,11 @@ jobs:
- name: Download coverage reports
uses: actions/download-artifact@v4

- name: Generate Codecov Report
uses: codecov/codecov-action@v3
- name: Generate CodeCov Report
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ballerina-platform/${{ github.event.inputs.repo }}

build-examples:
name: Build Examples
Expand All @@ -81,7 +84,7 @@ jobs:

- name: Get Ballerina Version
run: |
BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev)
BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev)
if [ -z "$BAL_VERSION" ]; then
BAL_VERSION="latest"
fi
Expand Down