-
Notifications
You must be signed in to change notification settings - Fork 54
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
Closed
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 93053db
feat: Update Remote Deploy
dharamveergit 774ed43
update 4 files and create 2 files
dharamveergit 2c8636d
feat: new Repo selection
dharamveergit 1dec0b3
feat: Bitbucket Repo Selection
dharamveergit ab30a3b
feat: Gitlab Repo Selection
dharamveergit d7ef049
fix: Gitlab repos ui fix
dharamveergit 82e25fe
feat: update disable _pull
dharamveergit 89f5d5c
fix : update ui
dharamveergit 5c125d5
feat: New Frameworks
dharamveergit 6466920
feat: vite Framework
dharamveergit dc35ad4
fix: open fix repos
dharamveergit 040a626
update Repos.tsx, RemoteDeployUpdate.tsx and utils.ts
dharamveergit d047872
fix : more git repo fetch
dharamveergit 4fb2650
test: temp fix
dharamveergit 0a8a3eb
fix: relogin
dharamveergit cf05236
feat: remote-deploy: bug fixes
dharamveergit a788457
fix: redeploy advanced
dharamveergit 6805c5a
update GihubDeploy.tsx
dharamveergit f681b75
update 5 files
dharamveergit cf15e95
update RemoteDeployUpdate.tsx and templates.ts
dharamveergit 4ec0ee1
Merge remote-tracking branch 'upstream/main'
dharamveergit 449c4e4
update : descriptions
dharamveergit 29591f1
fixes: type
dharamveergit 5e5b392
fix:repo filtering
dharamveergit 7cd8536
remove: console.logs
dharamveergit 21973f8
fix: repo redeploy selection
dharamveergit 933c1a4
feat: images for git accounts
dharamveergit 41a30c6
Merge remote-tracking branch 'upstream/main'
dharamveergit b9239ea
fix: filtering of repo (In Github)
dharamveergit 0d64352
fix: ui (remote deploy)
dharamveergit a18e288
ui fix : rollback
dharamveergit 1d785ef
Merge remote-tracking branch 'upstream/main'
dharamveergit e2d66fc
update Rollback.tsx
dharamveergit 5547af2
fix : names( Remote Deploy)
dharamveergit 7c623b5
update LeaseRow.tsx
dharamveergit 5491178
fix: ui issues (Remote Deploy)
dharamveergit 895d42c
remove : service name edit form remote deploy
dharamveergit cbf4dd9
update Advanced.tsx and EnvFormModal.tsx
dharamveergit 69c0366
api: github api (next)
dharamveergit 0bdadb4
Merge remote-tracking branch 'upstream/main'
dharamveergit 18bdf90
next api: remote deploy - gitlab,bitbucket
dharamveergit 874145c
ui fixes : Env and account ui (Remote Deploy)
dharamveergit c49d5d1
fix : env in update deployment
dharamveergit 83ec32b
fix: Account select in smaller screens (Remote Deploy)
dharamveergit 7e0d4f8
Merge remote-tracking branch 'upstream/main'
dharamveergit 4c1c7a0
remove: console logs (Remote Deploy)
dharamveergit 2cd1458
update api.ts
dharamveergit 2841b9e
Merge pull request #6 from dharamveergit/main
dharamveergit 376bbfa
fix: auth github
dharamveergit 86428b0
build(deps): update package-lock.json
dharamveergit 6104d66
update authenticate.ts
dharamveergit 65c1d49
fix : Deploy
dharamveergit c86d5bc
Merge pull request #7 from dharamveergit/main
dharamveergit 1469353
fix: remove "Environment Variables" in expanded state (Remote Deploy)
dharamveergit 01708cd
Merge pull request #8 from dharamveergit/main
dharamveergit b9ed85b
Merge remote-tracking branch 'upstream/main'
dharamveergit 29c8d5a
fix: Reordering of variables and useEffects
dharamveergit 2da9923
fix: code clean (Remote Deploy)
dharamveergit a693d7a
fix: type fixes (Remote Deploy)
dharamveergit 6f38fa9
fix: types (Remote Deploy)
dharamveergit 299fe33
update Repos.tsx, bitbucket-api.ts and gitlab-api.ts
dharamveergit c026375
fix: vercel deploy fix
dharamveergit 5647200
revert: vercel deploy
dharamveergit bcf6b8d
Merge pull request #9 from dharamveergit/main
dharamveergit 5821792
fix: types and api class logic (Remote Deployment)
dharamveergit 1a2ab6b
fix: vercel deploy
dharamveergit c133100
Merge pull request #10 from dharamveergit/main
dharamveergit 999660c
Merge remote-tracking branch 'upstream/main'
dharamveergit beebec7
Merge pull request #11 from dharamveergit/main
dharamveergit dfb4367
fix: fetch deploy.yml from awesome akash
dharamveergit 166016f
Merge pull request #12 from dharamveergit/main
dharamveergit 83a2a06
Merge remote-tracking branch 'upstream/main'
dharamveergit 3052eca
Merge remote-tracking branch 'upstream/main'
dharamveergit 368b22a
build(deps): update browser-env.config.ts, env-config.schema.ts and p…
dharamveergit cc5beed
Merge pull request #13 from dharamveergit/main
dharamveergit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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"; | ||||||
|
@@ -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"; | ||||||
|
@@ -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; | ||||||
const repo: string | null = remoteDeploy ? getRepoUrl(editedManifest) : null; | ||||||
|
||||||
const { | ||||||
data: deployment, | ||||||
isFetching: isLoadingDeployment, | ||||||
|
@@ -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) { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
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) { | ||||||
|
@@ -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={() => { | ||||||
|
@@ -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} | ||||||
|
@@ -207,6 +243,7 @@ export function DeploymentDetail({ dseq }: React.PropsWithChildren<{ dseq: strin | |||||
dseq={dseq} | ||||||
providers={providers || []} | ||||||
loadDeploymentDetail={loadDeploymentDetail} | ||||||
remoteDeploy={remoteDeploy} | ||||||
/> | ||||||
))} | ||||||
|
||||||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.