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

✨ @opentdf/remote-store library #210

Merged
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
28 changes: 28 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,33 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

remote-store:
needs:
- lib
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./remote-store
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: './remote-store/package-lock.json'
- uses: actions/download-artifact@v3
with:
name: opentdf-client-lib
path: lib/
- run: npm uninstall @opentdf/client && npm ci && npm i ../lib/opentdf-client-*.tgz
- run: npm install
- run: npm test
- run: npm audit
- run: npm run license-check
- run: npm run lint
- run: npm pack

web-app:
needs:
- lib
Expand Down Expand Up @@ -233,4 +260,5 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: echo "- [Client Library](https://www.npmjs.com/package/@opentdf/client/v/${{ needs.deliver-ghp.outputs.FULL_VERSION }})">>$GITHUB_STEP_SUMMARY
- run: echo "- [Remote Store](https://www.npmjs.com/package/@opentdf/remote-store/v/${{ needs.deliver-ghp.outputs.FULL_VERSION }})">>$GITHUB_STEP_SUMMARY
- run: echo "- [unpkg](https://unpkg.com/browse/@opentdf/client@${{ needs.deliver-ghp.outputs.FULL_VERSION }})">>$GITHUB_STEP_SUMMARY
7 changes: 7 additions & 0 deletions .github/workflows/publish-to.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ npm publish --access public --tag "$t"
# Wait for npm publish to go through...
sleep 5

cd ../remote-store

npm version --no-git-tag-version --allow-same-version "$v"
npm uninstall "@opentdf/client"
npm install "@opentdf/client@$v"
npm publish --access public --tag "$t"

if [[ "$GITHUB_STEP_SUMMARY" ]]; then
echo "### Published ${v} (${t})" >>"$GITHUB_STEP_SUMMARY"
fi
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

version=1.3.1
pkgs=lib web-app
version=2.0.0
extras=remote-store web-app
pkgs=lib $(extras)

.PHONY: all audit license-check lint test ci i start format clean

Expand All @@ -14,13 +15,16 @@ clean:
rm -rf */node_modules

ci: lib/opentdf-client-$(version).tgz
for x in web-app; do (cd $$x && npm uninstall @opentdf/client && npm ci && npm i ../lib/opentdf-client-$(version).tgz) || exit 1; done
for x in $(extras); do (cd $$x && npm uninstall @opentdf/client && npm ci && npm i ../lib/opentdf-client-$(version).tgz) || exit 1; done

i:
(cd lib && npm i && npm pack)
for x in web-app; do (cd $$x && npm uninstall @opentdf/client && npm i && npm i ../lib/opentdf-client-$(version).tgz) || exit 1; done
for x in $(extras); do (cd $$x && npm uninstall @opentdf/client && npm i && npm i ../lib/opentdf-client-$(version).tgz) || exit 1; done

all: ci lib/opentdf-client-$(version).tgz web-app/opentdf-web-app-$(version).tgz
all: ci lib/opentdf-client-$(version).tgz remote-store/opentdf-remote-store-$(version).tgz web-app/opentdf-web-app-$(version).tgz

remote-store/opentdf-remote-store-$(version).tgz: lib/opentdf-client-$(version).tgz $(shell find remote-store -not -path '*/dist*' -and -not -path '*/coverage*' -and -not -path '*/node_modules*')
(cd remote-store && npm ci ../lib/opentdf-client-$(version).tgz && npm pack)

web-app/opentdf-web-app-$(version).tgz: lib/opentdf-client-$(version).tgz $(shell find web-app -not -path '*/dist*' -and -not -path '*/coverage*' -and -not -path '*/node_modules*')
(cd web-app && npm ci ../lib/opentdf-client-$(version).tgz && npm pack)
Expand Down
Loading