Class ScmMaterial<T extends ScmMaterial<?>>

All Implemented Interfaces:
Configurable, KeyVal.Mixin, Notifies.MaterialMixin, UtilsMixin
Direct Known Subclasses:
GitHubPRMaterial, GitMaterial, HgMaterial, P4Material, SvnMaterial, TfsMaterial

public abstract class ScmMaterial<T extends ScmMaterial<?>> extends Material<T> implements Notifies.MaterialMixin
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    By default GoCD polls the repository for changes automatically.
     
    The directory under the sandbox of Go Agent.
    The encrypted password
    The plain text password in the form of secret param* Use encrypted password instead
     
     
    int
     
    void
    setAutoUpdate(Boolean autoUpdate)
    By default GoCD polls the repository for changes automatically.
    void
    setBlacklist(List<String> blacklist)
    /*
     * Copyright 2022 Thoughtworks, Inc.
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     *     http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */


      git {
        url = 'https://github.com/gocd/gocd'
        blacklist = ['README.md', 'docs/**/*.*']
      }
    void
    setDestination(String destination)
    The directory under the sandbox of Go Agent.
    void
    setEncryptedPassword(String encryptedPassword)
    The encrypted password
    void
    setPassword(String password)
    The plain text password in the form of secret param* Use encrypted password instead
    void
    setUsername(String username)
     
    void
    setWhitelist(List<String> whitelist)
    /*
     * Copyright 2022 Thoughtworks, Inc.
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     *     http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */


      git {
        url = 'https://github.com/gocd/gocd-plugins'
        whitelist = ['src']
      }
     

    Methods inherited from class cd.go.contrib.plugins.configrepo.groovy.dsl.Material

    dup

    Methods inherited from class cd.go.contrib.plugins.configrepo.groovy.dsl.NamedNode

    getName, setName

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface cd.go.contrib.plugins.configrepo.groovy.dsl.mixins.Configurable

    configure

    Methods inherited from interface cd.go.contrib.plugins.configrepo.groovy.dsl.mixins.KeyVal.Mixin

    lookup, lookup

    Methods inherited from interface cd.go.contrib.plugins.configrepo.groovy.dsl.mixins.Notifies.MaterialMixin

    notifiesBitbucketAt, notifiesBitbucketSelfHostedAt, notifiesBy, notifiesGitHubAt, notifiesGitLabAt

    Methods inherited from interface cd.go.contrib.plugins.configrepo.groovy.dsl.mixins.UtilsMixin

    sanitizeName
  • Method Details

    • getBlacklist

      public List<String> getBlacklist()
    • setBlacklist

      public void setBlacklist(List<String> blacklist)
      /*
       * Copyright 2022 Thoughtworks, Inc.
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *     http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


        git {
          url = 'https://github.com/gocd/gocd'
          blacklist = ['README.md', 'docs/**/*.*']
        }
    • getWhitelist

      public List<String> getWhitelist()
    • setWhitelist

      public void setWhitelist(List<String> whitelist)
      /*
       * Copyright 2022 Thoughtworks, Inc.
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *     http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


        git {
          url = 'https://github.com/gocd/gocd-plugins'
          whitelist = ['src']
        }
    • getUsername

      public String getUsername()
    • getEncryptedPassword

      public String getEncryptedPassword()
      The encrypted password
      See Also:
    • getPassword

      public String getPassword()
      The plain text password in the form of secret param* Use encrypted password instead
      See Also:
    • getDestination

      public String getDestination()
      The directory under the sandbox of Go Agent. GoCD will check out the source code into this directory.
    • getAutoUpdate

      public Boolean getAutoUpdate()
      By default GoCD polls the repository for changes automatically. If autoUpdate is set to false then GoCD will not poll the repository for changes. Instead it will check for changes only when you trigger a pipeline that contains this material. If the same material is specified more than once in the configuration file, all of them must have the same value for autoUpdate.
    • setUsername

      public void setUsername(String username)
    • setEncryptedPassword

      public void setEncryptedPassword(String encryptedPassword)
      The encrypted password
      See Also:
    • setPassword

      public void setPassword(String password)
      The plain text password in the form of secret param* Use encrypted password instead
      See Also:
    • setDestination

      public void setDestination(String destination)
      The directory under the sandbox of Go Agent. GoCD will check out the source code into this directory.
    • setAutoUpdate

      public void setAutoUpdate(Boolean autoUpdate)
      By default GoCD polls the repository for changes automatically. If autoUpdate is set to false then GoCD will not poll the repository for changes. Instead it will check for changes only when you trigger a pipeline that contains this material. If the same material is specified more than once in the configuration file, all of them must have the same value for autoUpdate.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Material<T extends ScmMaterial<?>>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Material<T extends ScmMaterial<?>>
    • toString

      public String toString()
      Overrides:
      toString in class Material<T extends ScmMaterial<?>>