我刚开始使用Lombok通过修改其引导类路径在我的本地Eclipse环境中为Java bean自动生成getter和setter的能力:
-vmargs -javaagent:lombok.jar -Xbootclasspath/a:lombok.jar
Run Code Online (Sandbox Code Playgroud)
它在本地工作正常,但是由于我们的应用程序生命周期需要Jenkins构建,我对@Getter和@Setter注释在我们的CI环境中运行时对代码的影响方式有点怀疑.
到目前为止,Lombok触及我们的域层,因为我们使用其他框架,这些框架依赖于在运行时在模型上设置getter/setter以使它们工作,我想更全面地了解Lombok的字节码修改是如何在我完全完成之前完成的.承诺使用它.
这些注释自动生成的所有方法是否都可以在Jenkins中使用,只是因为在pom.xml文件中具有Lombok的依赖性,或者我还需要修改整个Jenkins的启动脚本,如上所述.或者只是Jenkins的工作需要以某种方式修改以包含Lombok的字节码修改行为?
如果有人尝试并成功将Lombok与Jenkins CI合并,我将愿意听取他们的经验并将其融入我们的DevOps流程中.
先感谢您.
continuous-integration bytecode-manipulation lombok jenkins devops
我正在使用像Puppet/Chef/Ansible这样的工具来设置和配置开发环境和生产服务器.
每当我更新配置时,我都会针对我的开发环境运行该工具并登录以手动检查事情是否按预期工作.
但这样做很乏味,而且每次都无法测试所有内容,那么有什么方法可以自动化测试吗?
需要您的帮助来解决以下错误。
我可以从我的电脑运行git clone命令,但是当我尝试从jenkins运行它时,却遇到了错误。
错误:
Building in workspace C:\Tools\Jenkins\jobs\project A\workspace
Cloning the remote Git repository
Cloning repository git@github.com:scmgalaxy/helloworld-java-maven.git
> git.exe init C:\Tools\Jenkins\jobs\project A\workspace # timeout=10
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not init C:\Tools\Jenkins\jobs\project A\workspace
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:656)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:463)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1039)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1079)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: hudson.plugins.git.GitException: Error performing command: git.exe init C:\Tools\Jenkins\jobs\project A\workspace
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1726)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1695)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1691)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1321) …Run Code Online (Sandbox Code Playgroud) 我想创建一个安装脚本,它可以根据用户输入来支持某些服务。我正在使用 docker 来管理这些服务。使用 docker-compose 我可以定义多个服务,但默认情况下所有在 docker-compose.yml 中定义的服务都启动。有什么解决方法吗?另外,这是一个糟糕的策略吗[但我所有的服务都使用 docker,那么有没有其他方法]?
谢谢!
deployment software-distribution docker microservices devops
我有三个不同的环境,每个环境都包含一个 Jenkins Slave,
STAGE1 - slave1
STAGE2 - slave2
STAGE3 -slave3
我不想为他们创建三个不同的构建作业。
我想将奴隶 ( slave1,slave2和slave3) 作为参数传递,这样如果我选择slave1在STAGE1 上执行作业,如果我选择slave2在STAGE2上执行作业,依此类推。
如何使用单个 Jenkins 工作实现这一目标?
我知道有多个配置作业,但我不清楚如何配置它。
如果我得到一些关于它的信息,那将非常有帮助。
我安装了Nexus Repository Manager OSS 3.2.1并在本地计算机上运行它.
我在Nexus中定义了三个NPM存储库:
在设置/安全/领域中,我添加了npm Bearer Token Realm.
我可以从[PUBLIC]下载包,它按预期工作.
.npmrc
registry=http://localhost:8081/repository/PUBLIC
npm install react // works fine, downloads from [PUBLIC]
Run Code Online (Sandbox Code Playgroud)
我可以从[NPM]下载包,它按预期工作.
.npmrc
registry=http://localhost:8081/repository/NPM
npm install react // works fine, downloads from [PUBLIC]
Run Code Online (Sandbox Code Playgroud)
它不适用于[PRIVATE],因为我没有名为react的包.
我不想发布到[PUBLIC].
我可以将包发布到[PRIVATE],它可以按预期工作.
.npmrc
registry=http://localhost:8081/repository/PRIVATE
npm publish // works fine, publishes to [PRIVATE]
Run Code Online (Sandbox Code Playgroud)
我无法将包发布到[NPM],这很奇怪.
.npmrc
registry=http://localhost:8081/repository/NPM
npm publish // fails, should publish to [PRIVATE]
// gets HTTP 400
Run Code Online (Sandbox Code Playgroud)
详细日志:https://pastebin.com/5GuqNNhf
我是docker的新手,无法理解这些错误.所以,如果需要更多信息,请告诉我.
`$ docker --version`
Docker version 1.12.6, build 88a4867/1.12.6
`$ docker info`
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
`$sudo dockerd`
FATA[0000] unable to configure the Docker daemon with file /etc/docker/daemon.json: EOF
`$sudo systemctl start docker`
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
`$sudo systemctl status docker.service -l`
? docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; …Run Code Online (Sandbox Code Playgroud) minikube start
Run Code Online (Sandbox Code Playgroud)
在 Manjaro Deepin ( Arch Linux ) 上给出以下错误消息。
E1002 00:02:24.832976 26272 start.go:143] 启动主机时出错:临时错误:在主机上配置身份验证时出错:无法识别操作系统类型。
在带有 Ubuntu 16.04 和 VT-X/AMD-v 的 VirtualBox 上尝试它没有启用错误,甚至将 Virtualbox 首选项设置为 VT-X/AMD-v 启用。
注意:需要在我的本地机器上解决问题而不是 virtualBox
uname -a 输出
Linux xxx-pc 4.9.51-1-MANJARO #1 SMP PREEMPT Wed Sep 20 10:37:40 UTC 2017 x86_64 GNU/Linux
我正在使用Azure Pipelines GitHub加载项以确保提取请求能够通过我的操作。但是,我刚刚发出了一个测试请求请求,但失败了,但Azure Pipeline成功了。
这是我的 azure-pipelines.yml
# Node.js with React
# Build a Node.js project that uses React.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- master
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: '8.x'
displayName: 'Install Node.js'
- script: |
npm install
npm run lint # Mapped to `eslint src` in package.json
npm run slint # `stylelint src` in package.json
npm run build
displayName: 'npm install and build'
Run Code Online (Sandbox Code Playgroud)
这是我知道失败的分支上的输出(的一部分) …
我正在尝试通过SSH进入服务器,作为CircleCI中部署工作的一部分
ssh -oStrictHostKeyChecking=no $DEV_DROPLET_USER@$DEV_DROPLET_IP
我已将此服务器上的用户的SSH私钥加载到CircleCI中,但是每次运行作业时,都会得到此输出
Warning: Permanently added '$host' (ECDSA) to the list of known hosts.
<$user>@<$host>'s password:
如何停止提示我输入密码?
我已将此用户的SSH密钥添加到服务器上的SSH代理(这些说明)
devops ×10
docker ×2
jenkins ×2
ansible ×1
azure ×1
azure-devops ×1
build ×1
deployment ×1
javascript ×1
kubernetes ×1
linux ×1
lombok ×1
manjaro ×1
nexus ×1
npm ×1
package.json ×1
pipeline ×1
puppet ×1
rhel ×1
ssh ×1
ssh-keys ×1