Skip to content

ci: run build step separately from deploy step #7891

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

Closed
johnstcn opened this issue Jun 7, 2023 · 4 comments
Closed

ci: run build step separately from deploy step #7891

johnstcn opened this issue Jun 7, 2023 · 4 comments

Comments

@johnstcn
Copy link
Member

johnstcn commented Jun 7, 2023

Problem

Currently, our ci/deploy step builds the project, copies the package over to dev.coder.com and installs the package in one step.

#7887 occurred for the following reasons:

  • A previous change passed all of the CI jobs that are run on pull request
  • Upon merge, the deploy step ran which failed at running make build
  • This caused the deploy step to fail post-merge.

Proposed Solution

  • Run a separate build step on PR.
  • Do not upload the build artifacts on PR branch, but only on main branch.
  • Make the deploy step contingent on the build step, and modify it to use the artifacts from the build step.
@johnstcn
Copy link
Member Author

johnstcn commented Jun 7, 2023

Potential scope creep: it would also be really nice if we also built and pushed a Docker image ghcr.io/coder/coder:main / ghcr.io/coder/coder:$GIT_REVISION_SHORT on each merge to main.

@matifali
Copy link
Member

matifali commented Jun 11, 2023

+1 for the main docker image.
I created a sperate issue for this #7916

@ammario ammario removed the bug risk label Aug 24, 2023
@matifali
Copy link
Member

matifali commented Nov 12, 2023

We are doing this now for some time and publishing it as ghcr.io/coder/coder-preview:main and ghcr.io/coder/coder-preview:$GIT_REVISION_SHORT
Probably we should move to K8s or simply a docker-compose deployment. This will also address #8043

@matifali
Copy link
Member

We now have separate build and deploy jobs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants