Class AbstractBuiltInArtifact<T extends AbstractBuiltInArtifact>

All Implemented Interfaces:
Configurable, KeyVal.Mixin, UtilsMixin
Direct Known Subclasses:
BuildArtifact, TestArtifact

public abstract class AbstractBuiltInArtifact<T extends AbstractBuiltInArtifact> extends AbstractArtifact<T>
Represents a artifact that should be uploaded from the agent to the server.

/*
 * 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.
 */


  job('build') {
    artifacts {
      build {
        source = 'target/jcoverage'
        destination = 'Jcoverage'
      }
      test {
        source = 'target/reports/junit/**/*.xml'
        destination = 'junit-xml'
      }
      external {
        id = 'docker-release-candidate'
        storeId = 'dockerhub'
        configuration = [
          image: 'gocd/gocd-server',
          tag  : 'latest'
        ]
        secureConfiguration = [
          DB_PASSWORD: 'AES:yBk975e1rJiuRnAx9AZ6Og==:ee6yi/2sEh5/TUlbmNWelg=='
        ]
      }
    }
  }

See Also:
  • Method Details

    • getSource

      public String getSource()
      The file or folders to publish to the server. GoCD will only upload files that are in the working directory of the job. You can specify an ant style glob.
      See Also:
    • getDestination

      public String getDestination()
      The destination is relative to the artifacts folder of the current instance on the server side. If it is not specified, the artifact will be stored in the root of the artifacts directory.
    • setSource

      public void setSource(String source)
      The file or folders to publish to the server. GoCD will only upload files that are in the working directory of the job. You can specify an ant style glob.
      See Also:
    • setDestination

      public void setDestination(String destination)
      The destination is relative to the artifacts folder of the current instance on the server side. If it is not specified, the artifact will be stored in the root of the artifacts directory.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class AbstractArtifact<T extends AbstractBuiltInArtifact>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractArtifact<T extends AbstractBuiltInArtifact>
    • toString

      public String toString()
      Overrides:
      toString in class AbstractArtifact<T extends AbstractBuiltInArtifact>