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

Update branch b-1.7 #37

Merged
merged 15 commits into from
May 15, 2024
Merged
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
6 changes: 4 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

strategy:
matrix:
node-version: [14.x]
node-version: [18.x]

steps:
- name: Checkout
Expand All @@ -38,7 +38,9 @@ jobs:

- name: Install & Build
run: |
npm install
echo @geo-knowledge-hub:registry=http://127.0.0.1:4873 > ~/.npmrc

npm --legacy-peer-deps install
npm run build

- name: Lint
Expand Down
2 changes: 1 addition & 1 deletion docker/builder/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
build:
context: ${PWD}/docker/builder/services/verdaccio/
dockerfile: ${PWD}/docker/builder/services/verdaccio/Dockerfile
image: verdaccio-registry:5.10
image: verdaccio-registry:5.10.2
hostname: "verdaccio-registry"
container_name: "verdaccio-registry"
network_mode: bridge
Expand Down
2 changes: 1 addition & 1 deletion docker/builder/finish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
#
# 1. Stopping the services
#
docker-compose -f docker/builder/docker-compose.yml down
docker compose -f docker/builder/docker-compose.yml down
8 changes: 8 additions & 0 deletions docker/builder/services/integrity-regularizer/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,18 @@
# 2. Getting dependencies
#
dependencies = package_json["dependencies"]
packages = package_json["packages"]

#
# 3. Removing dependencies from GEO Knowledge Hub packages installed from GitHub
#

# Packages
for depkey in packages.keys():
if "@geo-knowledge-hub" in depkey and "integrity" in packages[depkey]:
del packages[depkey]["integrity"]

# Dependencies
for depkey in dependencies.keys():
if "@geo-knowledge-hub" in depkey and "integrity" in dependencies[depkey]:
del dependencies[depkey]["integrity"]
Expand Down
2 changes: 1 addition & 1 deletion docker/builder/services/verdaccio/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

FROM node:12

RUN npm install -g verdaccio \
RUN npm install -g verdaccio@5.10.2 \
&& npm install -g verdaccio-auth-memory \
&& npm install -g verdaccio-memory \
&& npm install -g [email protected]
Expand Down
19 changes: 13 additions & 6 deletions docker/builder/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,35 @@ extract_from_quotes() {
#
# 1. Configuring the required services to build
#
docker-compose -f docker/builder/docker-compose.yml up -d
docker compose -f docker/builder/docker-compose.yml up -d

#
# 2. Authenticating on registry
#

# installing utility tool to auth
npm install -g npm-cli-login
npm install -g npm-cli-adduser

# authenticating
npm-cli-login \
npm-cli-adduser \
-u $VERDACCIO_USERNAME \
-p $VERDACCIO_PASSWORD \
-e $VERDACCIO_EMAIL \
-r $VERDACCIO_LOCAL_REGISTRY

echo @geo-knowledge-hub:registry=${VERDACCIO_DOCKER_REGISTRY} > ~/.npmrc

#
# 3. Publishing JavaScript dependencies from `geo-components-react` to verdaccio
#

# build required dependencies
npm install -g rimraf json rollup

# registering the local registry
echo "@geo-knowledge-hub:registry=${VERDACCIO_DOCKER_REGISTRY}" >> ~/.npmrc

# configuring npm to be compatible with Node 16
echo "legacy-peer-deps=true" >> ~/.npmrc

# extract the dependencies from the `geo-knowledge-hub`
# note: `@geo-knowledge-hub` is the scope defined to the `geo-knowledge-hub` packages
JAVASCRIPT_DEPENDENCIES_VERSION=`cat package.json | grep -e @geo-knowledge-hub/ | tail -n 4 | head -n 2`
Expand Down Expand Up @@ -91,7 +98,7 @@ do
# (Example where the issue is discussed: https://github.com/npm/cli/issues/2846)
python3 ${INTEGRITY_REGULARIZER}

npm install
npm --legacy-peer-deps install
npm run build
npm publish --registry $VERDACCIO_LOCAL_REGISTRY

Expand Down
Loading
Loading