小编AO1*_*O17的帖子

Jenkins抛出java.lang.IllegalArgumentException:无效的refspec refs / heads / **错误

我试图在任何合并请求更改时激活管道。只要我的管道脚本在Jenkins UI。现在,我将脚本外包给GitLab,并且结帐应该通过管道通过scm选项进行。

但是我建立的所有东西(是的,它触发了)是:

java.lang.IllegalArgumentException:无效的refspec refs / heads / **

如果我将分支说明符留空,则会发生这种情况,这是因为我想听任何更改。如果我指定了分支,则构建将通过。

我的refspec:

+refs/heads/*:refs/remotes/origin/* +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/*
Run Code Online (Sandbox Code Playgroud)

jenkins jenkins-pipeline

8
推荐指数
1
解决办法
2785
查看次数

如何使用ASP .NET Core设置Jenkins

我正在尝试在Jenkins上创建一个Pipeline,以自动化我的构建,测试和部署过程.

pipeline {
    agent any
    environment {
        myVersion = '0.9'
    }
    tools {
        msbuild '.NET Core 2.0.0'
    }
    stages {
        stage('checkout') {
          steps {
            checkout([$class: 'GitSCM', ...])
          }
        }
        stage('restore') {
            steps {
                bat 'dotnet restore --configfile NuGet.Config'
            }
        }
        stage('build') {
            steps {
                bat 'dotnet build'
            }
        }
        stage('publish') {
            steps {
              ...
            }
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

尝试运行构建时,我从Jenkins收到此错误消息:

'dotnet'不被识别为内部或外部命令,可操作程序或批处理文件.

为了使这个环境有效,我需要做些什么改变?

我将我的.NET CORE路径等添加到了MSBuild的Jenkins设置中.

我错过了什么?

c# jenkins jenkins-plugins asp.net-core jenkins-pipeline

7
推荐指数
1
解决办法
9036
查看次数

Webpack resolve.alias 不适用于 VS Code IntelliSense

我希望我的项目包含 Webpack resolve.alias 选项,因此我将其添加到我的 webpack.common.js 配置文件中。

一开始我遇到了很多问题,但在搜索网络和许多 GitHub Issues 后,我发现了一些可以帮助我解决问题的帖子。

导入工作正常,但我的问题是 Visual Studios IntelliSense 无法使用我声明的别名。我的设置:

我的项目目录:

+src
  -first
  -second
  +third
  | -third-one
  | -third-two
  | +third-three
  |   -third-three-one
  -jsconfig.json
  -.babelrc
-.eslintrc
-webpack.common.js
Run Code Online (Sandbox Code Playgroud)

webpack.common.js

...
resolve: {
    ...
    alias: {
      first: path.resolve(__dirname, './first'),
      second: path.resolve(__dirname, './second'),
      third: path.resolve(__dirname, './third'),
      common: path.resolve(__dirname, './third/third-three/third-three-one'),
    },
  },
...
Run Code Online (Sandbox Code Playgroud)

.babelrc

{
  "presets": ["es2015", "react", "airbnb"],
  "plugins": [
    ["module-resolver", {
      "alias": {
        "first": "./first",
        "second": "./second",
        "third": "./third",
        "common": "./third/third-three/third-three-one"
      }
    }]
  ]
}
Run Code Online (Sandbox Code Playgroud)

jsconfig.json

... …
Run Code Online (Sandbox Code Playgroud)

javascript reactjs webpack visual-studio-code

6
推荐指数
1
解决办法
4411
查看次数

如何在虚拟化的反应中向表添加排序?

我正在尝试使用Github上的表排序演示将排序添加到我的项目中。

我的代码:

import React from 'react';
import PropTypes from 'prop-types';
import { Table, Column, SortDirection, SortIndicator } from 'react-virtualized';
import AutoSizer from 'react-virtualized/dist/commonjs/AutoSizer';

import 'react-virtualized/styles.css';

class NewTable extends React.Component {
  constructor(props) {
    super(props);

    this.dataList = props.list;

    this.state = {
      headerHeight: 50,
      rowHeight: 25,
      rowCount: this.dataList.length,
      height: 400,
      sortBy: 'columnone',
      sortDirection: SortDirection.ASC,
    };

    this.headerRenderer = this.headerRenderer.bind(this);
    this.sort = this.sort.bind(this);
  }

  isSortEnabled() {
    const list = this.dataList;
    const rowCount = this.state;

    return rowCount <= list.length;
  }

  sort({ sortBy, sortDirection }) …
Run Code Online (Sandbox Code Playgroud)

javascript reactjs react-virtualized

4
推荐指数
1
解决办法
4437
查看次数