public abstract class PasswordProtectedAdapterCargo extends DefaultCargoContainerAdapterImpl
Tomcat7xAdapter
as an example, but applies to all.
v1.0 Stored password as plain text
<Tomcat7xAdapter>
<userName>admin</userName>
<password>pw</password>
<url>http://example.com:8080</url>
</Tomcat7xAdapter>
v1.9 Used Scrambler
to base64 encode password. readResolve converted plaintext password
to passwordScrambled.
<Tomcat7xAdapter>
<userName>admin</userName>
<passwordScrambled>cHcNCg==</passwordScrambled>
<url>http://example.com:8080</url>
</Tomcat7xAdapter>
v1.11 Full support of credentials. To be backwards compatible and not break builds converts old configurations
from password or passwordScrambled to credentials.
<Tomcat7xAdapter>
<credentialsId>aDjnKd4j-s66fnF53-2dmAS7PkqD4</credentialsId>
<url>http://example.com:8080</url>
</Tomcat7xAdapter>
DefaultCargoContainerAdapterImpl.Property
CargoContainerAdapter.DeployCallable
Constructor and Description |
---|
PasswordProtectedAdapterCargo(String credentialsId) |
PasswordProtectedAdapterCargo(String userName,
String password)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
String |
getCredentialsId() |
String |
getPassword() |
String |
getUrl() |
String |
getUsername() |
void |
loadCredentials(hudson.model.Job<?,?> job)
Loads the credentials for a job.
|
boolean |
migrateCredentials(List<com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials> generated)
Migrates to credentials.
|
void |
redeployFile(hudson.FilePath war,
String aContextPath,
hudson.model.Run<?,?> run,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
Perform redeployment.
|
configure
createEAR, createWAR, deploy, expandVariable, getContainer, getContainerId
all, getDescriptor, redeploy
public String userName
public PasswordProtectedAdapterCargo(String credentialsId)
@Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) @Deprecated public PasswordProtectedAdapterCargo(String userName, String password)
public void redeployFile(hudson.FilePath war, String aContextPath, hudson.model.Run<?,?> run, hudson.Launcher launcher, hudson.model.TaskListener listener) throws IOException, InterruptedException
CargoContainerAdapter
ContainerAdapter.redeploy(FilePath, String, AbstractBuild, Launcher, BuildListener)
delegate to that implementation to be usable within Pipeline projectsredeployFile
in class CargoContainerAdapter
war
- the path of the war/ear file to deployaContextPath
- the context path for the war to be deployedrun
- the build that is being deployedlauncher
- the launcher of the buildlistener
- the BuildListener of the build to deployIOException
- if there is an error locating the war fileInterruptedException
- if there is an error deploying to the serverpublic void loadCredentials(hudson.model.Job<?,?> job)
job
- the job to lookup the scope forpublic String getCredentialsId()
@DefaultCargoContainerAdapterImpl.Property(value="cargo.remote.username") public String getUsername()
@DefaultCargoContainerAdapterImpl.Property(value="cargo.remote.password") @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public String getPassword()
public String getUrl()
public boolean migrateCredentials(List<com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials> generated)
generated
- generated credentials which should be checkedCopyright © 2016–2020. All rights reserved.