#353 - Make sure that static resources uploaded are overwritable by group.

Added Wagon plugin execution to set uploaded file permissions for schemas and static resources so that they can be replaced by other team members. Extracted common server configuration into plugin configuration.
This commit is contained in:
Oliver Gierke
2017-05-04 16:24:58 +02:00
parent 8720c60b58
commit f7b10b0b7f

View File

@@ -437,6 +437,8 @@
<artifactId>wagon-maven-plugin</artifactId>
<configuration>
<fromDir>${project.build.directory}</fromDir>
<serverId>static-dot-s2</serverId>
<url>scp://docs.af.pivotal.io</url>
</configuration>
<executions>
@@ -451,8 +453,6 @@
<configuration>
<fromDir>${project.root}/target/schemas</fromDir>
<includes>*.xsd,.autoschemaln</includes>
<serverId>static-dot-s2</serverId>
<url>scp://docs.af.pivotal.io</url>
<toDir>/var/www/domains/spring.io/www/htdocs/autorepo/schema/${dist.id}/${project.version}</toDir>
<optimize>true</optimize>
</configuration>
@@ -469,12 +469,26 @@
<configuration>
<fromDir>${project.build.directory}/static-resources</fromDir>
<includes>**</includes>
<serverId>static-dot-s2</serverId>
<url>scp://docs.af.pivotal.io</url>
<toDir>/var/www/domains/spring.io/www/htdocs/autorepo/docs/${dist.id}/${project.version}</toDir>
<optimize>true</optimize>
</configuration>
</execution>
<!-- Makes sure resources can be overriden by others -->
<execution>
<id>make-resources-group-writable</id>
<phase>deploy</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<commands>
<command>find /var/www/domains/spring.io/www/htdocs/autorepo/schema/${dist.id}/${project.version}/ ! -perm -g=w -exec chmod g+w {} \;</command>
<command>find /var/www/domains/spring.io/www/htdocs/autorepo/docs/${dist.id}/${project.version}/ ! -perm -g=w -exec chmod g+w {} \;</command>
</commands>
</configuration>
</execution>
</executions>
</plugin>