Workers - Access git commit sha and branch name as environment variables in Workers Builds
1y ago
Source
CloudflareWorkers - Access git commit sha and branch name as environment variables in Workers Buildscloudflare.comWorkers Builds connects your Worker to a Git repository , and automates building and deploying your code on each pushed change. To make CI/CD pipelines even more flexible, Workers Builds now automatically injects default environment variables into your build process (much like the defaults in Cloudflare Pages projects ). You can use these variables to customize your build process based on the deployment context, such as the branch or commit. The following environment variables are injected by default: Environment Variable Injected value Example use-case CI true Changing build behavior when run on CI versus locally WORKERS_CI 1 Changing build behavior when run on Workers Builds versus locally WORKERS_CI_BUILD_UUID Passing the Build UUID along to custom workflows WORKERS_CI_COMMIT_SHA Passing current commit ID to error reporting, for example, Sentry WORKERS_CI_BRANCH Settings > Environment variables . Learn more in the Build configuration documentation .
You might also wanna read
Building a Custom Version Control System to Understand Git Internals
The article details the author's personal journey of building their own version control system to understand how Git works internally. It ex
Why a Simple SSH Git Server Is Often Enough for Deployment
The article argues that developers overcomplicate deployment by using complex CI/CD pipelines, Docker containers, and serverless functions w
gopeek-lovat.vercel.app·11d agoWhy software builds must be treated as observable processes, not binary actions
This article argues that software builds are commonly treated as a single binary action (success/failure) in CI/CD pipelines, but this abstr
Using SSH Certificates for Secure Git Commit Signing and Code Authorship Verification
The article discusses the importance of code authorship verification in software development, highlighting the limitations of traditional au

Comments
Sign in to join the conversation.
No comments yet. Be the first.