Repository navigation
Support deploying from CI - #20
Merged
Merged
Conversation
- VALAR_TOKEN, VALAR_ENDPOINT and VALAR_PROJECT take precedence over the active context and .valar.yml's project, so CI needs no config file. A missing default config file no longer prints a warning. - build push --wait streams the build log to stderr, waits for the build and its deployment, and exits non-zero if either fails. push honours --service and keeps .valar.yml's build settings for it. - build watch exits non-zero when the build failed. - service url prints the service's URLs, custom domains first. - service disable and enable sent the opposite status, and their --service flag was never registered. enable now waits while the instances of an earlier disable are still stopping. - A malformed .valar.yml is an error instead of being ignored.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
This is what
valar/actionv3 needs, and it helps any CI that runs the CLI.VALAR_TOKEN,VALAR_ENDPOINTandVALAR_PROJECTtake precedence over the active context and over the project in.valar.yml.VALAR_TOKENtalks tohttps://api.valar.dev/v2.VALARCONFIGpath that is missing still does.valar build push --wait [--timeout 30m].push --service.pushnow honours--serviceand keeps.valar.yml's build and deployment settings for that service, which is what pull request previews need. Before, the fallback dropped both sections whenever--servicewas given.valar build watchexits non-zero when the build failed.valar service urlprints the service's URLs from its listed domains, linked custom domains first, then the<project>-<service>ones.service disableandenable:disablesentdisabled=false. This went unnoticed because the route only arrives with platform#244.--serviceflag was never registered.enablenow retries for up to two minutes while #244 answers 409 because the instances of an earlier disable are still stopping..valar.yml. A file that doesn't parse is now an error instead of being silently ignored.Testing
go test ./...andgo vet ./...pass. New tests cover:--serviceoverride keeping build settings, andVALAR_PROJECT;--no-deploy, batch service, missing deployment, timeout;push --waitexits 0 after "Deployed version 1",service urlprints a URL that serves the page,disablegives 503, andenablestraight after waits and serves 200 again;push --wait --service ciwaitpr1deploys a preview with.valar.yml's build settings;push --waitandwatchboth exit 1.