Skip to content

Commit

Permalink
Merge pull request #82 from niveathika/master
Browse files Browse the repository at this point in the history
Add support to configure Certs
  • Loading branch information
niveathika authored Jul 7, 2020
2 parents be812ee + 7014918 commit 8c5797c
Show file tree
Hide file tree
Showing 17 changed files with 543 additions and 121 deletions.
34 changes: 17 additions & 17 deletions issue_template.md → .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
**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:**
**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. -->
102 changes: 51 additions & 51 deletions pull_request_template.md → .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
## Purpose
> Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc.
## Goals
> Describe the solutions that this feature/fix will introduce to resolve the problems described above
## Approach
> Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email [email protected] to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.
## User stories
> Summary of user stories addressed by this change>
## Release note
> Brief description of the new feature or bug fix as it will appear in the release notes
## Documentation
> Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact
## Training
> Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable
## Certification
> Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to [email protected] and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why.
## Marketing
> Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable
## Automation tests
- Unit tests
> Code coverage information
- Integration tests
> Details about the test cases and coverage
## Security checks
- Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes/no
- Ran FindSecurityBugs plugin and verified report? yes/no
- Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes/no

## Samples
> Provide high-level details about the samples related to this feature
## Related PRs
> List any other related PRs
## Migrations (if applicable)
> Describe migration steps and platforms on which migration has been tested
## Test environment
> List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested
## Learning
## Purpose
> Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc.
## Goals
> Describe the solutions that this feature/fix will introduce to resolve the problems described above
## Approach
> Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email [email protected] to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.
## User stories
> Summary of user stories addressed by this change>
## Release note
> Brief description of the new feature or bug fix as it will appear in the release notes
## Documentation
> Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact
## Training
> Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable
## Certification
> Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to [email protected] and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why.
## Marketing
> Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable
## Automation tests
- Unit tests
> Code coverage information
- Integration tests
> Details about the test cases and coverage
## Security checks
- Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes/no
- Ran FindSecurityBugs plugin and verified report? yes/no
- Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes/no

## Samples
> Provide high-level details about the samples related to this feature
## Related PRs
> List any other related PRs
## Migrations (if applicable)
> Describe migration steps and platforms on which migration has been tested
## Test environment
> List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested
## Learning
> Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.
34 changes: 28 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,46 @@
name: CI

on: [push]
on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
services:
mongodb:
image: mongo:4.2.0
ports:
- 27017:27017
env:
# Following credentials are only used during testing in docker container
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: admin
mongodb-ssl:
image: rzhilkibaev/mongo-x509-auth-ssl:latest
steps:
- uses: actions/checkout@v2
- run: mvn clean install -pl mongo-utils
- name: Ballerina Build
- name: Ballerina Build W/O tests
uses: ballerina-platform/ballerina-action/@swan-lake-release
with:
args:
build -a -c --sourceroot mongodb
build -a -c --sourceroot mongodb --skip-tests
env:
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
- name: Ballerina Build W/ tests
uses: ballerina-platform/ballerina-action/@swan-lake-release
with:
args:
test -a --sourceroot mongodb --groups mongodb
env:
# Following credentials are only used during testing in docker container
MONGODB_HOST: mongodb
MONGODB_USER: admin
MONGODB_PASSWORD: admin
- name: Ballerina Build W/ tests (SSL)
uses: ballerina-platform/ballerina-action/@swan-lake-release
with:
args:
test -a --groups mongodb-ssl
env:
# Following credentials are only used during testing in docker container
WORKING_DIR: ./mongodb
MONGODB_HOST: mongodb-ssl
MONGODB_USER: C=US,ST=CA,L=San Francisco,O=Jaspersoft,OU=JSDev,CN=admin
33 changes: 27 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,46 @@ on:

jobs:
build:

runs-on: ubuntu-latest
services:
mongodb:
image: mongo:4.2.0
ports:
- 27017:27017
env:
# Following credentials are only used during testing in docker container
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: admin
mongodb-ssl:
image: rzhilkibaev/mongo-x509-auth-ssl:latest
steps:
- uses: actions/checkout@v2
- run: mvn clean install -pl mongo-utils
- name: Ballerina Build
- name: Ballerina Build W/O tests
uses: ballerina-platform/ballerina-action/@swan-lake-release
with:
args:
build -a -c --sourceroot mongodb
build -a -c --sourceroot mongodb --skip-tests
env:
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
- name: Ballerina Build W/ tests
uses: ballerina-platform/ballerina-action/@swan-lake-release
with:
args:
test -a --sourceroot mongodb --groups mongodb
env:
# Following credentials are only used during testing in docker container
MONGODB_HOST: mongodb

MONGODB_USER: admin
MONGODB_PASSWORD: admin
- name: Ballerina Build W/ tests (SSL)
uses: ballerina-platform/ballerina-action/@swan-lake-release
with:
args:
test -a --groups mongodb-ssl
env:
# Following credentials are only used during testing in docker container
WORKING_DIR: ./mongodb
MONGODB_HOST: mongodb-ssl
MONGODB_USER: C=US,ST=CA,L=San Francisco,O=Jaspersoft,OU=JSDev,CN=admin
- name: Ballerina Push
uses: ballerina-platform/ballerina-action/@swan-lake-release
with:
Expand Down
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
# limitations under the License.

services:
- mongodb
- docker

script:
- wget http://dist.ballerina.io/downloads/swan-lake-preview1/ballerina-linux-installer-x64-swan-lake-preview1.deb
- sudo dpkg -i ballerina-linux-installer-x64-swan-lake-preview1.deb
- sudo apt-get install -f
- export JAVA_OPTS="-DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true"
- mvn clean install -pl mongo-utils
- ballerina build -a -c --sourceroot mongodb
- mvn clean install
- cd mongodb
- mvn verify -P mongodb
- mvn verify -P mongodb-ssl
2 changes: 1 addition & 1 deletion mongo-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>module-mongo</artifactId>
<groupId>org.wso2.ei</groupId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* Constants used in the module-mongodb.
*/
public class MongoDBConstants {
public static final BPackage BAL_PACKAGE = new BPackage("ballerinax", "mongodb", "2.0.0");
public static final BPackage BAL_PACKAGE = new BPackage("ballerinax", "mongodb", "2.0.1");

/**
* Constants related to `mongodb:DatabaseError`.
Expand Down
Loading

0 comments on commit 8c5797c

Please sign in to comment.