![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
io.cucumber:ci-environment
Advanced tools
This library detects the CI environment based on environment variables defined by CI servers.
If a CI server is detected, a CiEnvironment
struct is returned:
{
"name": "...",
"url": "...",
"buildNumber": "...", // optional
"git": { // optional
"remote": "...",
"revision": "...",
"branch": "...", // optional
"tag": "..." // optional
}
}
Note that some fields are optional (they may not be set if the corresponding environment variables are not defined).
Some CI servers expose usernames and passwords in the environment variable
that is used to detect git.remote
. For security reasons, this library removes
the username and password from the git.remote
field in the CiEnvironment
struct.
npm install @cucumber/ci-environment
import detectCiEnvironment from '@cucumber/ci-environment'
const ciEnvironment = detectCiEnvironment(process.env)
console.log(JSON.stringify(ciEnvironment, null, 2))
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>ci-environment</artifactId>
</dependency>
import static io.cucumber.cienvironment.DetectCiEnvironment.detectCiEnvironment;
public class CiEnvironmentExample {
public static void main(String[] args) {
CiEnvironment ciEnvironment = detectCiEnvironment(System.getenv()).orElseThrow(() -> new RuntimeException("No CI environment detected"));
System.out.println("ciEnvironment = " + ciEnvironment);
}
}
gem 'cucumber-ci-environment'
require 'cucumber/ci_environment'
ci_environment = Cucumber::CiEnvironment.detect_ci_environment(ENV)
p ci_environment
go get github.com/cucumber/ci-environment/go@latest
import (
"fmt"
cienvironment "github.com/cucumber/ci-environment/go"
)
func main() {
ci := cienvironment.DetectCIEnvironment()
if ci == nil {
fmt.Println("No CI environment detected")
}
}
import os
from ci_environment import detect_ci_environment
ci_environment = detect_ci_environment(os.environ)
Please see CONTRIBUTING.md for more information.
FAQs
Detect CI Environment from environment variables
We found that io.cucumber:ci-environment demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.