Package io.jenkins.plugins.har.cli
Class HarnessGlobalConfiguration
java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
io.jenkins.plugins.har.cli.HarnessGlobalConfiguration
- All Implemented Interfaces:
ExtensionPoint,Describable<GlobalConfiguration>,Saveable,Loadable,OnMaster
@Extension
@Symbol("harnessCliConfig")
public class HarnessGlobalConfiguration
extends GlobalConfiguration
Global Jenkins configuration for the Harness CLI plugin.
Appears under Manage Jenkins → Configure System → Harness CLI Configuration.
These credentials are used by the HcStep pipeline step to automatically
run hc auth login before the first hc command in each build,
so individual pipeline steps do not need to handle authentication themselves.
TODO: Open Manage Jenkins → Configure System and fill in:
- API URL — Harness API endpoint (default: https://app.harness.io)
- API Token — a Personal Access Token (PAT) from Harness (mandatory)
- Org ID — Harness organisation ID (optional)
- Project ID — Harness project ID (optional)
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.SelfNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanconfigure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) doCheckApiToken(String value) doCheckApiUrl(String value) static HarnessGlobalConfigurationget()Returns the singleton instance registered by Jenkins.getOrgId()voidsetApiToken(Secret apiToken) voidvoidvoidsetProjectId(String projectId) Methods inherited from class jenkins.model.GlobalConfiguration
all, configure, getDescriptor, getGlobalConfigPageMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
HarnessGlobalConfiguration
public HarnessGlobalConfiguration()
-
-
Method Details
-
get
Returns the singleton instance registered by Jenkins. -
getApiUrl
-
getApiToken
-
getOrgId
-
getProjectId
-
setApiUrl
-
setApiToken
-
setOrgId
-
setProjectId
-
doCheckApiUrl
-
doCheckApiToken
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) throws Descriptor.FormException - Overrides:
configurein classGlobalConfiguration- Throws:
Descriptor.FormException
-
getDisplayName
- Overrides:
getDisplayNamein classDescriptor<GlobalConfiguration>
-