Skip to content

Commit

Permalink
feat!: use updated outbound OpenAPI specification from api-snippets (#…
Browse files Browse the repository at this point in the history
…340)

* feat!: use updated outbound OpenAPI specification from api-snippets

* use audit-ci for audit check.

* move api-snippets to deps.
  • Loading branch information
kirgene authored Jul 28, 2022
1 parent dd542e6 commit 92eb491
Show file tree
Hide file tree
Showing 107 changed files with 263 additions and 6,456 deletions.
132 changes: 1 addition & 131 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,6 @@ defaults_license_scanner: &defaults_license_scanner
git clone https://github.com/mojaloop/license-scanner /tmp/license-scanner
cd /tmp/license-scanner && make build default-files set-up
## remove
defaults_npm_auth: &defaults_npm_auth
name: Update NPM registry auth token
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc

## remove
defaults_npm_publish_release: &defaults_npm_publish_release
name: Publish NPM $RELEASE_TAG artifact
command: |
source $BASH_ENV
echo "Publishing tag $RELEASE_TAG"
npm publish --tag $RELEASE_TAG --access public
defaults_export_version_from_package: &defaults_export_version_from_package
name: Format the changelog into the github release body and get release tag
command: |
Expand Down Expand Up @@ -225,7 +212,7 @@ jobs:
command: mkdir -p ./audit/results
- run:
name: Check for new npm vulnerabilities
command: npm run audit:check --silent -- --json > ./audit/results/auditResults.json
command: npm run audit:check -- -o json > ./audit/results/auditResults.json
- store_artifacts:
path: ./audit/results
prefix: audit
Expand Down Expand Up @@ -566,85 +553,6 @@ jobs:
event: fail
template: SLACK_TEMP_RELEASE_FAILURE

publish-npm:
executor: default-docker
steps:
- run:
name: Install general dependencies
command: *defaults_Dependencies
- checkout
- restore_cache:
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Setup for LATEST release
command: |
echo "export RELEASE_TAG=$RELEASE_TAG_PROD" >> $BASH_ENV
echo "RELEASE_TAG=$RELEASE_TAG_PROD"
PACKAGE_VERSION=$(cat package-lock.json | jq -r .version)
echo "export PACKAGE_VERSION=${PACKAGE_VERSION}" >> $BASH_ENV
echo "PACKAGE_VERSION=${PACKAGE_VERSION}"
- run:
name: Setup Slack config
command: |
echo "export SLACK_PROJECT_NAME=${CIRCLE_PROJECT_REPONAME}" >> $BASH_ENV
echo "export SLACK_RELEASE_TYPE='NPM Release'" >> $BASH_ENV
echo "export SLACK_RELEASE_TAG=v${CIRCLE_TAG:1}" >> $BASH_ENV
echo "export SLACK_RELEASE_URL=https://www.npmjs.com/package/@mojaloop/${CIRCLE_PROJECT_REPONAME}/v/${CIRCLE_TAG:1}" >> $BASH_ENV
echo "export SLACK_BUILD_ID=${CIRCLE_BUILD_NUM}" >> $BASH_ENV
echo "export SLACK_CI_URL=${CIRCLE_BUILD_URL}" >> $BASH_ENV
- run:
<<: *defaults_npm_auth
- run:
<<: *defaults_npm_publish_release
- slack/notify:
event: pass
template: SLACK_TEMP_RELEASE_SUCCESS
- slack/notify:
event: fail
template: SLACK_TEMP_RELEASE_FAILURE

publish-npm-snapshot:
executor: default-docker
steps:
- run:
name: Install general dependencies
command: *defaults_Dependencies
- checkout
- restore_cache:
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Setup for SNAPSHOT release
command: |
echo "export RELEASE_TAG=${RELEASE_TAG_SNAPSHOT}" >> $BASH_ENV
echo "RELEASE_TAG=${RELEASE_TAG_SNAPSHOT}"
echo "Override package version: ${CIRCLE_TAG:1}"
npx standard-version --skip.tag --skip.commit --skip.changelog --release-as ${CIRCLE_TAG:1}
PACKAGE_VERSION=$(cat package-lock.json | jq -r .version)
echo "export PACKAGE_VERSION=${PACKAGE_VERSION}" >> $BASH_ENV
echo "PACKAGE_VERSION=${PACKAGE_VERSION}"
- run:
name: Setup Slack config
command: |
echo "export SLACK_PROJECT_NAME=${CIRCLE_PROJECT_REPONAME}" >> $BASH_ENV
echo "export SLACK_RELEASE_TYPE='NPM Snapshot'" >> $BASH_ENV
echo "export SLACK_RELEASE_TAG=v${CIRCLE_TAG:1}" >> $BASH_ENV
echo "export SLACK_RELEASE_URL=https://www.npmjs.com/package/@mojaloop/${CIRCLE_PROJECT_REPONAME}/v/${CIRCLE_TAG:1}" >> $BASH_ENV
echo "export SLACK_BUILD_ID=${CIRCLE_BUILD_NUM}" >> $BASH_ENV
echo "export SLACK_CI_URL=${CIRCLE_BUILD_URL}" >> $BASH_ENV
- run:
<<: *defaults_npm_auth
- run:
<<: *defaults_npm_publish_release
- slack/notify:
event: pass
template: SLACK_TEMP_RELEASE_SUCCESS
- slack/notify:
event: fail
template: SLACK_TEMP_RELEASE_FAILURE

##
# Workflows
#
Expand Down Expand Up @@ -860,41 +768,3 @@ workflows:
branches:
ignore:
- /.*/
- publish-npm:
context: org-global
requires:
- pr-tools/pr-title-check
- test-dependencies
- test-lint
- test-unit
- vulnerability-check
- audit-licenses
- test-integration
- license-scan
- image-scan
- validate-openapi
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*/
branches:
ignore:
- /.*/
- publish-npm-snapshot:
context: org-global
requires:
- pr-tools/pr-title-check
- test-dependencies
- test-lint
- test-unit
- vulnerability-check
- audit-licenses
- test-integration
- license-scan
- image-scan
- validate-openapi
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*\-snapshot+((\.[0-9]+)?)/
branches:
ignore:
- /.*/
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ For information on the background and context of this project please see the pre

DFSP backends must implement the [DFSP Inbound API](docs/dfspInboundApi.yaml) in order for the scheme adapter to make incoming transfers i.e. to receive funds to a customer account.

DFSP backends can call the [DFSP Outbound API](/src/outboundApi/api.yaml) in order to make outgoing transfers i.e. to send funds from a customer account.
DFSP backends can call the [DFSP Outbound API](https://github.com/mojaloop/api-snippets/blob/master/docs/sdk-scheme-adapter-outbound-v2_0_0-openapi3-snippets.yaml) in order to make outgoing transfers i.e. to send funds from a customer account.

## Docker Image

Expand Down Expand Up @@ -192,12 +192,6 @@ To rebuild the inbound interface run
npm run build:openapi:inbound
```

To rebuild the outbound interface run

```bash
npm run build:openapi:outbound
```

## Automated Releases

As part of our CI/CD process, we use a combination of CircleCI, standard-version
Expand Down
16 changes: 16 additions & 0 deletions audit-ci.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://github.com/IBM/audit-ci/raw/main/docs/schema.json",
"moderate": true,
"allowlist": [
"GHSA-v88g-cgmw-v5xw",
"GHSA-phwq-j96m-2c2q",
"GHSA-282f-qqgm-c34q",
"GHSA-6vfc-qv3f-vr6c",
"GHSA-wc69-rhjr-hc9g",
"GHSA-g954-5hwp-pp24",
"GHSA-mjxr-4v3x-q3m4",
"GHSA-rjqq-98f6-6j3r",
"GHSA-3cvr-822r-rqcc",
"GHSA-p9pc-299p-vxgp"
]
}
101 changes: 0 additions & 101 deletions audit-resolve.json

This file was deleted.

Loading

0 comments on commit 92eb491

Please sign in to comment.