mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-06-07 06:33:06 -04:00
More CICD Hacking
[ci dryrun]
This commit is contained in:
parent
a708f1bb97
commit
c9af09f45e
3 changed files with 13 additions and 9 deletions
|
@ -11,6 +11,7 @@ stages:
|
||||||
- build_packages
|
- build_packages
|
||||||
- distribute
|
- distribute
|
||||||
- release
|
- release
|
||||||
|
- cleanup
|
||||||
- failed
|
- failed
|
||||||
|
|
||||||
format:
|
format:
|
||||||
|
@ -278,7 +279,9 @@ dryrun_package_linux:
|
||||||
- build-amd64-deb
|
- build-amd64-deb
|
||||||
script:
|
script:
|
||||||
- earthly bootstrap
|
- earthly bootstrap
|
||||||
- earthly +package-linux
|
- earthly +package-linux-amd64-deb
|
||||||
|
- earthly +package-linux-amd64-rpm
|
||||||
|
- earthly +package-linux-arm64-deb
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- target/packages/*
|
- target/packages/*
|
||||||
|
@ -336,11 +339,11 @@ dryrun_deploy_repos:
|
||||||
- if: $CI_COMMIT_MESSAGE =~ /\[ci dryrun]/
|
- if: $CI_COMMIT_MESSAGE =~ /\[ci dryrun]/
|
||||||
|
|
||||||
dryrun_delete_build_machines:
|
dryrun_delete_build_machines:
|
||||||
stage: distribute
|
stage: cleanup
|
||||||
needs:
|
|
||||||
- dryrun_deploy_repos
|
|
||||||
tags:
|
tags:
|
||||||
- build-orchestration
|
- build-orchestration
|
||||||
|
dependencies:
|
||||||
|
- dryrun_create_build_machines
|
||||||
script:
|
script:
|
||||||
- uv --directory scripts/cicd-python sync
|
- uv --directory scripts/cicd-python sync
|
||||||
- uv --directory scripts/cicd-python run veilid_release_utils.py --delete-build-machine
|
- uv --directory scripts/cicd-python run veilid_release_utils.py --delete-build-machine
|
||||||
|
@ -367,7 +370,7 @@ nightly_create_build_machines:
|
||||||
nightly_package_amd64_deb:
|
nightly_package_amd64_deb:
|
||||||
stage: build_packages
|
stage: build_packages
|
||||||
needs:
|
needs:
|
||||||
- dryrun_create_build_machines
|
- nightly_create_build_machines
|
||||||
tags:
|
tags:
|
||||||
- build-amd64-deb
|
- build-amd64-deb
|
||||||
script:
|
script:
|
||||||
|
|
|
@ -3,6 +3,5 @@
|
||||||
"name": "build-server-tmp",
|
"name": "build-server-tmp",
|
||||||
"image": 181423111,
|
"image": 181423111,
|
||||||
"size": "c2-16vcpu-32gb"
|
"size": "c2-16vcpu-32gb"
|
||||||
},
|
}
|
||||||
"droplet_id": 483191411
|
|
||||||
}
|
}
|
|
@ -79,7 +79,7 @@ async def create_build_machine(token: str) -> None:
|
||||||
file=sys.stderr)
|
file=sys.stderr)
|
||||||
sys.exit("Droplet data missing in polling response")
|
sys.exit("Droplet data missing in polling response")
|
||||||
|
|
||||||
print("Droplet is up and running.")
|
print(f"Droplet ID {droplet_id} is up and running.")
|
||||||
# Once active, send a final GET request to output the droplet's information.
|
# Once active, send a final GET request to output the droplet's information.
|
||||||
async with session.get(droplet_url, headers=headers) as final_resp:
|
async with session.get(droplet_url, headers=headers) as final_resp:
|
||||||
if final_resp.status != 200:
|
if final_resp.status != 200:
|
||||||
|
@ -105,6 +105,8 @@ async def delete_build_machine(token: str) -> None:
|
||||||
}
|
}
|
||||||
delete_url = f"https://api.digitalocean.com/v2/droplets/{droplet_id}"
|
delete_url = f"https://api.digitalocean.com/v2/droplets/{droplet_id}"
|
||||||
|
|
||||||
|
print(f"Deleting droplet ID {droplet_id}")
|
||||||
|
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
async with session.delete(delete_url, headers=headers) as resp:
|
async with session.delete(delete_url, headers=headers) as resp:
|
||||||
if resp.status != 204:
|
if resp.status != 204:
|
||||||
|
@ -116,4 +118,4 @@ async def delete_build_machine(token: str) -> None:
|
||||||
# Remove droplet ID from config
|
# Remove droplet ID from config
|
||||||
config.pop("droplet_id", None)
|
config.pop("droplet_id", None)
|
||||||
save_config(config)
|
save_config(config)
|
||||||
print("Droplet ID removed from config.")
|
print(f"Droplet ID {droplet_id} removed from config.")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue