|
53 | 53 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
54 | 54 | SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
55 | 55 |
|
56 |
| - remote-store: |
57 |
| - needs: |
58 |
| - - lib |
59 |
| - runs-on: ubuntu-latest |
60 |
| - defaults: |
61 |
| - run: |
62 |
| - working-directory: ./remote-store |
63 |
| - timeout-minutes: 5 |
64 |
| - steps: |
65 |
| - - uses: actions/checkout@v3 |
66 |
| - - uses: actions/setup-node@v3 |
67 |
| - with: |
68 |
| - node-version: '18' |
69 |
| - cache: 'npm' |
70 |
| - cache-dependency-path: './remote-store/package-lock.json' |
71 |
| - - uses: actions/download-artifact@v3 |
72 |
| - with: |
73 |
| - name: opentdf-client-lib |
74 |
| - path: lib/ |
75 |
| - - run: npm uninstall @opentdf/client && npm ci && npm i ../lib/opentdf-client-*.tgz |
76 |
| - - run: npm install |
77 |
| - - run: npm test |
78 |
| - - run: npm audit |
79 |
| - - run: npm run license-check |
80 |
| - - run: npm run lint |
81 |
| - - run: npm pack |
82 |
| - |
83 | 56 | web-app:
|
84 | 57 | needs:
|
85 | 58 | - lib
|
@@ -107,24 +80,6 @@ jobs:
|
107 | 80 | - run: npm run lint
|
108 | 81 | - run: npm pack
|
109 | 82 |
|
110 |
| - scripts: |
111 |
| - runs-on: ubuntu-latest |
112 |
| - defaults: |
113 |
| - run: |
114 |
| - working-directory: .github/workflows |
115 |
| - timeout-minutes: 5 |
116 |
| - steps: |
117 |
| - - uses: actions/checkout@v3 |
118 |
| - - uses: mig4/setup-bats@v1 |
119 |
| - with: |
120 |
| - bats-version: 1.2.1 |
121 |
| - - name: 🦇🦇🦇🦇🦇🦇 |
122 |
| - run: docker run --rm -v "$PWD:/mnt" --workdir "/mnt" bats/bats:1.5.0 *.bats |
123 |
| - - name: 🦪 ✔ 🧼🧼🧼 |
124 |
| - run: >- |
125 |
| - docker run --rm -v "$PWD:/mnt" --workdir "/mnt" "koalaman/shellcheck:v0.8.0" |
126 |
| - --color=always *.sh |
127 |
| -
|
128 | 83 | backend-roundtrip:
|
129 | 84 | needs:
|
130 | 85 | - web-app
|
@@ -171,88 +126,3 @@ jobs:
|
171 | 126 | OPENTDF_INGRESS_HOST_PORT: "5432"
|
172 | 127 | PLAYWRIGHT_TESTS_TO_RUN: roundtrip
|
173 | 128 | run: tilt ci
|
174 |
| - |
175 |
| - deliver-ghp: |
176 |
| - needs: [lib, web-app, scripts, backend-roundtrip] |
177 |
| - runs-on: ubuntu-latest |
178 |
| - timeout-minutes: 5 |
179 |
| - # To publish from a release or feature branch, remove the ref == condition below |
180 |
| - if: >- |
181 |
| - (github.event_name == 'push' && github.ref == 'refs/heads/main') |
182 |
| - || (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/')) |
183 |
| - || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')) |
184 |
| - outputs: |
185 |
| - FULL_VERSION: ${{ steps.guess-build-metadata.outputs.FULL_VERSION }} |
186 |
| - DIST_TAG: ${{ steps.guess-build-metadata.outputs.DIST_TAG }} |
187 |
| - TARGET_VERSION: ${{ steps.check-version.outputs.TARGET_VERSION }} |
188 |
| - steps: |
189 |
| - - uses: actions/checkout@v3 |
190 |
| - - uses: actions/setup-node@v3 |
191 |
| - with: |
192 |
| - node-version: '18.x' |
193 |
| - registry-url: https://npm.pkg.github.com |
194 |
| - - name: Check version number is same between tag, library, and/or release |
195 |
| - id: check-version |
196 |
| - run: |- |
197 |
| - if [[ ${{ github.ref }} = refs/heads/release/* ]]; then |
198 |
| - scripts/check-version-is.sh "${GITHUB_REF##*release/}" |
199 |
| - elif [[ ${{ github.ref }} = refs/tags/v* ]]; then |
200 |
| - scripts/check-version-is.sh "${GITHUB_REF_NAME#v}" |
201 |
| - else |
202 |
| - scripts/check-version-is.sh |
203 |
| - fi |
204 |
| - - name: Check version number is same between tag, library, and/or release |
205 |
| - id: guess-build-metadata |
206 |
| - run: |- |
207 |
| - echo "FULL_VERSION=$(.github/workflows/gh-semver.sh)" >> $GITHUB_OUTPUT |
208 |
| - echo "DIST_TAG=$(.github/workflows/guess-dist-tag.sh)" >> $GITHUB_OUTPUT |
209 |
| - - run: make test |
210 |
| - - run: make doc |
211 |
| - - run: echo "::notice file=lib/package.json::Will be published to [GitHub Packages](https://github.com/opentdf/client-web/pkgs/npm/client) as ${{ steps.guess-build-metadata.outputs.DIST_TAG }} with version=[${{ steps.guess-build-metadata.outputs.FULL_VERSION }}]" |
212 |
| - - run: >- |
213 |
| - .github/workflows/publish-to.sh |
214 |
| - ${{ steps.guess-build-metadata.outputs.FULL_VERSION }} |
215 |
| - ${{ steps.guess-build-metadata.outputs.DIST_TAG }} |
216 |
| - env: |
217 |
| - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
218 |
| - - run: echo "- [Client Library](https://github.com/opentdf/client-web/pkgs/npm/client)">>$GITHUB_STEP_SUMMARY |
219 |
| - - name: trigger xtest |
220 |
| - run: >- |
221 |
| - curl -XPOST |
222 |
| - -u "virtru-cloudnative:${{secrets.PERSONAL_ACCESS_TOKEN}}" |
223 |
| - -H "Accept: application/vnd.github.everest-preview+json" |
224 |
| - -H "Content-Type: application/json" |
225 |
| - "https://api.github.com/repos/opentdf/backend/dispatches" |
226 |
| - --data '{"event_type":"xtest","client_payload":{"version":"'${FULL_VERSION%%+*}'"}}' |
227 |
| - env: |
228 |
| - FULL_VERSION: ${{ steps.guess-build-metadata.outputs.FULL_VERSION }} |
229 |
| - - name: Publish documentation to gh-pages |
230 |
| - |
231 |
| - with: |
232 |
| - branch: gh-pages |
233 |
| - folder: lib/dist/docs |
234 |
| - |
235 |
| - deliver-npmjs: |
236 |
| - runs-on: ubuntu-latest |
237 |
| - timeout-minutes: 5 |
238 |
| - environment: npmjs |
239 |
| - needs: deliver-ghp |
240 |
| - if: >- |
241 |
| - (github.event_name == 'push' && github.ref == 'refs/heads/main') |
242 |
| - || (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/')) |
243 |
| - || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')) |
244 |
| - steps: |
245 |
| - - uses: actions/checkout@v3 |
246 |
| - - uses: actions/setup-node@v3 |
247 |
| - with: |
248 |
| - node-version: '18.x' |
249 |
| - registry-url: 'https://registry.npmjs.org' |
250 |
| - - run: make all |
251 |
| - - run: >- |
252 |
| - .github/workflows/publish-to.sh ${{ needs.deliver-ghp.outputs.FULL_VERSION }} |
253 |
| - ${{ needs.deliver-ghp.outputs.DIST_TAG }} |
254 |
| - env: |
255 |
| - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
256 |
| - - run: echo "- [Client Library](https://www.npmjs.com/package/@opentdf/client/v/${{ needs.deliver-ghp.outputs.FULL_VERSION }})">>$GITHUB_STEP_SUMMARY |
257 |
| - - run: echo "- [Remote Store](https://www.npmjs.com/package/@opentdf/remote-store/v/${{ needs.deliver-ghp.outputs.FULL_VERSION }})">>$GITHUB_STEP_SUMMARY |
258 |
| - - run: echo "- [unpkg](https://unpkg.com/browse/@opentdf/client@${{ needs.deliver-ghp.outputs.FULL_VERSION }})">>$GITHUB_STEP_SUMMARY |
0 commit comments