Skip to content

feat: make build and start commands to be able to use node 17 and higher #161

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 18 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ jobs:
name: Build Docker local image
command: |
echo "Building Docker image: local"
docker build -t $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:local .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ruirochawork , I am not sure why you want too replace the variable names with hardcoded values. But we have a standard for circleCI config file across all the mojaloop repositories

Copy link
Author

@ruirochawork ruirochawork Jan 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @vijayg10 , I was just testing out on why the docker build is failing. Seems like it might be an issue with populating some kind of environment variable, hence why I changed the state of the PR to draft until I figure out what it is.

https://app.circleci.com/pipelines/github/mojaloop/ml-testing-toolkit-ui/673/workflows/51dd6c16-011d-4249-b696-dbe35a2c1957/jobs/2784

#!/bin/bash -eo pipefail
echo "Building Docker image: local"
docker build -t $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:local .

Building Docker image: local
invalid argument "/ml-testing-toolkit-ui:local" for "-t, --tag" flag: invalid reference format
See 'docker build --help'.

Exited with code exit status 125
CircleCI received exit code 125

Do you happen to know what the problem might be? Would appreciate if you or someone else could help me with this issue since in the other PR it seems to have solved the problem by directly placing the value.

https://app.circleci.com/pipelines/github/mojaloop/ml-testing-toolkit-ui/679

docker build -t mojaloop-testing-toolkit-ui:local .
- run:
name: Save docker image to workspace
command: docker save -o /tmp/docker-image-local.tar $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:local
command: docker save -o /tmp/docker-image-local.tar mojaloop-testing-toolkit-ui:local
- persist_to_workspace:
root: /tmp
paths:
Expand All @@ -298,10 +298,10 @@ jobs:
name: Re-tag the image
command: |
echo "Re-tagging Docker image: $CIRCLE_TAG"
docker tag $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:local $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG
docker tag mojaloop-testing-toolkit-ui:local mojaloop-testing-toolkit-ui:$CIRCLE_TAG
- run:
name: Save the new docker image to workspace
command: docker save -o /tmp/docker-image.tar $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG
command: docker save -o /tmp/docker-image.tar mojaloop-testing-toolkit-ui:$CIRCLE_TAG
- persist_to_workspace:
root: /tmp
paths:
Expand All @@ -320,7 +320,7 @@ jobs:
# <<: *defaults_license_scanner
# - run:
# name: Run the license-scanner
# command: cd /tmp/license-scanner && mode=docker dockerImages=$DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG make run
# command: cd /tmp/license-scanner && mode=docker dockerImages=mojaloop-testing-toolkit-ui:$CIRCLE_TAG make run
# - store_artifacts:
# path: /tmp/license-scanner/results
# prefix: licenses
Expand Down Expand Up @@ -376,7 +376,7 @@ jobs:
- anchore/analyze_local_image:
# Force the older version, version 0.7.0 was just published, and is broken
anchore_version: v0.6.1
image_name: "docker.io/nginx:1.16.0-alpine $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG"
image_name: "docker.io/nginx:1.16.0-alpine mojaloop-testing-toolkit-ui:$CIRCLE_TAG"
policy_failure: false
timeout: '500'
# Note: if the generated policy is invalid, this will fallback to the default policy, which we don't want!
Expand Down Expand Up @@ -503,18 +503,18 @@ jobs:
- run:
name: Re-tag pre built image
command: |
docker tag $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$RELEASE_TAG
docker tag mojaloop-testing-toolkit-ui:$CIRCLE_TAG mojaloop-testing-toolkit-ui:$RELEASE_TAG
- run:
name: Publish Docker image $CIRCLE_TAG & Latest tag to Docker Hub
command: |
echo "Publishing $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG"
docker push $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG
echo "Publishing $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$RELEASE_TAG"
docker push $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$RELEASE_TAG
echo "Publishing mojaloop-testing-toolkit-ui:$CIRCLE_TAG"
docker push mojaloop-testing-toolkit-ui:$CIRCLE_TAG
echo "Publishing mojaloop-testing-toolkit-ui:$RELEASE_TAG"
docker push mojaloop-testing-toolkit-ui:$RELEASE_TAG
- run:
name: Set Image Digest
command: |
IMAGE_DIGEST=$(docker inspect $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:v${CIRCLE_TAG:1} | jq '.[0].RepoDigests | .[]')
IMAGE_DIGEST=$(docker inspect mojaloop-testing-toolkit-ui:v${CIRCLE_TAG:1} | jq '.[0].RepoDigests | .[]')
echo "IMAGE_DIGEST=${IMAGE_DIGEST}"
echo "export IMAGE_DIGEST=${IMAGE_DIGEST}" >> $BASH_ENV
- run:
Expand Down Expand Up @@ -561,18 +561,18 @@ jobs:
- run:
name: Re-tag pre built image
command: |
docker tag $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$RELEASE_TAG
docker tag mojaloop-testing-toolkit-ui:$CIRCLE_TAG mojaloop-testing-toolkit-ui:$RELEASE_TAG
- run:
name: Publish Docker image $CIRCLE_TAG & Latest tag to Docker Hub
command: |
echo "Publishing $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG"
docker push $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG
echo "Publishing $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$RELEASE_TAG"
docker push $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$RELEASE_TAG
echo "Publishing mojaloop-testing-toolkit-ui:$CIRCLE_TAG"
docker push mojaloop-testing-toolkit-ui:$CIRCLE_TAG
echo "Publishing mojaloop-testing-toolkit-ui:$RELEASE_TAG"
docker push mojaloop-testing-toolkit-ui:$RELEASE_TAG
- run:
name: Set Image Digest
command: |
IMAGE_DIGEST=$(docker inspect $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:v${CIRCLE_TAG:1} | jq '.[0].RepoDigests | .[]')
IMAGE_DIGEST=$(docker inspect mojaloop-testing-toolkit-ui:v${CIRCLE_TAG:1} | jq '.[0].RepoDigests | .[]')
echo "IMAGE_DIGEST=${IMAGE_DIGEST}"
echo "export IMAGE_DIGEST=${IMAGE_DIGEST}" >> $BASH_ENV
- run:
Expand Down
4 changes: 3 additions & 1 deletion audit-ci.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
"GHSA-76p3-8jx3-jpfq",
"GHSA-3rfm-jhwj-7488",
// json5. Unable to fix using npm audit fix which is updating mermaid causing build issues
"GHSA-9c47-m6qq-7p4h"
"GHSA-9c47-m6qq-7p4h",
// Unable to fix using npm audit fix --force due to breaking changes on the build
"GHSA-hhq3-ff78-jv3g"
]
}
Loading