我试图在任何合并请求更改时激活管道。只要我的管道脚本在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上创建一个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设置中.
我错过了什么?
我希望我的项目包含 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) 我正在尝试使用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)