Search in sources :

Example 1 with BaseUrlChangeListener

use of com.thoughtworks.go.listener.BaseUrlChangeListener in project gocd by gocd.

the class GoConfigService method initialize.

@Override
public void initialize() {
    this.goConfigDao.load();
    register(new BaseUrlChangeListener(serverConfig().getSiteUrl(), serverConfig().getSecureSiteUrl(), goCache));
    File dir = artifactsDir();
    if (!dir.exists()) {
        boolean success = dir.mkdirs();
        if (!success) {
            bomb("Unable to create artifacts directory at " + dir.getAbsolutePath());
        }
    }
    if (!dir.canRead()) {
        bomb("Cruise does not have read permission on " + dir.getAbsolutePath());
    }
    if (!dir.canWrite()) {
        bomb("Cruise does not have write permission on " + dir.getAbsolutePath());
    }
}
Also used : BaseUrlChangeListener(com.thoughtworks.go.listener.BaseUrlChangeListener) File(java.io.File)

Aggregations

BaseUrlChangeListener (com.thoughtworks.go.listener.BaseUrlChangeListener)1 File (java.io.File)1