-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Init Container To Onboard MSISDN's (#55)
* Add init container to onboard with central-ledger * Remove environment var processing script * Switch RUN to CMD * Add OCI labels * Add contributor * Update init/central-ledger/Dockerfile Co-Authored-By: Matt Kingston <mattkingston@gmail.com> * Clear whitespace and unused comments * Add build and publish to CI for init-central-ledger * Fix indentation * created insert msisnd script * complete docker container and MSISDN onboarding script * change MSISDN_LIST name * change script to handle MSISDN data * ignore dependency vulneravility * update dockerfile * rename * change pathfinder url name * modify scripts * fix script and docker container * add CI pipeline and remove unused files * fix docker command * fix indentation * fix tag implementation * yaml is fun * resolve vulnerabilities and fix docker save * fix docker build * fix docker image naming and add Matt suggestion * log current images * idk why but it works now * Clean up naming and pipeline * Bump version Co-authored-by: Kamuela Franco <kamuela.franco@gmail.com> Co-authored-by: Matt Kingston <mattkingston@gmail.com>
- Loading branch information
1 parent
8da29c5
commit b708224
Showing
6 changed files
with
163 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM alpine | ||
|
||
ARG CREATED | ||
ARG SOURCE | ||
ARG REVISION | ||
ARG VERSION | ||
|
||
# See https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys and https://github.com/opencontainers/image-spec/blob/master/spec.md for info | ||
LABEL org.opencontainers.image.created=${CREATED} | ||
LABEL org.opencontainers.image.url="https://mojaloop.io/" | ||
LABEL org.opencontainers.image.source=${SOURCE} | ||
LABEL org.opencontainers.image.version=${VERSION} | ||
LABEL org.opencontainers.image.revision=${REVISION} | ||
LABEL org.opencontainers.image.title="onboard-msisdn-oracle" | ||
LABEL org.opencontainers.image.authors="aaron.reynoza@modusbox.com" | ||
LABEL org.opencontainers.image.licenses="Apache-2.0" | ||
|
||
RUN apk add --no-cache --upgrade bash curl jq | ||
|
||
COPY insert_msisdns.sh /insert_msisdns.sh | ||
|
||
CMD ["sh", "/insert_msisdns.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env sh | ||
|
||
CURRENT_DATE=$(date) | ||
for participantMSISDN in $(echo "${MSISDN_LIST}" | jq -c '.[]'); do | ||
MSISDN=$(echo "${participantMSISDN}" | jq -r '.MSISDN'); | ||
CURRENCY=$(echo "${participantMSISDN}" | jq -r '.currency'); | ||
DATA="{\"currency\": \"${CURRENCY}\", \"fspId\": \"${DFSP_NAME}\"}" | ||
|
||
curl -v --location --request PUT "${HOST_PATHFINDER_ORACLE}/participants/MSISDN/${MSISDN}" \ | ||
--header 'Content-Type: application/json' \ | ||
--header "date: ${CURRENT_DATE}" \ | ||
--header "fspiop-source: ${DFSP_NAME}" \ | ||
--data-raw "${DATA}"; | ||
done | ||
|
||
echo "MSISDN's have been onboarded" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters