Thursday, June 11, 2015

Confluece Reporting Plugin


Плагин confluence-reporting-maven-plugin позволяет публиковать страницы в confluence.

Исходный плагин спроектирован для того, чтобы публиковать сайт проекта в confluence.
http://bsorrentino.github.io/maven-confluence-plugin/usage.html

Для использования плагина в settings.xml нужно задать логин-пароль для сервера с идентфикатором

  <serverId>confluence-server-id</serverId>

Пример шаблона страницы

{details}
Ссылки на скачивание:from [artifactory|${artifactoryDownloadLink}], from [jenkins|${jenkinsDownloadLink}]
Дата сборки:${buildTimestamp}
Статус:{status:colour=Grey |title=TO TEST|subtle=true}
{details}
 
h4. Изменения
 
h4. Номера JIRA задач, исправленных в сборке
 
${gitlog.jiraIssues}
{color:grey}* _В список включены задачи, начиная с версии ${gitlog.sinceTagName}_{color}
 
h4. Скрипты для обновления БД
 
h4. Изменения в конфигурации приложения
 
h4. Замечания по тестирования

<plugin>
    <groupId>org.bsc.maven</groupId>
    <artifactId>confluence-reporting-maven-plugin</artifactId>
    <version>4.2</version>
    <configuration>
        <endPoint>http://jira-confluence.ru/confluence/rpc/xmlrpc</endPoint>
        <spaceKey>MC</spaceKey>
        <parentPageTitle>Project_name-versions</parentPageTitle>
        <title>${project.artifactId}-${project.version}</title>
        <labels>
            <label>replicator</label>
            <label>version-notes</label>
            <label>project-version-notes</label>
        </labels>
        <templateWiki>${version-notes-template-path}</templateWiki>
        <encoding>UTF-8</encoding>
        <wikiFilesExt>.confluence</wikiFilesExt>
        <serverId>confluence-server-id</serverId>
        <gitLogJiraIssuesEnable>true</gitLogJiraIssuesEnable>
        <gitLogSinceTagName>v7.0.0</gitLogSinceTagName>
        <gitLogCalculateRuleForSinceTagName>CURRENT_MINOR_VERSION</gitLogCalculateRuleForSinceTagName>
        <gitLogJiraProjectKeyList>
            <value>MC</value>
        </gitLogJiraProjectKeyList>
        <gitLogTagNamesPattern>v\d+\.\d+\.\d+.*</gitLogTagNamesPattern>
        <gitLogGroupByVersions>true</gitLogGroupByVersions>
        <properties>
            <artifactoryDownloadLink>${artifactoryDownloadUrlPrefix}/${project.version}/</artifactoryDownloadLink>
            <jenkinsDownloadLink>${jenkinsDownloadUrlPrefix}/${jenkinsBuildNumber}/artifact/target/project-with-dependencies-${project.version}-${profile.name}.zip</jenkinsDownloadLink>
            <finalName>${build.finalName}</finalName>
            <buildTimestamp>${timestamp}</buildTimestamp>
        </properties>
    </configuration>
    <executions>
        <execution>
            <id>publish-version-notes</id>
            <phase>deploy</phase>
            <goals>
                <goal>deploy</goal>
            </goals>
        </execution>
    </executions>
</plugin>

No comments:

Post a Comment