Skip to content

Commit

Permalink
Merge pull request #12 from contentstack/feat/DX-673-gcp-na-support
Browse files Browse the repository at this point in the history
DX - 673 | gcp na support
  • Loading branch information
harshithad0703 authored Jun 6, 2024
2 parents c7ff1c3 + 5b46ec7 commit c8678df
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/jira.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
types: [opened]
jobs:
security:
security-jira:
if: ${{ github.actor == 'dependabot[bot]' || github.actor == 'snyk-bot' || contains(github.event.pull_request.head.ref, 'snyk-fix-') || contains(github.event.pull_request.head.ref, 'snyk-upgrade-')}}
runs-on: ubuntu-latest
steps:
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/sast-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: SAST Scan
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
security-sast:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Semgrep Scan
run: docker run -v /var/run/docker.sock:/var/run/docker.sock -v "${PWD}:/src" returntocorp/semgrep semgrep scan --config auto
4 changes: 2 additions & 2 deletions .github/workflows/sca-scan.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Source Composition Analysis Scan
on:
pull_request:
types: [ opened, synchronize, reopened ]
types: [opened, synchronize, reopened]
jobs:
security:
security-sca:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
4 changes: 2 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

A brief description of what changes project contains

#### v1.0.1
#### v1.1.0

- added surefire plugin to generate test report
- added GCP_NA region support

## Introducing Release Of Java Marketplace SDK

Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<url>https://github.com/contentstack/contentstack-management-java/</url>

<properties>
<sdk.version>1.0.0</sdk.version>
<sdk.version>1.1.0</sdk.version>
<maven.compiler.target>9</maven.compiler.target>
<maven.compiler.source>9</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -19,11 +19,11 @@
<maven-javadoc-plugin.version>3.0.0</maven-javadoc-plugin.version>
<dotenv-source.version>5.2.2</dotenv-source.version>
<rxjava-source.version>3.1.6</rxjava-source.version>
<retrofit-source.version>2.9.0</retrofit-source.version>
<converter-gson-version>2.9.0</converter-gson-version>
<retrofit-source.version>2.10.0</retrofit-source.version>
<converter-gson-version>2.10.0</converter-gson-version>
<logging.version>4.10.0</logging.version>
<jococo-plugin.version>0.8.7</jococo-plugin.version>
<lombok-source.version>1.18.30</lombok-source.version>
<lombok-source.version>1.18.32</lombok-source.version>
<junit-jupiter.version>5.10.0</junit-jupiter.version>
<junit-jupiter-engine.version>5.8.0-M1</junit-jupiter-engine.version>
<junit-vintage-engine.version>5.10.0</junit-vintage-engine.version>
Expand Down Expand Up @@ -117,7 +117,7 @@
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>24.0.1</version>
<version>24.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/contentstack/sdk/Region.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ public enum Region {
* Azure na region.
*/
AZURE_NA,
/**
* Gcp na region.
*/
GCP_NA,
}
8 changes: 8 additions & 0 deletions src/test/java/com/contentstack/sdk/TestClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ public static Marketplace getMarketplaceAzureEu() {
.build();
}

public static Marketplace getMarketplaceGcpNa() {
return new Marketplace
.Builder(TestClient.ORGANIZATION_UID)
.host(HOST)
.region(Region.GCP_NA)
.build();
}


public static Marketplace getMarketplaceWithLogin() {
return new Marketplace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void testConstructorWithNullOrganizationUidAndWithValidHost() {
//String organizationUid = "nullOrganizationUid123";
String organizationUid = null;
String host = "developerhub-api.contentstack.com";
assertThrows(NullPointerException.class, () -> new Marketplace.Builder(organizationUid)
assertThrows(IllegalArgumentException.class, () -> new Marketplace.Builder(organizationUid)
.host(host)
.build());
}
Expand All @@ -63,7 +63,7 @@ void testConstructorWithNullOrganizationUid() {
void testConstructorWithNullOrganizationUidNullCheck() {
// Arrange
String organizationUid = null;
assertThrows(NullPointerException.class, () -> new Marketplace.Builder(organizationUid)
assertThrows(IllegalArgumentException.class, () -> new Marketplace.Builder(organizationUid)
.build());
}

Expand Down

0 comments on commit c8678df

Please sign in to comment.