Class ClassicUploadStep

    • Method Detail

      • setSharedPublicly

        @DataBoundSetter
        public void setSharedPublicly​(boolean sharedPublicly)
        Parameters:
        sharedPublicly - Whether to surface the file being uploaded to anyone with the link.
      • isSharedPublicly

        public boolean isSharedPublicly()
        Returns:
        Whether to surface the file being uploaded to anyone with the link.
      • setShowInline

        @DataBoundSetter
        public void setShowInline​(boolean showInline)
        Parameters:
        showInline - Whether to indicate in metadata that the file should be viewable inline in web browsers, rather than requiring it to be downloaded first.
      • isShowInline

        public boolean isShowInline()
        Returns:
        Whether to indicate in metadata that the file should be viewable inline in web browsers, rather than requiring it to be downloaded first.
      • setPathPrefix

        @DataBoundSetter
        public void setPathPrefix​(@Nullable
                                  String pathPrefix)
        Parameters:
        pathPrefix - The path prefix that will be stripped from uploaded files. May be null if no path prefix needs to be stripped.

        Filenames that do not start with this prefix will not be modified. Trailing slash is automatically added if it is missing.

      • getPathPrefix

        @Nullable
        public String getPathPrefix()
        Returns:
        pathPrefix The path prefix that will be stripped from uploaded files. May be null if no path prefix needs to be stripped.

        Filenames that do not start with this prefix will not be modified. Trailing slash is automatically added if it is missing.

      • getPattern

        public String getPattern()
        Returns:
        The glob of files to upload, which potentially contains unresolved symbols, such as $JOB_NAME and $BUILD_NUMBER.
      • getBucket

        public String getBucket()
        Returns:
        The bucket name specified by the user, which potentially contains unresolved symbols, such as $JOB_NAME and $BUILD_NUMBER.
      • getCredentialsId

        public String getCredentialsId()
        Returns:
        The unique ID for the credentials we are using to authenticate with GCS.
      • perform

        public void perform​(Run<?,​?> run,
                            FilePath workspace,
                            Launcher launcher,
                            TaskListener listener)
                     throws IOException
        The main entry point of this extension. Uploads files that match an Ant-style glob, e.g. ** / *.java relative to the build workspace to a GCS bucket.
        Specified by:
        perform in interface SimpleBuildStep
        Parameters:
        run - Current job being run.
        workspace - Workspace of node running the job.
        launcher - Launcher for this job.
        listener - Listener for events of this job.
        Throws:
        IOException - If there was an issue performing the upload.