Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

sg: cloud ephemeral - add build and upgrade commands#62533

Merged
burmudar merged 10 commits intomainfrom
wb/sg/cloud-upgrade
May 9, 2024
Merged

sg: cloud ephemeral - add build and upgrade commands#62533
burmudar merged 10 commits intomainfrom
wb/sg/cloud-upgrade

Conversation

@burmudar
Copy link
Contributor

@burmudar burmudar commented May 8, 2024

There are times when you just want to create a cloud ephemeral deployment. Previously the only way to get a ephemeral build would've been to run sg cloud deploy and then get a deployment failure because a deployment already exists.

In this PR we add:

sg cloud build which triggers a cloud ephemeral deployment

go run ./dev/sg cloud build
🧪 EXPERIMENTAL COMMAND - Do you want to continue? (yes/no) y
✅ Build 273307 created. Build progress can be viewed at https://buildkite.com/sourcegraph/sourcegraph/builds/273307

  The build will push images with the following tag/version:  wb-sg-cloud-upgrade_273307_2024-05-08_5.3-6d0d9eac5838
  Once this build completes, you can:

  • create a deployment with this build by running  sg cloud deploy --version wb-sg-cloud-upgrade_273307_2024-05-08_5.3-6d0d9eac5838
  • upgrade the existing deployment with this build by running  sg cloud upgrade --version wb-sg-cloud-upgrade_273307_2024-05-08_5.3-6d0d9eac5838

sg cloud upgrade to upgrade an existing deployment

sg cloud deploy only creates instances and will not upgrade existing instances. This was done to make the semantics of the commands easier and not conflate deploy with too much housekeeping tasks

sourcegraph on  wb/sg/cloud-upgrade [$!] via 🐹 v1.22.1 took 16s
❯ go run ./dev/sg cloud upgrade --name "wb-sg-cloud-eph-delete" --version "wb-sg-cloud-deploy-api_270801_2024-04-25_5.3-0d48809b20fb"
🧪 EXPERIMENTAL COMMAND - Do you want to continue? (yes/no) y
✅ Version "wb-sg-cloud-deploy-api_270801_2024-04-25_5.3-0d48809b20fb" found in Cloud ephemeral registry
Instance details:
ID           : src-8b8f805ddec0406fdb14
Name         : wb-sg-cloud-eph-delete
InstanceType : ephemeral
Environment  :
Version      : wb-sg-cloud-eph-delete_271241_2024-04-29_5.3-76a614889b0a
URL          : https://wb-sg-cloud-eph-delete.sgdev.dev/
AdminEmail   : william.bezuidenhout@sourcegraph.com
CreatedAt    : 1970-01-01T00:00:00Z
DeletetAt    : 1970-01-01T00:00:00Z
ExpiresAt    : 2024-04-29T20:09:17Z
Project      : src-026f9fde9d8fb6c817c5
Region       : us-central1
Status       : in progress
ActionURL    :
Error        :

✅ Upgrade of "wb-sg-cloud-eph-delete" to version "wb-sg-cloud-deploy-api_270801_2024-04-25_5.3-0d48809b20fb" has been triggered - access at: https://wb-sg-cloud-eph-delete.sgdev.dev/

Test plan

Tested locally

@burmudar burmudar requested review from a team and filiphaftek May 8, 2024 09:48
@cla-bot cla-bot bot added the cla-signed label May 8, 2024
@burmudar burmudar self-assigned this May 8, 2024
@burmudar burmudar force-pushed the wb/sg/cloud-upgrade branch from 76d6017 to f801d88 Compare May 8, 2024 13:09
@burmudar burmudar merged commit de33a21 into main May 9, 2024
@burmudar burmudar deleted the wb/sg/cloud-upgrade branch May 9, 2024 09:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants