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

PLAT-1679 roundtrip test with backend #43

Merged
merged 16 commits into from
Apr 29, 2022
Merged
Show file tree
Hide file tree
Changes from 12 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
55 changes: 55 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ jobs:
with:
bats-version: 1.2.1
- run: bats bin/opentdf.bats
- uses: actions/upload-artifact@v2
with:
name: opentdf-cli
path: ./cli/opentdf-cli-*.tgz

sample-web-app:
needs:
Expand Down Expand Up @@ -152,6 +156,57 @@ jobs:
repo: context.repo.repo,
body,
});

backend-roundtrip:
needs:
- cli
runs-on: ubuntu-latest
defaults:
run:
working-directory: .github/workflows/roundtrip
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: '.github/workflows/roundtrip/package-lock.json'
- uses: actions/download-artifact@v2
with:
name: opentdf-client-lib
- uses: actions/download-artifact@v2
with:
name: opentdf-cli
- name: Git clone backend
run: |
git clone https://github.com/opentdf/documentation.git
- uses: yokawasa/[email protected]
with:
setup-tools: |
kubectl
helm
tilt
# This should be in sync with the minikube-deployed kube version below
kubectl: "1.23.1"
helm: "3.8.0"
tilt: "0.26.2"
- run: |
kubectl version --client
kustomize version
tilt version
- name: start minikube
id: minikube
uses: medyagh/setup-minikube@master
with:
minikube-version: 1.25.1
# This should be in sync with the setup-tools version above
kubernetes-version: 1.23.1
- name: Run tilt ci
env:
#path relative to the quickstart Tiltfile
TEST_SCRIPT: ../../encrypt-decrypt.sh
run: |-
tilt ci --file documentation/quickstart/Tiltfile

deliver-ghp:
runs-on: ubuntu-latest
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/roundtrip/encrypt-decrypt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -e

cd ../..
pwd

mv ../../../opentdf-cli-*.tgz ../../../cli
npm uninstall @opentdf/cli && npm ci && npm i ../../../cli/opentdf-cli-*.tgz

touch ./sample.txt
echo "Hello World!" >> ./sample.txt
elizabethhealy marked this conversation as resolved.
Show resolved Hide resolved

npx @opentdf/cli --log-level DEBUG \
--kasEndpoint http://localhost:65432/api/kas \
--oidcEndpoint http://localhost:65432 \
--auth tdf:tdf-client:123-456 \
--output sample.txt.tdf encrypt sample.txt \
--attributes https://example.com/attr/Classification/value/S,https://example.com/attr/COI/value/PRX

npx @opentdf/cli --log-level DEBUG \
--kasEndpoint http://localhost:65432/api/kas \
--oidcEndpoint http://localhost:65432 \
--auth tdf:tdf-client:123-456 \
--output sample_out.txt decrypt sample.txt.tdf

diff sample.txt sample_out.txt
Copy link

@bleggett bleggett Apr 27, 2022

Choose a reason for hiding this comment

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

It's a very good sign and a testament to the CI work you guys have been doing that adding this e2e test is basically + 25 lines.


echo "Rountrip successful!"
elizabethhealy marked this conversation as resolved.
Show resolved Hide resolved
Loading