mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-04 03:10:50 +01:00
merge with develop branch
This commit is contained in:
@@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Added
|
||||
- Extension point to add links to the repository cards from plug ins ([#1041](https://github.com/scm-manager/scm-manager/pull/1041))
|
||||
|
||||
@@ -15,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Removed
|
||||
- EventSource Polyfill
|
||||
|
||||
### Fixed
|
||||
- Build on windows ([#1048](https://github.com/scm-manager/scm-manager/issues/1048), [#1049](https://github.com/scm-manager/scm-manager/issues/1049), [#1056](https://github.com/scm-manager/scm-manager/pull/1056))
|
||||
- Show specific notification for plugin actions on plugin administration ([#1057](https://github.com/scm-manager/scm-manager/pull/1057))
|
||||
|
||||
## 2.0.0-rc5 - 2020-03-12
|
||||
### Added
|
||||
- Added footer extension points for links and avatar
|
||||
|
||||
27
Jenkinsfile
vendored
27
Jenkinsfile
vendored
@@ -64,15 +64,20 @@ node('docker') {
|
||||
mvn 'clean install -DskipTests'
|
||||
}
|
||||
|
||||
stage('Unit Test') {
|
||||
mvn 'test -Pcoverage -Dmaven.test.failure.ignore=true'
|
||||
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml,**/target/jest-reports/TEST-*.xml'
|
||||
}
|
||||
|
||||
stage('Integration Test') {
|
||||
mvn 'verify -Pit -pl :scm-webapp,:scm-it -Dmaven.test.failure.ignore=true -Dscm.git.core.supportsatomicfilecreation=false'
|
||||
junit allowEmptyResults: true, testResults: '**/target/failsafe-reports/TEST-*.xml'
|
||||
}
|
||||
parallel(
|
||||
unitTest: {
|
||||
stage('Unit Test') {
|
||||
mvn 'test -DskipFrontendBuild -DskipTypecheck -Pcoverage -pl !scm-it -Dmaven.test.failure.ignore=true'
|
||||
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml,**/target/jest-reports/TEST-*.xml'
|
||||
}
|
||||
},
|
||||
integrationTest: {
|
||||
stage('Integration Test') {
|
||||
mvn 'verify -Pit -DskipUnitTests -pl :scm-webapp,:scm-it -Dmaven.test.failure.ignore=true'
|
||||
junit allowEmptyResults: true, testResults: '**/target/failsafe-reports/TEST-*.xml'
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
stage('SonarQube') {
|
||||
|
||||
@@ -203,6 +208,10 @@ String mainBranch
|
||||
|
||||
Maven setupMavenBuild() {
|
||||
Maven mvn = new MavenWrapperInDocker(this, "scmmanager/java-build:11.0.6_10")
|
||||
// disable logging durring the build
|
||||
def logConf = "scm-webapp/src/main/resources/logback.ci.xml"
|
||||
mvn.additionalArgs += " -Dlogback.configurationFile=${logConf}"
|
||||
mvn.additionalArgs += " -Dscm-it.logbackConfiguration=${logConf}"
|
||||
|
||||
if (isMainBranch() || isReleaseBranch()) {
|
||||
// Release starts javadoc, which takes very long, so do only for certain branches
|
||||
|
||||
29
pom.xml
29
pom.xml
@@ -200,7 +200,7 @@
|
||||
<dependency>
|
||||
<groupId>de.otto.edison</groupId>
|
||||
<artifactId>edison-hal</artifactId>
|
||||
<version>2.0.1</version>
|
||||
<version>2.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -399,12 +399,6 @@
|
||||
<version>${jaxb.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.bind</groupId>
|
||||
<artifactId>jaxb-impl</artifactId>
|
||||
<version>${jaxb.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
@@ -480,6 +474,13 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.22.0</version>
|
||||
<configuration>
|
||||
<!--
|
||||
skips surefire tests without skipping failsafe tests.
|
||||
Property value seems to magically default to false
|
||||
-->
|
||||
<skipTests>${skipUnitTests}</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
@@ -828,7 +829,7 @@
|
||||
<!-- test libraries -->
|
||||
<mockito.version>2.28.2</mockito.version>
|
||||
<hamcrest.version>1.3</hamcrest.version>
|
||||
<junit.version>5.2.0</junit.version>
|
||||
<junit.version>5.6.0</junit.version>
|
||||
|
||||
<!-- logging libraries -->
|
||||
<slf4j.version>1.7.30</slf4j.version>
|
||||
@@ -838,10 +839,10 @@
|
||||
<jaxrs.version>2.1.1</jaxrs.version>
|
||||
<resteasy.version>4.5.2.Final</resteasy.version>
|
||||
<jersey-client.version>1.19.4</jersey-client.version>
|
||||
<jackson.version>2.10.0</jackson.version>
|
||||
<jackson.version>2.10.2</jackson.version>
|
||||
<guice.version>4.2.2</guice.version>
|
||||
<jaxb.version>2.3.0</jaxb.version>
|
||||
<hibernate-validator.version>6.1.0.Final</hibernate-validator.version>
|
||||
<hibernate-validator.version>6.1.2.Final</hibernate-validator.version>
|
||||
|
||||
<!-- event bus -->
|
||||
<legman.version>1.6.2</legman.version>
|
||||
@@ -852,7 +853,7 @@
|
||||
|
||||
<!-- security libraries -->
|
||||
<ssp.version>1.2.0</ssp.version>
|
||||
<shiro.version>1.4.1</shiro.version>
|
||||
<shiro.version>1.5.1</shiro.version>
|
||||
|
||||
<!-- repository libraries -->
|
||||
<jgit.version>5.6.1.202002131546-r-scm1</jgit.version>
|
||||
@@ -871,7 +872,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<netbeans.hint.license>SCM-BSD</netbeans.hint.license>
|
||||
<jdk.classifier/>
|
||||
<org.mapstruct.version>1.2.0.Final</org.mapstruct.version>
|
||||
<org.mapstruct.version>1.3.1.Final</org.mapstruct.version>
|
||||
|
||||
<!-- Sonar exclusions -->
|
||||
<!-- *StoreFactory classes are excluded because extracting the floating store parameter classes in a generic -->
|
||||
@@ -881,7 +882,9 @@
|
||||
|
||||
<sonar.nodejs.executable>./scm-ui/target/frontend/buildfrontend-node/node-v${nodejs.version}-linux-x64/bin/node</sonar.nodejs.executable>
|
||||
|
||||
|
||||
<!-- Possibility to skip only the unit test. Can be useful when running only integration tests.
|
||||
This can be used from the command line as follows: mvn <goals> -DskipUnitTests -->
|
||||
<skipUnitTests>${skipTests}</skipUnitTests>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -152,11 +152,6 @@
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.bind</groupId>
|
||||
<artifactId>jaxb-impl</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<dependency>
|
||||
<groupId>org.glassfish</groupId>
|
||||
<artifactId>javax.json</artifactId>
|
||||
<version>1.0.4</version>
|
||||
<version>1.1.4</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@@ -212,6 +212,10 @@
|
||||
<name>sonia.scm.classloading.lifecycle</name>
|
||||
<value>simple</value>
|
||||
</systemProperty>
|
||||
<systemProperty>
|
||||
<name>logback.configurationFile</name>
|
||||
<value>${scm-it.logbackConfiguration}</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
<webApp>
|
||||
<contextPath>/scm</contextPath>
|
||||
@@ -245,10 +249,10 @@
|
||||
<properties>
|
||||
<scm.stage>DEVELOPMENT</scm.stage>
|
||||
<scm.home>target/scm-it</scm.home>
|
||||
<scm-it.logbackConfiguration>${project.basedir}/../scm-webapp/src/main/resources/logback.default.xml</scm-it.logbackConfiguration>
|
||||
</properties>
|
||||
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@ package sonia.scm.web;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
public class WireProtocolRequestMockFactory {
|
||||
|
||||
@@ -88,7 +88,6 @@ public class WireProtocolRequestMockFactory {
|
||||
private HttpServletRequest base(String method, String queryStringValue) {
|
||||
HttpServletRequest request = mock(HttpServletRequest.class);
|
||||
|
||||
when(request.getRequestURI()).thenReturn(repositoryPath);
|
||||
when(request.getMethod()).thenReturn(method);
|
||||
|
||||
queryString(request, queryStringValue);
|
||||
|
||||
@@ -47,7 +47,10 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static org.hamcrest.Matchers.contains;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
/**
|
||||
@@ -98,7 +101,6 @@ public class WireProtocolTest {
|
||||
|
||||
@Test
|
||||
public void testGetCommandsOfWithHgArgsPost() throws IOException {
|
||||
when(request.getMethod()).thenReturn("POST");
|
||||
when(request.getQueryString()).thenReturn("cmd=batch");
|
||||
when(request.getIntHeader("X-HgArgs-Post")).thenReturn(29);
|
||||
when(request.getHeaderNames()).thenReturn(Collections.enumeration(Lists.newArrayList("X-HgArgs-Post")));
|
||||
|
||||
@@ -18,8 +18,9 @@
|
||||
|
||||
<properties>
|
||||
<build.script>build</build.script>
|
||||
<skipTests>false</skipTests>
|
||||
<skipTypecheck>false</skipTypecheck>
|
||||
<skipFrontendTests>${skipTests}</skipFrontendTests>
|
||||
<skipFrontendBuild>false</skipFrontendBuild>
|
||||
<sonar.language>typescript</sonar.language>
|
||||
<sonar.sources>ui-extensions/src,ui-components/src,ui-webapp/src</sonar.sources>
|
||||
<sonar.test.exclusions>**/*.test.js,src/tests/**</sonar.test.exclusions>
|
||||
@@ -88,6 +89,7 @@
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skipFrontendBuild}</skip>
|
||||
<script>${build.script}</script>
|
||||
</configuration>
|
||||
</execution>
|
||||
@@ -99,7 +101,7 @@
|
||||
</goals>
|
||||
<configuration>
|
||||
<script>test</script>
|
||||
<skip>${skipTests}</skip>
|
||||
<skip>${skipFrontendTests}</skip>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
|
||||
@@ -19,6 +19,7 @@ module.exports = function(mode) {
|
||||
[name]: [path.resolve(__dirname, "webpack-public-path.js"), packageJSON.main || "src/main/js/index.js"]
|
||||
},
|
||||
mode,
|
||||
stats: "minimal",
|
||||
devtool: "source-map",
|
||||
target: "web",
|
||||
node: {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
const { spawnSync } = require("child_process");
|
||||
const os = require("os");
|
||||
|
||||
const yarnCmd = os.platform() === "win32" ? "yarn.cmd" : "yarn";
|
||||
|
||||
const yarn = args => {
|
||||
const result = spawnSync("yarn", args, { stdio: "inherit" });
|
||||
const result = spawnSync(yarnCmd, args, { stdio: "inherit" });
|
||||
if (result.error) {
|
||||
console.log("could not start yarn command:", result.error);
|
||||
process.exit(2);
|
||||
|
||||
@@ -25,6 +25,7 @@ console.log(`build ${mode} bundles`);
|
||||
module.exports = [
|
||||
{
|
||||
mode,
|
||||
stats: "minimal",
|
||||
context: root,
|
||||
entry: {
|
||||
webapp: [path.resolve(__dirname, "webpack-public-path.js"), "./ui-webapp/src/index.tsx"]
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^5.11.2",
|
||||
"bulma": "^0.7.5",
|
||||
"bulma": "^0.8.0",
|
||||
"bulma-popover": "^1.0.0",
|
||||
"bulma-tooltip": "^3.0.0",
|
||||
"react-diff-view": "^2.4.1"
|
||||
|
||||
@@ -61,7 +61,10 @@
|
||||
"newVersion": "Neue Version",
|
||||
"dependencyNotification": "Mit diesem Plugin werden folgende Abhängigkeiten mit installiert, wenn sie noch nicht vorhanden sind!",
|
||||
"dependencies": "Abhängigkeiten",
|
||||
"successNotification": "Das Plugin wurde erfolgreich installiert. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden:",
|
||||
"installedNotification": "Das Plugin wurde erfolgreich installiert. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden:",
|
||||
"updatedNotification": "Das Plugin wurde erfolgreich aktualisiert. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden:",
|
||||
"uninstalledNotification": "Das Plugin wurde erfolgreich installiert. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden:",
|
||||
"executedChangesNotification": "Die Plugin Änderungen wurden erfolgreich durchgeführt. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden:",
|
||||
"reload": "jetzt neu laden",
|
||||
"restartNotification": "Der SCM-Manager Kontext sollte nur neu gestartet werden, wenn aktuell niemand damit arbeitet.",
|
||||
"executePending": "Die folgenden Plugin-Änderungen werden ausgeführt. Anschließend wird der SCM-Manager Kontext neu gestartet.",
|
||||
|
||||
@@ -61,7 +61,10 @@
|
||||
"newVersion": "New version",
|
||||
"dependencyNotification": "With this plugin, the following dependencies will be installed if they are not available yet!",
|
||||
"dependencies": "Dependencies",
|
||||
"successNotification": "Successful installed plugin. You have to reload the page, to see ui changes:",
|
||||
"installedNotification": "Successfully installed plugin. You have to reload the page, to see ui changes:",
|
||||
"updatedNotification": "Successfully updated plugin. You have to reload the page, to see ui changes:",
|
||||
"uninstalledNotification": "Successfully uninstalled plugin. You have to reload the page, to see ui changes:",
|
||||
"executedChangesNotification": "Successfully executed plugin changes. You have to reload the page, to see ui changes:",
|
||||
"reload": "reload now",
|
||||
"restartNotification": "You should only restart the scm-manager context if no one else is currently working with it.",
|
||||
"executePending": "The following plugin changes will be executed and after that the scm-manager context will be restarted.",
|
||||
|
||||
@@ -161,7 +161,7 @@ class PluginModal extends React.Component<Props, State> {
|
||||
}
|
||||
|
||||
renderNotifications = () => {
|
||||
const { t } = this.props;
|
||||
const { t, pluginAction } = this.props;
|
||||
const { restart, error, success } = this.state;
|
||||
if (error) {
|
||||
return (
|
||||
@@ -172,7 +172,7 @@ class PluginModal extends React.Component<Props, State> {
|
||||
} else if (success) {
|
||||
return (
|
||||
<div className="media">
|
||||
<SuccessNotification />
|
||||
<SuccessNotification pluginAction={pluginAction} />
|
||||
</div>
|
||||
);
|
||||
} else if (restart) {
|
||||
|
||||
@@ -1,13 +1,30 @@
|
||||
import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { Notification } from "@scm-manager/ui-components";
|
||||
import { PluginAction } from "./PluginEntry";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
pluginAction?: string;
|
||||
};
|
||||
|
||||
class InstallSuccessNotification extends React.Component<Props> {
|
||||
createMessageForPluginAction = () => {
|
||||
const { pluginAction, t } = this.props;
|
||||
if (pluginAction === PluginAction.INSTALL) {
|
||||
return t("plugins.modal.installedNotification");
|
||||
} else if (pluginAction === PluginAction.UPDATE) {
|
||||
return t("plugins.modal.updatedNotification");
|
||||
} else if (pluginAction === PluginAction.UNINSTALL) {
|
||||
return t("plugins.modal.uninstalledNotification");
|
||||
}
|
||||
return t("plugins.modal.executedChangesNotification");
|
||||
};
|
||||
|
||||
class InstallSuccessNotification extends React.Component<WithTranslation> {
|
||||
render() {
|
||||
const { t } = this.props;
|
||||
return (
|
||||
<Notification type="success">
|
||||
{t("plugins.modal.successNotification")}{" "}
|
||||
{this.createMessageForPluginAction()}{" "}
|
||||
<a onClick={e => window.location.reload(true)}>{t("plugins.modal.reload")}</a>
|
||||
</Notification>
|
||||
);
|
||||
|
||||
39
scm-webapp/src/main/resources/logback.ci.xml
Normal file
39
scm-webapp/src/main/resources/logback.ci.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (c) 2010, Sebastian Sdorra
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
3. Neither the name of SCM-Manager; nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
http://bitbucket.org/sdorra/scm-manager
|
||||
|
||||
|
||||
-->
|
||||
|
||||
<configuration>
|
||||
|
||||
<root level="OFF" />
|
||||
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user