Files
smart-crop-ui/crop-x/scripts/deploy.js
2025-10-24 11:48:41 +08:00

43 lines
1.2 KiB
JavaScript

import axios from 'axios';
var data = JSON.stringify({
"namespace": "argo",
"template_name": "repo-runtime-workflow",
"parameters": {
"git-schema": "http",
"git-domain": "gitea-service-http.cropflow-dev.svc.cluster.local:3000",
"git-user": "cavin",
"git-repo": "smart-crop-ui",
"git-revision": "main",
"git-pat": "b6c02bf1aec73d7bbbfbe590ea37564a29c4bd5d",
"docker-image-domain": "172.16.102.3:30648",
"docker-dockerfile-path": "./Dockerfile.crop-x",
"resource-cpu-limit": "500m",
"resource-memory-limit": "512Mi",
"resource-gpu-mem-limit": "",
"resource-mount-path": "/data",
"resource-mount-capacity": "",
"app-namespace": "argo",
"app-env-vars": "",
"app-ingress-host": ".dev.maimaiag.com",
"app-container-port": "3000",
"security-scan-enabled": "false"
}
});
var config = {
method: 'post',
url: 'https://gitea-admin-argo-workflow-api-app.dev.maimaiag.com/api/v1/workflows/from-template',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});