Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Enable Deployment from Git Repositories to Akash Network #358

Closed
wants to merge 76 commits into from
Closed
Show file tree
Hide file tree
Changes from 65 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
001311a
create 23 files and update 8 files
dharamveergit Aug 16, 2024
93053db
feat: Update Remote Deploy
dharamveergit Aug 16, 2024
774ed43
update 4 files and create 2 files
dharamveergit Aug 16, 2024
2c8636d
feat: new Repo selection
dharamveergit Aug 16, 2024
1dec0b3
feat: Bitbucket Repo Selection
dharamveergit Aug 16, 2024
ab30a3b
feat: Gitlab Repo Selection
dharamveergit Aug 16, 2024
d7ef049
fix: Gitlab repos ui fix
dharamveergit Aug 16, 2024
82e25fe
feat: update disable _pull
dharamveergit Aug 16, 2024
89f5d5c
fix : update ui
dharamveergit Aug 17, 2024
5c125d5
feat: New Frameworks
dharamveergit Aug 17, 2024
6466920
feat: vite Framework
dharamveergit Aug 17, 2024
dc35ad4
fix: open fix repos
dharamveergit Aug 17, 2024
040a626
update Repos.tsx, RemoteDeployUpdate.tsx and utils.ts
dharamveergit Aug 19, 2024
d047872
fix : more git repo fetch
dharamveergit Aug 20, 2024
4fb2650
test: temp fix
dharamveergit Aug 21, 2024
0a8a3eb
fix: relogin
dharamveergit Aug 22, 2024
cf05236
feat: remote-deploy: bug fixes
dharamveergit Aug 22, 2024
a788457
fix: redeploy advanced
dharamveergit Aug 22, 2024
6805c5a
update GihubDeploy.tsx
dharamveergit Aug 23, 2024
f681b75
update 5 files
dharamveergit Aug 23, 2024
cf15e95
update RemoteDeployUpdate.tsx and templates.ts
dharamveergit Aug 24, 2024
4ec0ee1
Merge remote-tracking branch 'upstream/main'
dharamveergit Aug 26, 2024
449c4e4
update : descriptions
dharamveergit Aug 26, 2024
29591f1
fixes: type
dharamveergit Aug 28, 2024
5e5b392
fix:repo filtering
dharamveergit Aug 28, 2024
7cd8536
remove: console.logs
dharamveergit Aug 28, 2024
21973f8
fix: repo redeploy selection
dharamveergit Aug 28, 2024
933c1a4
feat: images for git accounts
dharamveergit Aug 28, 2024
41a30c6
Merge remote-tracking branch 'upstream/main'
dharamveergit Aug 29, 2024
b9239ea
fix: filtering of repo (In Github)
dharamveergit Aug 29, 2024
0d64352
fix: ui (remote deploy)
dharamveergit Aug 30, 2024
a18e288
ui fix : rollback
dharamveergit Aug 30, 2024
1d785ef
Merge remote-tracking branch 'upstream/main'
dharamveergit Aug 30, 2024
e2d66fc
update Rollback.tsx
dharamveergit Aug 30, 2024
5547af2
fix : names( Remote Deploy)
dharamveergit Aug 31, 2024
7c623b5
update LeaseRow.tsx
dharamveergit Aug 31, 2024
5491178
fix: ui issues (Remote Deploy)
dharamveergit Aug 31, 2024
895d42c
remove : service name edit form remote deploy
dharamveergit Aug 31, 2024
cbf4dd9
update Advanced.tsx and EnvFormModal.tsx
dharamveergit Sep 3, 2024
69c0366
api: github api (next)
dharamveergit Sep 5, 2024
0bdadb4
Merge remote-tracking branch 'upstream/main'
dharamveergit Sep 6, 2024
18bdf90
next api: remote deploy - gitlab,bitbucket
dharamveergit Sep 6, 2024
874145c
ui fixes : Env and account ui (Remote Deploy)
dharamveergit Sep 7, 2024
c49d5d1
fix : env in update deployment
dharamveergit Sep 7, 2024
83ec32b
fix: Account select in smaller screens (Remote Deploy)
dharamveergit Sep 7, 2024
7e0d4f8
Merge remote-tracking branch 'upstream/main'
dharamveergit Sep 7, 2024
4c1c7a0
remove: console logs (Remote Deploy)
dharamveergit Sep 7, 2024
2cd1458
update api.ts
dharamveergit Sep 7, 2024
2841b9e
Merge pull request #6 from dharamveergit/main
dharamveergit Sep 7, 2024
376bbfa
fix: auth github
dharamveergit Sep 7, 2024
86428b0
build(deps): update package-lock.json
dharamveergit Sep 7, 2024
6104d66
update authenticate.ts
dharamveergit Sep 7, 2024
65c1d49
fix : Deploy
dharamveergit Sep 7, 2024
c86d5bc
Merge pull request #7 from dharamveergit/main
dharamveergit Sep 7, 2024
1469353
fix: remove "Environment Variables" in expanded state (Remote Deploy)
dharamveergit Sep 9, 2024
01708cd
Merge pull request #8 from dharamveergit/main
dharamveergit Sep 9, 2024
b9ed85b
Merge remote-tracking branch 'upstream/main'
dharamveergit Sep 12, 2024
29c8d5a
fix: Reordering of variables and useEffects
dharamveergit Sep 12, 2024
2da9923
fix: code clean (Remote Deploy)
dharamveergit Sep 12, 2024
a693d7a
fix: type fixes (Remote Deploy)
dharamveergit Sep 12, 2024
6f38fa9
fix: types (Remote Deploy)
dharamveergit Sep 12, 2024
299fe33
update Repos.tsx, bitbucket-api.ts and gitlab-api.ts
dharamveergit Sep 12, 2024
c026375
fix: vercel deploy fix
dharamveergit Sep 12, 2024
5647200
revert: vercel deploy
dharamveergit Sep 12, 2024
bcf6b8d
Merge pull request #9 from dharamveergit/main
dharamveergit Sep 12, 2024
5821792
fix: types and api class logic (Remote Deployment)
dharamveergit Sep 13, 2024
1a2ab6b
fix: vercel deploy
dharamveergit Sep 13, 2024
c133100
Merge pull request #10 from dharamveergit/main
dharamveergit Sep 13, 2024
999660c
Merge remote-tracking branch 'upstream/main'
dharamveergit Sep 13, 2024
beebec7
Merge pull request #11 from dharamveergit/main
dharamveergit Sep 13, 2024
dfb4367
fix: fetch deploy.yml from awesome akash
dharamveergit Sep 16, 2024
166016f
Merge pull request #12 from dharamveergit/main
dharamveergit Sep 16, 2024
83a2a06
Merge remote-tracking branch 'upstream/main'
dharamveergit Sep 20, 2024
3052eca
Merge remote-tracking branch 'upstream/main'
dharamveergit Sep 20, 2024
368b22a
build(deps): update browser-env.config.ts, env-config.schema.ts and p…
dharamveergit Sep 20, 2024
cc5beed
Merge pull request #13 from dharamveergit/main
dharamveergit Sep 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/deploy-web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const moduleExports = {
styledComponents: true
},
images: {
domains: ["raw.githubusercontent.com"]
domains: ["raw.githubusercontent.com", "avatars.githubusercontent.com"]
},
output: "standalone",
typescript: {
Expand Down
37 changes: 37 additions & 0 deletions apps/deploy-web/src/components/deployments/DeploymentDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { createRef, useEffect, useState } from "react";
import { Alert, Button, buttonVariants, Spinner, Tabs, TabsList, TabsTrigger } from "@akashnetwork/ui/components";
import { ArrowLeft } from "iconoir-react";
import yaml from "js-yaml";
import Link from "next/link";
import { useRouter, useSearchParams } from "next/navigation";
import { NextSeo } from "next-seo";
Expand All @@ -16,10 +17,12 @@ import { useDeploymentLeaseList } from "@src/queries/useLeaseQuery";
import { useProviderList } from "@src/queries/useProvidersQuery";
import { RouteStep } from "@src/types/route-steps.type";
import { AnalyticsEvents } from "@src/utils/analytics";
import { deploymentData } from "@src/utils/deploymentData";
import { getDeploymentLocalData } from "@src/utils/deploymentLocalDataUtils";
import { cn } from "@src/utils/styleUtils";
import { UrlService } from "@src/utils/urlUtils";
import Layout from "../layout/Layout";
import { getRepoUrl, isRedeployImage } from "../remote-deploy/utils";
import { Title } from "../shared/Title";
import { DeploymentDetailTopBar } from "./DeploymentDetailTopBar";
import { DeploymentLeaseShell } from "./DeploymentLeaseShell";
Expand All @@ -31,10 +34,16 @@ import { ManifestUpdate } from "./ManifestUpdate";
export function DeploymentDetail({ dseq }: React.PropsWithChildren<{ dseq: string }>) {
const router = useRouter();
const [activeTab, setActiveTab] = useState("LEASES");
const [editedManifest, setEditedManifest] = useState<string | null>(null);
const [deploymentVersion, setDeploymentVersion] = useState<string | null>(null);
const [showOutsideDeploymentMessage, setShowOutsideDeploymentMessage] = useState(false);
const { address, isWalletLoaded } = useWallet();
const { isSettingsInit } = useSettings();
const [leaseRefs, setLeaseRefs] = useState<Array<any>>([]);
const [deploymentManifest, setDeploymentManifest] = useState<string | null>(null);
const remoteDeploy: boolean = editedManifest && isRedeployImage(editedManifest) ? true : false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const remoteDeploy: boolean = editedManifest && isRedeployImage(editedManifest) ? true : false;
const remoteDeploy: boolean = !!editedManifest && isRedeployImage(editedManifest);

const repo: string | null = remoteDeploy ? getRepoUrl(editedManifest) : null;

const {
data: deployment,
isFetching: isLoadingDeployment,
Expand Down Expand Up @@ -95,6 +104,25 @@ export function DeploymentDetail({ dseq }: React.PropsWithChildren<{ dseq: strin
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isWalletLoaded, isSettingsInit]);

useEffect(() => {
const init = async () => {
const localDeploymentData = getDeploymentLocalData(deployment?.dseq || "");

if (localDeploymentData && localDeploymentData.manifest) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (localDeploymentData && localDeploymentData.manifest) {
if (localDeploymentData?.manifest) {

setShowOutsideDeploymentMessage(false);
setEditedManifest(localDeploymentData?.manifest);
const yamlVersion = yaml.load(localDeploymentData?.manifest);
const version = await deploymentData.getManifestVersion(yamlVersion);

setDeploymentVersion(version);
} else {
setShowOutsideDeploymentMessage(true);
}
};

init();
}, [deployment]);

useEffect(() => {
if (leases && leases.some(l => l.state === "active")) {
if (tabQuery) {
Expand Down Expand Up @@ -173,6 +201,13 @@ export function DeploymentDetail({ dseq }: React.PropsWithChildren<{ dseq: strin

{activeTab === "EDIT" && deployment && leases && (
<ManifestUpdate
editedManifest={editedManifest as string}
deploymentVersion={deploymentVersion}
setEditedManifest={setEditedManifest}
setDeploymentVersion={setDeploymentVersion}
setShowOutsideDeploymentMessage={setShowOutsideDeploymentMessage}
showOutsideDeploymentMessage={showOutsideDeploymentMessage}
remoteDeploy={remoteDeploy}
deployment={deployment}
leases={leases}
closeManifestEditor={() => {
Expand All @@ -199,6 +234,7 @@ export function DeploymentDetail({ dseq }: React.PropsWithChildren<{ dseq: strin
{leases &&
leases.map((lease, i) => (
<LeaseRow
repo={repo}
key={lease.id}
lease={lease}
setActiveTab={setActiveTab}
Expand All @@ -207,6 +243,7 @@ export function DeploymentDetail({ dseq }: React.PropsWithChildren<{ dseq: strin
dseq={dseq}
providers={providers || []}
loadDeploymentDetail={loadDeploymentDetail}
remoteDeploy={remoteDeploy}
/>
))}

Expand Down
Loading
Loading