[CHORE] Bump Deps and adjust Dockerfile (#8)
Co-authored-by: dunemask <dunemask@gmail.com> Reviewed-on: https://gitea.dunemask.net/elysium/qualiteer/pulls/8
This commit is contained in:
parent
d56f3697b8
commit
e76b7f1117
11 changed files with 1686 additions and 6217 deletions
42
.gitea/workflows/ci-deployment.yml
Normal file
42
.gitea/workflows/ci-deployment.yml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
name: DevOps Test Deployment
|
||||||
|
run-name: ${{ gitea.actor }} DevOps Test Deployment
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
REPO_DIR: ${{ gitea.workspace }}/qualiteer
|
||||||
|
KUBECONFIG_BASE64: ${{ secrets.KUBECONFIG_USW_DEV }}
|
||||||
|
GITEA_TOKEN: ${{ secrets.ELYSIUM_ORG_READ_TOKEN }}
|
||||||
|
OASIS_PROD_CONFIG: ${{ secrets.OASIS_PROD_CONFIG }}
|
||||||
|
GARDEN_BUILD_ACTION_LINK: build.qualiteer-image
|
||||||
|
GARDEN_DEPLOY_ACTION_LINK: deploy.qualiteer
|
||||||
|
GARDEN_DEPLOY_ACTION: qualiteer
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ci-deployment:
|
||||||
|
steps:
|
||||||
|
- name: Oasis Setup
|
||||||
|
uses: https://gitea.dunemask.net/elysium/oasis-action@master
|
||||||
|
with:
|
||||||
|
gitea-token: ${{ env.GITEA_TOKEN }}
|
||||||
|
kubeconfig: ${{ env.KUBECONFIG_BASE64 }}
|
||||||
|
oasis-prod-config: ${{ env.OASIS_PROD_CONFIG }}
|
||||||
|
# Test Code
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
path: ${{ env.REPO_DIR }}
|
||||||
|
# Garden tests
|
||||||
|
- name: Link Repo code to Garden
|
||||||
|
run: |
|
||||||
|
garden link action $GARDEN_BUILD_ACTION_LINK $REPO_DIR --env usw-ci
|
||||||
|
garden link action $GARDEN_DEPLOY_ACTION_LINK $REPO_DIR --env usw-ci
|
||||||
|
working-directory: ${{ env.OASIS_WORKSPACE }}
|
||||||
|
# Cubit CI Tests
|
||||||
|
- name: Run Cubit tests in CI env
|
||||||
|
run: garden deploy $GARDEN_DEPLOY_ACTION --env usw-ci
|
||||||
|
working-directory: ${{ env.OASIS_WORKSPACE }}
|
||||||
|
- name: Status Alert
|
||||||
|
if: always()
|
||||||
|
run: echo "The Job ended with status ${{ job.status }}."
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,3 +3,4 @@ build/
|
||||||
jobs/*
|
jobs/*
|
||||||
qltr-executor
|
qltr-executor
|
||||||
.env
|
.env
|
||||||
|
dist/bundles/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM node:18
|
FROM node:18 AS common
|
||||||
WORKDIR /dunemask/net/qualiteer
|
WORKDIR /dunemask/net/qualiteer
|
||||||
# Copy dependencies
|
# Copy dependencies
|
||||||
COPY package.json .
|
COPY package.json .
|
||||||
|
@ -9,6 +9,11 @@ COPY public public
|
||||||
COPY dist dist
|
COPY dist dist
|
||||||
COPY src src
|
COPY src src
|
||||||
COPY lib lib
|
COPY lib lib
|
||||||
|
|
||||||
|
FROM common AS executor-bin
|
||||||
|
RUN npm run build:executor
|
||||||
|
|
||||||
|
FROM common AS application
|
||||||
COPY index.html .
|
COPY index.html .
|
||||||
COPY vite.config.js .
|
COPY vite.config.js .
|
||||||
RUN npm run build:react
|
RUN npm run build:react
|
||||||
|
|
14
dist/bundles/qualiteer-executor.mjs
vendored
14
dist/bundles/qualiteer-executor.mjs
vendored
File diff suppressed because one or more lines are too long
|
@ -2,17 +2,15 @@ import { URL } from "node:url";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import caxa from "caxa";
|
import caxa from "caxa";
|
||||||
import { rollup } from "rollup";
|
import { rollup } from "rollup";
|
||||||
import loadConfigFile from "rollup/loadConfigFile";
|
import { loadConfigFile } from "rollup/loadConfigFile";
|
||||||
import { executorLibraryDir, binName, scriptName } from "./executor-config.js";
|
import { executorLibraryDir, binName, scriptName } from "./executor-config.js";
|
||||||
// Fix import
|
|
||||||
const { default: caxaPackage } = caxa;
|
|
||||||
// Rollup Config
|
// Rollup Config
|
||||||
const rollupConfigPath = path.resolve(executorLibraryDir, "rollup.config.js");
|
const rollupConfigPath = path.resolve(executorLibraryDir, "rollup.config.js");
|
||||||
|
|
||||||
// Build functions
|
// Build functions
|
||||||
async function packageBin() {
|
async function packageBin() {
|
||||||
console.log("Packaging bundle into binary");
|
console.log("Packaging bundle into binary");
|
||||||
return caxaPackage({
|
return caxa({
|
||||||
input: "dist/bundles/",
|
input: "dist/bundles/",
|
||||||
output: `bin/${binName}`,
|
output: `bin/${binName}`,
|
||||||
command: ["{{caxa}}/node_modules/.bin/node", `{{caxa}}/${scriptName}`],
|
command: ["{{caxa}}/node_modules/.bin/node", `{{caxa}}/${scriptName}`],
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { nodeResolve } from "@rollup/plugin-node-resolve";
|
import { nodeResolve } from "@rollup/plugin-node-resolve";
|
||||||
import commonjs from "@rollup/plugin-commonjs";
|
import commonjs from "@rollup/plugin-commonjs";
|
||||||
import { terser } from "rollup-plugin-terser";
|
import terser from "@rollup/plugin-terser";
|
||||||
import {
|
import {
|
||||||
executorLibraryDir,
|
executorLibraryDir,
|
||||||
entrypointName,
|
entrypointName,
|
||||||
|
|
|
@ -11,7 +11,6 @@ export default async function createJob(jobRequest) {
|
||||||
const kc = new k8s.KubeConfig();
|
const kc = new k8s.KubeConfig();
|
||||||
kc.loadFromCluster();
|
kc.loadFromCluster();
|
||||||
const batchV1Api = kc.makeApiClient(k8s.BatchV1Api);
|
const batchV1Api = kc.makeApiClient(k8s.BatchV1Api);
|
||||||
const batchV1beta1Api = kc.makeApiClient(k8s.BatchV1beta1Api);
|
|
||||||
const jobName = job.metadata.name;
|
const jobName = job.metadata.name;
|
||||||
batchV1Api
|
batchV1Api
|
||||||
.createNamespacedJob(jobNamespace, job)
|
.createNamespacedJob(jobNamespace, job)
|
||||||
|
|
7772
package-lock.json
generated
7772
package-lock.json
generated
File diff suppressed because it is too large
Load diff
52
package.json
52
package.json
|
@ -36,43 +36,43 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@kubernetes/client-node": "^0.17.0",
|
"@kubernetes/client-node": "^0.18.1",
|
||||||
"amqplib": "^0.10.3",
|
"amqplib": "^0.10.3",
|
||||||
"chalk": "^5.0.1",
|
"chalk": "^5.3.0",
|
||||||
"dotenv": "^16.0.2",
|
"dotenv": "^16.3.1",
|
||||||
"express": "^4.18.1",
|
"express": "^4.18.2",
|
||||||
"figlet": "^1.5.2",
|
"figlet": "^1.6.0",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"path": "^0.12.7",
|
"path": "^0.12.7",
|
||||||
"pg-promise": "^10.12.0",
|
"pg-promise": "^11.5.4",
|
||||||
"postgres-migrations": "^5.3.0",
|
"postgres-migrations": "^5.3.0",
|
||||||
"socket.io": "^4.5.2",
|
"socket.io": "^4.7.2",
|
||||||
"socket.io-client": "^4.5.2",
|
"socket.io-client": "^4.7.2",
|
||||||
"uuid": "^9.0.0"
|
"uuid": "^9.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@emotion/react": "^11.10.4",
|
"@emotion/react": "^11.11.1",
|
||||||
"@emotion/styled": "^11.10.4",
|
"@emotion/styled": "^11.11.0",
|
||||||
"@mui/icons-material": "^5.10.3",
|
"@mui/icons-material": "^5.14.8",
|
||||||
"@mui/material": "^5.10.4",
|
"@mui/material": "^5.14.8",
|
||||||
"@rollup/plugin-commonjs": "^22.0.2",
|
"@rollup/plugin-commonjs": "^25.0.4",
|
||||||
"@rollup/plugin-node-resolve": "^14.0.0",
|
"@rollup/plugin-node-resolve": "^15.2.1",
|
||||||
"@rollup/plugin-replace": "^4.0.0",
|
"@rollup/plugin-replace": "^5.0.2",
|
||||||
"@tanstack/react-query": "^4.2.3",
|
"@rollup/plugin-terser": "^0.4.3",
|
||||||
"@vitejs/plugin-react": "2.1.0",
|
"@tanstack/react-query": "^4.35.0",
|
||||||
"axios": "^0.27.2",
|
"@vitejs/plugin-react": "4.0.4",
|
||||||
"caxa": "^2.1.0",
|
"axios": "^1.5.0",
|
||||||
"concurrently": "^7.3.0",
|
"caxa": "^3.0.1",
|
||||||
|
"concurrently": "^8.2.1",
|
||||||
"lodash.merge": "^4.6.2",
|
"lodash.merge": "^4.6.2",
|
||||||
"nodemon": "^2.0.19",
|
"nodemon": "^3.0.1",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^3.0.3",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-router-dom": "^6.3.0",
|
"react-router-dom": "^6.15.0",
|
||||||
"readline-sync": "^1.4.10",
|
"readline-sync": "^1.4.10",
|
||||||
"rollup": "^2.79.0",
|
"rollup": "^3.29.0",
|
||||||
"rollup-plugin-terser": "^7.0.2",
|
"vite": "4.4.9"
|
||||||
"vite": "3.1.0"
|
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"rabbiteer": "gitlab:Dunemask/rabbiteer#d2b8b92427a79ecccfa31d07269aec6fa5e550b3"
|
"rabbiteer": "gitlab:Dunemask/rabbiteer#d2b8b92427a79ecccfa31d07269aec6fa5e550b3"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{- if .Values.serviceAccount.create -}}
|
{{- if .Values.serviceAccount.create -}}
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRoleBinding
|
kind: RoleBinding
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "qualiteer.serviceAccountName" . }}
|
name: {{ include "qualiteer.serviceAccountName" . }}
|
||||||
subjects:
|
subjects:
|
||||||
|
@ -8,7 +8,7 @@ subjects:
|
||||||
name: {{ include "qualiteer.serviceAccountName" . }}
|
name: {{ include "qualiteer.serviceAccountName" . }}
|
||||||
namespace: {{ .Values.qualiteer.jobNamespace | default .Release.Namespace }}
|
namespace: {{ .Values.qualiteer.jobNamespace | default .Release.Namespace }}
|
||||||
roleRef:
|
roleRef:
|
||||||
kind: ClusterRole
|
kind: Role
|
||||||
name: {{ include "qualiteer.serviceAccountName" . }}
|
name: {{ include "qualiteer.serviceAccountName" . }}
|
||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
{{- end }}
|
{{- end }}
|
|
@ -1,6 +1,6 @@
|
||||||
{{- if .Values.serviceAccount.create -}}
|
{{- if .Values.serviceAccount.create -}}
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRole
|
kind: Role
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "qualiteer.serviceAccountName" . }}
|
name: {{ include "qualiteer.serviceAccountName" . }}
|
||||||
rules:
|
rules:
|
Loading…
Add table
Add a link
Reference in a new issue