Skip to content

Commit cb6f757

Browse files
fix: Use reusable start-additional-kas workflow (#215)
Reduce loc, limit places to update kas mode code/configs
1 parent b075194 commit cb6f757

File tree

1 file changed

+12
-68
lines changed

1 file changed

+12
-68
lines changed

.github/workflows/checks.yaml

+12-68
Original file line numberDiff line numberDiff line change
@@ -104,67 +104,20 @@ jobs:
104104
env:
105105
BUF_INPUT_HTTPS_USERNAME: opentdf-bot
106106
BUF_INPUT_HTTPS_PASSWORD: ${{ secrets.PERSONAL_ACCESS_TOKEN_OPENTDF }}
107-
- name: Check out platform
108-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
109-
with:
110-
repository: opentdf/platform
111-
ref: main
112-
path: platform
113-
- name: Set up go
114-
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
115-
with:
116-
go-version: "1.22.3"
117-
check-latest: false
118-
cache-dependency-path: |
119-
platform/service/go.sum
120-
platform/examples/go.sum
121-
platform/protocol/go/go.sum
122-
platform/sdk/go.sum
123-
- run: go mod download
124-
working-directory: platform
125-
- run: go mod verify
126-
working-directory: platform
127-
- name: Create keys
128-
run: |
129-
.github/scripts/init-temp-keys.sh
130-
cp opentdf-dev.yaml opentdf.yaml
131-
sudo chmod -R 777 ./keys
132-
working-directory: platform
133-
- name: Trust the locally issued cert
134-
run: |
135-
keytool \
136-
-importcert \
137-
-storepass changeit \
138-
-noprompt \
139-
-file localhost.crt \
140-
-keystore $JAVA_HOME/lib/security/cacerts \
141-
-alias localhost-for-tests
142-
working-directory: platform/keys
143-
- name: Bring the services up
144-
run: docker compose up -d --wait --wait-timeout 240
145-
working-directory: platform
146-
- name: Provision keycloak
147-
run: go run ./service provision keycloak
148-
working-directory: platform
149-
- name: Provision fixtures
150-
run: go run ./service provision fixtures
151-
working-directory: platform
152-
- name: Start server in background
153-
uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635
107+
108+
- name: Check out and start up platform with deps/containers
109+
id: run-platform
110+
uses: opentdf/platform/test/start-up-with-containers@main
154111
with:
155-
run: |
156-
go run ./service start
157-
wait-on: |
158-
tcp:localhost:8080
159-
log-output-if: true
160-
wait-for: 90s
161-
working-directory: platform
112+
platform-ref: main
113+
162114
- name: Get grpcurl
163115
run: go install github.com/fullstorydev/grpcurl/cmd/[email protected]
164116
- name: Make sure that the platform is up
165117
run: |
166118
grpcurl -plaintext localhost:8080 list && \
167119
grpcurl -plaintext localhost:8080 kas.AccessService/PublicKey
120+
168121
- name: Validate the SDK through the command line interface
169122
run: |
170123
printf 'here is some data to encrypt' > data
@@ -225,21 +178,12 @@ jobs:
225178
fi
226179
working-directory: cmdline
227180

228-
- uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635
229-
name: start another KAS server in background
181+
- name: Start additional kas
182+
uses: opentdf/platform/test/start-additional-kas@main
230183
with:
231-
run: >
232-
<opentdf.yaml >opentdf-beta.yaml yq e '
233-
(.server.port = 8282)
234-
| (.mode = ["kas"])
235-
| (.sdk_config = {"endpoint":"http://localhost:8080","plaintext":true,"client_id":"opentdf","client_secret":"secret"})
236-
'
237-
&& go run ./service --config-file ./opentdf-beta.yaml start
238-
wait-on: |
239-
tcp:localhost:8282
240-
log-output-if: true
241-
wait-for: 90s
242-
working-directory: platform
184+
kas-port: 8282
185+
kas-name: beta
186+
243187
- name: Make sure that the second platform is up
244188
run: |
245189
grpcurl -plaintext localhost:8282 kas.AccessService/PublicKey

0 commit comments

Comments
 (0)