Skip to content

Commit

Permalink
Merge branch 'develop' into feature/ocsgw-remove-analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
mpeterss committed Nov 1, 2019
2 parents cfc002e + c5b049f commit 926798d
Show file tree
Hide file tree
Showing 186 changed files with 4,623 additions and 3,044 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ jobs:
machine:
image: ubuntu-1604:201903-01
environment:
JAVA_HOME: /usr/lib/jvm/zulu12.3.11-ca-jdk12.0.2-linux_x64
JAVA_HOME: /usr/lib/jvm/zulu13.27.9-ca-jdk13-linux_x64

steps:
- checkout
- run:
name: upgrading Java to open-jdk-12
command: |
# sudo apt update; sudo apt install -y wget
sudo wget https://cdn.azul.com/zulu/bin/zulu12.3.11-ca-jdk12.0.2-linux_x64.tar.gz -O /tmp/zulu12.3.11-ca-jdk12.0.2-linux_x64.tar.gz
sudo tar -zxf /tmp/zulu12.3.11-ca-jdk12.0.2-linux_x64.tar.gz -C /usr/lib/jvm
sudo wget https://cdn.azul.com/zulu/bin/zulu13.27.9-ca-jdk13-linux_x64.tar.gz -O /tmp/zulu13.27.9-ca-jdk13-linux_x64.tar.gz
sudo tar -zxf /tmp/zulu13.27.9-ca-jdk13-linux_x64.tar.gz -C /usr/lib/jvm
- run:
# checking for merge conflicts and merging locally if none exist
name: merging ${CIRCLE_BRANCH} into develop locally
Expand All @@ -29,7 +29,7 @@ jobs:
- run:
name: javac -version
command: |
export PATH=/usr/lib/jvm/zulu12.3.11-ca-jdk12.0.2-linux_x64/bin:$PATH
export PATH=/usr/lib/jvm/zulu13.27.9-ca-jdk13-linux_x64/bin:$PATH
javac -version
- run:
name: Pulling Gradle cache
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
machine:
image: ubuntu-1604:201903-01
environment:
JAVA_HOME: /usr/lib/jvm/zulu12.3.11-ca-jdk12.0.2-linux_x64
JAVA_HOME: /usr/lib/jvm/zulu13.27.9-ca-jdk13-linux_x64

steps:
- checkout
Expand All @@ -124,8 +124,8 @@ jobs:
command: |
# sudo apt update; sudo apt install -y wget
sudo wget https://cdn.azul.com/zulu/bin/zulu12.3.11-ca-jdk12.0.2-linux_x64.tar.gz -O /tmp/zulu12.3.11-ca-jdk12.0.2-linux_x64.tar.gz
sudo tar -zxf /tmp/zulu12.3.11-ca-jdk12.0.2-linux_x64.tar.gz -C /usr/lib/jvm
sudo wget https://cdn.azul.com/zulu/bin/zulu13.27.9-ca-jdk13-linux_x64.tar.gz -O /tmp/zulu13.27.9-ca-jdk13-linux_x64.tar.gz
sudo tar -zxf /tmp/zulu13.27.9-ca-jdk13-linux_x64.tar.gz -C /usr/lib/jvm
- run:
name: Pulling Gradle cache
command: |
Expand All @@ -140,7 +140,7 @@ jobs:
- run:
name: javac -version
command: |
export PATH=/usr/lib/jvm/zulu12.3.11-ca-jdk12.0.2-linux_x64/bin:$PATH
export PATH=/usr/lib/jvm/zulu13.27.9-ca-jdk13-linux_x64/bin:$PATH
javac -version
- run:
name: Gradle Build Prime and ScanInfo Shredder
Expand Down
6 changes: 4 additions & 2 deletions .circleci/prime-dev-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,10 @@ prime:
cpu: 100m
memory: 768Mi
livenessProbe: {}
readinessProbe: {}
annotations:
readinessProbe:
path: /ping
port: 8080
annotations:
prometheus.io/scrape: 'true'
prometheus.io/path: '/prometheus-metrics'
prometheus.io/port: '8081'
Expand Down
4 changes: 3 additions & 1 deletion .circleci/prime-prod-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ prime:
cpu: 300m
memory: 1Gi
livenessProbe: {}
readinessProbe: {}
readinessProbe:
path: /ping
port: 8080
annotations:
prometheus.io/scrape: 'true'
prometheus.io/path: '/prometheus-metrics'
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cache:

install: echo "skip 'gradle assemble' step"

jdk: openjdk12
jdk: openjdk13

# TODO vihang: fix neo4j-store:test
script:
Expand Down
2 changes: 1 addition & 1 deletion acceptance-tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM azul/zulu-openjdk:12.0.2
FROM azul/zulu-openjdk:13

LABEL maintainer="[email protected]"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ object StripePayment {
return token.card.id
}

val MAX_TRIES = 3
val WAIT_DELAY = 300L

/**
* Obtains 'default source' directly from Stripe. Use in tests to
* verify that the correspondng 'setDefaultSource' API works as
Expand All @@ -85,8 +88,17 @@ object StripePayment {
// https://stripe.com/docs/api/java#create_source
Stripe.apiKey = System.getenv("STRIPE_API_KEY")

val customer = Customer.retrieve(stripeCustomerId)
return customer.defaultSource
var error = Exception()

(0..MAX_TRIES).forEach {
try {
return Customer.retrieve(stripeCustomerId).defaultSource
} catch (e: Exception) {
error = e
}
}

throw(error)
}

/**
Expand All @@ -96,7 +108,15 @@ object StripePayment {
// https://stripe.com/docs/api/java#create_card_token
Stripe.apiKey = System.getenv("STRIPE_API_KEY")

val customers = Customer.list(emptyMap()).data
var customers: List<Customer> = emptyList()

(0..MAX_TRIES).forEach {
customers = Customer.list(emptyMap()).data
if (!customers.isEmpty())
return@forEach
Thread.sleep(WAIT_DELAY)
}

return customers.first { it.id == customerId }.id
}

Expand Down
Loading

0 comments on commit 926798d

Please sign in to comment.