@@ -31,9 +31,6 @@ import (
3131 useragent "github.com/sylabs/singularity/pkg/util/user-agent"
3232)
3333
34- // CloudURI holds the URI of the Library web front-end.
35- const CloudURI = "https://cloud.sylabs.io"
36-
3734// RemoteBuilder contains the build request and response
3835type RemoteBuilder struct {
3936 BuildClient * buildclient.Client
@@ -45,10 +42,11 @@ type RemoteBuilder struct {
4542 Force bool
4643 IsDetached bool
4744 BuilderRequirements map [string ]string
45+ WebURL string
4846}
4947
5048// New creates a RemoteBuilder with the specified details.
51- func New (imagePath , libraryURL string , d types.Definition , isDetached , force bool , builderAddr , authToken , buildArch string ) (rb * RemoteBuilder , err error ) {
49+ func New (imagePath , libraryURL string , d types.Definition , isDetached , force bool , builderAddr , authToken , buildArch , webURL string ) (rb * RemoteBuilder , err error ) {
5250 bc , err := buildclient .New (& buildclient.Config {
5351 BaseURL : builderAddr ,
5452 AuthToken : authToken ,
@@ -73,6 +71,7 @@ func New(imagePath, libraryURL string, d types.Definition, isDetached, force boo
7371 BuilderRequirements : map [string ]string {
7472 "arch" : buildArch ,
7573 },
74+ WebURL : webURL ,
7675 }, nil
7776}
7877
@@ -107,7 +106,9 @@ func (rb *RemoteBuilder) Build(ctx context.Context) (err error) {
107106 if rb .IsDetached {
108107 fmt .Printf ("Build submitted! Once it is complete, the image can be retrieved by running:\n " )
109108 fmt .Printf ("\t singularity pull --library %s library://%s\n \n " , bi .LibraryURL , libraryRefRaw )
110- fmt .Printf ("Alternatively, you can access it from a browser at:\n \t %s/library/%s\n " , CloudURI , libraryRefRaw )
109+ if rb .WebURL != "" {
110+ fmt .Printf ("Alternatively, you can access it from a browser at:\n \t %s/library/%s\n " , rb .WebURL , libraryRefRaw )
111+ }
111112 return nil
112113 }
113114
0 commit comments