我想从我的远程存储库中删除一些提交.在我的回购中我几乎没有这样的提交:
commits messages
abcd123 some message
xyze456 another commit message
98y65r4 this commit is not required
987xcrt this commit is not required
bl8976t initial commit
Run Code Online (Sandbox Code Playgroud)
我想删除提交 98y65r4
和987xcrt
我的回购.怎么实现呢?
我试图使用GIT插件Jenkins从GIT中获取代码,并且该作业正在从属机器上运行.
MASTER
系统有 http_proxy=mycom.domain.com:80
在SLAVE
系统中没有http_proxy
定义.
每当我在SLAVE
机器中进行本地git clone时它都能很好地工作,但是从Jenkins我没有成功.
它抛出以下错误:
Building remotely on SLAVE in workspace /data/test
> /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> /usr/bin/git config remote.origin.url https://github.domain.com/Project-Digital/Project-eCommerce.git # timeout=10
Fetching upstream changes from https://github.domain.com/Project-Digital/Project-eCommerce.git
> /usr/bin/git --version # timeout=10
using GIT_ASKPASS to set credentials
Setting http proxy: mycom.domain.com:80
> /usr/bin/git fetch --tags --progress https://github.domain.com/Project-Digital/Project-eCommerce.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://github.domain.com/Project-Digital/Project-eCommerce.git
at …
Run Code Online (Sandbox Code Playgroud) 我成功地能够使用SSH连接到远程计算机,但是当我从Jenkins启动代理时,它会抛出以下错误:
ERROR: Server rejected the 1 private key(s) for user1 (credentialId:xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/method:publickey)
[01/19/17 05:35:15] [SSH] Authentication failed.
hudson.AbortException: Authentication failed.
at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1219)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:714)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:709)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[01/19/17 05:35:15] Launch failed - cleaning up connection
[01/19/17 05:35:15] [SSH] Connection closed.
Run Code Online (Sandbox Code Playgroud)
我可以使用建立从主机到节点机器的SSH连接user1
,但是当我尝试使用user1
jenkins 启动代理时,它拒绝私钥.有没有解决方案可以解决这个问题?
我有以下 Dockerfile:
FROM ubuntu:16.04
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
git \
make \
python-pip \
python2.7 \
python2.7-dev \
ssh \
&& apt-get autoremove \
&& apt-get clean
ARG password
ARG username
ENV password $password
ENV username $username
RUN pip install git+http://$username:$password@org.bitbucket.com/scm/do/repo.git
Run Code Online (Sandbox Code Playgroud)
我使用以下命令从这个 Dockerfile 构建镜像:
docker build -t myimage:v1 --build-arg password="somepassoword" --build-arg username="someuser" .
Run Code Online (Sandbox Code Playgroud)
但是,在构建日志中,我传递的用户名和密码--build-arg
是可见的。
Step 8/8 : RUN pip install git+http://$username:$password@org.bitbucket.com/scm/do/repo.git
---> Running in 650d9423b549
Collecting git+http://someuser:somepassword@org.bitbucket.com/scm/do/repo.git
Run Code Online (Sandbox Code Playgroud)
如何隐藏它们?或者是否有不同的方式在 …
我有三个不同的环境,每个环境都包含一个 Jenkins Slave,
STAGE1 - slave1
STAGE2 - slave2
STAGE3 -slave3
我不想为他们创建三个不同的构建作业。
我想将奴隶 ( slave1
,slave2
和slave3
) 作为参数传递,这样如果我选择slave1
在STAGE1 上执行作业,如果我选择slave2
在STAGE2上执行作业,依此类推。
如何使用单个 Jenkins 工作实现这一目标?
我知道有多个配置作业,但我不清楚如何配置它。
如果我得到一些关于它的信息,那将非常有帮助。
我正在使用此处回答的以下脚本使用 Powershell 脚本在解决方案中创建解决方案文件夹。
Function AddFolderToSolution($folderName, $solutionFile)
{
$solutionFolderGuid = "{2150E333-8FDC-42A3-9474-1A3956D46DE8}"
$content = [System.IO.File]::ReadLines($solutionFile)
$lines = New-Object System.Collections.Generic.List[string]
$lines.AddRange($content)
$index = $lines.IndexOf("Global")
$guid = [System.Guid]::NewGuid().ToString().ToUpper()
$txt = "Project(`"$solutionFolderGuid`") = `"$folderName`", `"$folderName`", `"$guid`""
$lines.Insert($index, $txt)
$lines.Insert($index+1, "EndProject")
[System.IO.File]::WriteAllLines($solutionFile, $lines)
}
AddFolderToSolution "NewFolder10" "D:\Solution1.sln"
Run Code Online (Sandbox Code Playgroud)
现在我想将一些文件复制到解决方案文件夹(NewFolder10)中。我如何使用 PowerShell 来做到这一点?
我docker version 18.09.0, build 4d60db4
在Windows计算机上使用,并且尝试使用以下命令登录Artifactory,
docker login docker-registery.company.net
Run Code Online (Sandbox Code Playgroud)
它提示输入用户名和密码,我正在提供它们,但是我无法登录。它给了我以下错误:
Error response from daemon: Get https://docker-registery.company.net/v2/: tls: server selected unsupported protocol version 301
Run Code Online (Sandbox Code Playgroud)
注意:我可以使用相同的用户名和密码通过Web浏览器登录Artifactory Repo Browser。
当我尝试从命令行登录时,是什么导致此问题?是某种代理或证书问题吗?
ant update
构建 Hybris 项目后,我尝试从命令行运行,但它运行更新运行系统、从数据库清除 hMC 配置、创建基本数据和本地化类型(请参阅下图):
有没有办法从命令行运行ant update
命令,以便它只选择“更新运行系统”?
我可以传递什么参数ant update
来只运行“更新运行系统”而不是任何其他选项?
devops ×4
jenkins ×3
docker ×2
git ×2
ant ×1
artifactory ×1
build ×1
deployment ×1
docker-build ×1
docker-image ×1
dockerfile ×1
github ×1
hybris ×1
java ×1
master-slave ×1
powershell ×1
solution ×1
ssh ×1