This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
Build Knight-Light NodeJS Server: wip: remove nodeAffinity and jnlp container Signed-off-by: Chaz Leong <13462818+cleong14@users.noreply.github.com> #625
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Knight-Light NodeJS Server | |
run-name: "Build Knight-Light NodeJS Server: ${{ github.event.head_commit.message }}" | |
on: [push, workflow_dispatch] | |
jobs: | |
code-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
- name: Install dependencies | |
run: | | |
cd node-server | |
npm ci | |
unit-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
- name: Test with Node | |
run: | | |
cd node-server | |
npm ci | |
npm run test:unit | |
workflow_engine: | |
runs-on: ubuntu-latest | |
name: Run Workflow Engine | |
steps: | |
- uses: actions/checkout@v4 | |
- id: vars | |
run: | | |
echo full_image_tag="ttl.sh/$(cat /proc/sys/kernel/random/uuid):30m" >> $GITHUB_OUTPUT | |
echo full_bundle_tag="ttl.sh/$(cat /proc/sys/kernel/random/uuid):30m" >> $GITHUB_OUTPUT | |
- name: Run Workflow Engine | |
uses: cms-enterprise/batcave-workflow-engine-action/image-build-scan-publish/docker@main | |
with: | |
build_dir: "node-server" | |
dockerfile: "node-server/Dockerfile" | |
tag: ${{ steps.vars.outputs.full_image_tag }} | |
bundle_publish_tag: ${{ steps.vars.outputs.full_bundle_tag }} | |
deploy_impl: | |
runs-on: ubuntu-latest | |
needs: workflow_engine | |
steps: | |
- name: Clone Manifest | |
uses: actions/checkout@v4 | |
with: | |
repository: CMS-Enterprise/batcave-knight-light-manifest | |
ssh-key: ${{ secrets.MANIFEST_DEPLOY_TOKEN }} | |
- uses: gatecheckdev/deploykit-action/kustomize@main | |
with: | |
image: ${{ needs.workflow_engine.outputs.full_image_tag }} | |
directory: "." | |
service: "knight-light-server-nodejs" | |
service_directory: "impl" | |
manifest_deploy_token: ${{ secrets.MANIFEST_DEPLOY_TOKEN }} |