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

Feature/1241 get settlements by params to include currency #268

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3ceea6a
Re-do code changes to the updated settlements v2
Feb 24, 2020
7ee6d5a
Added async-retry
Feb 24, 2020
d003daa
Remove caret in package.json
Feb 24, 2020
cba36b2
Fixed the filtering on the settlement window(s) per settlement id, ad…
Feb 27, 2020
cb7325d
Fixed the filtering on the settlement window(s) per settlement id, ad…
Feb 27, 2020
1c84975
Fixed vulnerabilities
Feb 27, 2020
cae483e
Merge branch 'settlement-v2' into feature/1208Enhance_SettlementById_…
Feb 27, 2020
9f2d0fe
Updated the v2 branch
Feb 27, 2020
6e2933e
Removed the settlement model line in the response object
Feb 27, 2020
fb594ca
Removed the settlement model line in the response object
Feb 27, 2020
76a3d7c
update central ledger
Feb 27, 2020
39ae01d
Fix vulnerability
Feb 27, 2020
e129ce2
attempt to fix vulnerability
Feb 27, 2020
b6238bc
Updated Happi to version 19.1.1
Feb 28, 2020
fa699b1
Fixed the filtering on the settlement window(s) per settlement id, ad…
Feb 28, 2020
f2f40b9
Crazy shit happening
Mar 2, 2020
cb574e0
test commit
Mar 2, 2020
d994c19
Fixed code review changes
Mar 2, 2020
0283e7b
Re-trigger pull request
Mar 2, 2020
6292327
Revert Recreate DB script
Mar 2, 2020
6f1a91d
Merge branch 'settlement-v2' of https://github.com/mojaloop/central-s…
Mar 2, 2020
6c64e89
Updated Hapi to LTS version
Mar 2, 2020
158c8df
* Fixed get settlement by params
lazolalucas Mar 2, 2020
1052989
Merge remote-tracking branch 'lazolalucas/feature/1241-GetSettlements…
lazolalucas Mar 4, 2020
665fbcf
* Fixed Circle ci tests failing
lazolalucas Mar 4, 2020
6025f1b
Trigger a rebuild
lazolalucas Mar 4, 2020
12e127b
Removed cache for dependencies under unit test/coverage
lazolalucas Mar 4, 2020
594d229
Updated circle ci config.yml
lazolalucas Mar 4, 2020
12c9b3e
Updated circle ci config.yml
lazolalucas Mar 4, 2020
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
94 changes: 42 additions & 52 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@ orbs:
# YAML defaults templates, in alphabetical order
##
defaults_Dependencies: &defaults_Dependencies |
apk --no-cache add git
apk --no-cache add ca-certificates
apk --no-cache add curl
apk --no-cache add openssh-client
apk --no-cache add bash
apk add --no-cache -t build-dependencies make gcc g++ python libtool autoconf automake
npm config set unsafe-perm true
npm install -g node-gyp
apk --no-cache add git
apk --no-cache add ca-certificates
apk --no-cache add curl
apk --no-cache add openssh-client
apk add --no-cache -t build-dependencies make gcc g++ python libtool autoconf automake
npm config set unsafe-perm true
npm install -g node-gyp

defaults_awsCliDependencies: &defaults_awsCliDependencies |
apk --no-cache add \
python \
py-pip \
groff \
less \
mailcap
pip install --upgrade awscli==1.14.5 s3cmd==2.0.1 python-magic
apk -v --purge del py-pip
apk --no-cache add \
python \
py-pip \
groff \
less \
mailcap
pip install --upgrade awscli==1.14.5 s3cmd==2.0.1 python-magic
apk -v --purge del py-pip

defaults_build_docker_build: &defaults_build_docker_build
name: Build Docker image
name: Build Docker $CIRCLE_TAG image
command: |
echo "Building Docker image: $CIRCLE_TAG"
docker build -t $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG .

defaults_build_docker_login: &defaults_build_docker_login
Expand All @@ -46,6 +46,7 @@ defaults_build_docker_publish: &defaults_build_docker_publish
echo "Publishing $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$RELEASE_TAG"
docker push $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$RELEASE_TAG


defaults_deploy_config_kubernetes_cluster: &defaults_deploy_config_kubernetes_cluster
name: Configure Kubernetes cluster
command: |
Expand Down Expand Up @@ -127,7 +128,6 @@ defaults_slack_announcement: &defaults_slack_announcement
-H 'cache-control: no-cache' \
-d "{\"text\": \"*${CIRCLE_PROJECT_REPONAME}* - Release \`${CIRCLE_TAG}\`: https://github.com/mojaloop/${CIRCLE_PROJECT_REPONAME}/releases/tag/${CIRCLE_TAG}\"}"


##
# Executors
#
Expand All @@ -136,7 +136,7 @@ defaults_slack_announcement: &defaults_slack_announcement
executors:
default-docker:
working_directory: /home/circleci/project
docker:
docker:
- image: node:12.16.0-alpine

default-machine:
Expand All @@ -145,7 +145,7 @@ executors:

helm-kube:
working_directory: /home/circleci/project
docker:
docker:
- image: hypnoglow/kubernetes-helm

##
Expand All @@ -164,9 +164,6 @@ jobs:
- run:
name: Access npm folder as root
command: cd $(npm root -g)/npm
- run:
name: Install interledgerjs/five-bells-ledger-api-tests
command: npm install github:interledgerjs/five-bells-ledger-api-tests
- run:
name: Update NPM install
command: npm install
Expand All @@ -188,16 +185,12 @@ jobs:
- restore_cache:
keys:
- dependency-cache-{{ checksum "package.json" }}
- dependency-cache-
- run:
name: Install tape, tapes and tap-xunit
command: npm install -g tape tapes tap-xunit
- run:
name: Create dir for test results
command: mkdir -p ./test/results
- run:
name: Install tape and tap-xunit
command: npm install -g tape tap-xunit
- run:
name: Install tapes
command: npm install -g tapes
- run:
name: Execute unit tests
command: npm -s run test:xunit > ./test/results/tape.xml
Expand All @@ -220,10 +213,9 @@ jobs:
- restore_cache:
keys:
- dependency-cache-{{ checksum "package.json" }}
- dependency-cache-
- run:
name: Execute code coverage check
command: npm -s run test:coverage
command: npm -s run test:coverage-check
- store_artifacts:
path: coverage
prefix: test
Expand All @@ -235,7 +227,7 @@ jobs:
if [ "${CIRCLE_BRANCH}" == "master" ];
then
echo "Sending lcov.info to SonarQube..."
aws s3 cp coverage/lcov.info $AWS_S3_DIR_SONARQUBE/central-settlement/lcov.info
aws s3 cp coverage/lcov.info $AWS_S3_DIR_SONARQUBE/$CIRCLE_PROJECT_REPONAME/lcov.info
else
echo "Not a release (env CIRCLE_BRANCH != 'master'), skipping sending lcov.info to SonarQube."
fi
Expand All @@ -245,30 +237,29 @@ jobs:
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "CACHE_VERSION.txt" }}-{{ checksum "package.json" }}
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: Create dir for test results
command: mkdir -p ./test/results
- run:
name: Execute integration tests
command: npm -s run test:integration
no_output_timeout: 25m
- store_artifacts:
path: ./test/results
prefix: test
- store_test_results:
path: ./test/results

vulnerability-check:
vulnerability-check:
executor: default-docker
steps:
- checkout
- run:
name: Install general dependencies
command: *defaults_Dependencies
- restore_cache:
keys:
- dependency-cache-{{ checksum "package.json" }}
- dependency-cache-
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: Create dir for test results
command: mkdir -p ./audit/results
Expand All @@ -289,9 +280,7 @@ jobs:
- run:
<<: *defaults_license_scanner
- restore_cache:
keys:
- dependency-cache-{{ checksum "package.json" }}
- dependency-cache-
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: Prune non-production packages before running license-scanner
command: npm prune --production
Expand All @@ -318,6 +307,7 @@ jobs:

license-scan:
executor: default-machine
# <<: *defaults_test_env
steps:
- attach_workspace:
at: /tmp
Expand Down Expand Up @@ -372,7 +362,7 @@ jobs:
aws s3 cp anchore-reports ${AWS_S3_DIR_ANCHORE_REPORTS}/${CIRCLE_PROJECT_REPONAME}/ --recursive
aws s3 rm ${AWS_S3_DIR_ANCHORE_REPORTS}/latest/ --recursive --exclude "*" --include "${CIRCLE_PROJECT_REPONAME}*"
aws s3 cp anchore-reports ${AWS_S3_DIR_ANCHORE_REPORTS}/latest/ --recursive

# TODO: Enable this when we want to increase the strictness of our security policies
# failCount=$(cat anchore-reports/*policy*.json | grep 'fail' | wc -l)
# echo "FailCount is: ${failCount}"
Expand All @@ -395,7 +385,7 @@ jobs:
- run:
<<: *defaults_build_docker_login
- run:
name: setup environment vars for publish/deploy
name: setup environment vars for release/snapshot
command: ./.circleci/_set_up_deploy_envs.sh
- run:
name: Re-tag pre built image
Expand All @@ -409,12 +399,12 @@ jobs:
deploy:
executor: helm-kube
steps:
- checkout
- checkout
- run:
name: Install AWS CLI dependencies
command: *defaults_awsCliDependencies
- run:
name: setup environment vars for release
name: setup environment vars for release/snapshot
command: ./.circleci/_set_up_deploy_envs.sh
- run:
<<: *defaults_deploy_prequisites
Expand Down Expand Up @@ -471,7 +461,7 @@ workflows:
ignore:
- /feature*/
- /bugfix*/
- test-integration:
- vulnerability-check:
context: org-global
requires:
- setup
Expand All @@ -482,7 +472,7 @@ workflows:
ignore:
- /feature*/
- /bugfix*/
- vulnerability-check:
- audit-licenses:
context: org-global
requires:
- setup
Expand All @@ -493,7 +483,7 @@ workflows:
ignore:
- /feature*/
- /bugfix*/
- audit-licenses:
- test-integration:
context: org-global
requires:
- setup
Expand All @@ -515,7 +505,7 @@ workflows:
- audit-licenses
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*(\-snapshot)?/
only: /v[0-9]+(\.[0-9]+)*(\-snapshot)?(\-hotfix(\.[0-9]+))?/
branches:
ignore:
- /.*/
Expand All @@ -525,7 +515,7 @@ workflows:
- build
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*(\-snapshot)?/
only: /v[0-9]+(\.[0-9]+)*(\-snapshot)?(\-hotfix(\.[0-9]+))?/
branches:
ignore:
- /.*/
Expand All @@ -535,7 +525,7 @@ workflows:
- build
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*(\-snapshot)?/
only: /v[0-9]+(\.[0-9]+)*(\-snapshot)?(\-hotfix(\.[0-9]+))?/
branches:
ignore:
- /.*/
Expand All @@ -546,7 +536,7 @@ workflows:
- image-scan
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*(\-snapshot)?/
only: /v[0-9]+(\.[0-9]+)*(\-snapshot)?(\-hotfix(\.[0-9]+))?/
branches:
ignore:
- /.*/
Expand Down
Loading