繁体   English   中英

Concourse CI Windows工作者

[英]Concourse CI Windows Worker

我正在尝试使用Windows 7 worker设置Concourse CI环境。

我有一台计算机在Ubuntu Server(16.04)下托管我的TSA服务器,一台计算机(用于支持git资源),另一台计算机在Windows 7下托管一台工作计算机。

一切似乎都可以正常工作,因为:

  • 我可以登录网络用户界面
  • fly -t my_concourseci workers命令返回:

     name containers platform tags team state version ubuntu 1 linux none none running 1.1 windows7 0 windows none none running 1.1 
  • fly -t my_concourseci execute -c test.yml命令返回:

     executing build 146 initializing running echo Hello World! Hello World! 

    test.yml文件中包含以下内容:

     platform: windows run: path: echo args: [ "Hello World!" ] 

不过,当我向任务添加输入时:

    platform: windows

    > inputs:
    >  - name: concourse

    run:
      path: echo
      args: [ "Hello World!" ]

我收到以下错误:

executing build 148
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
100 5698k    0 5698k    0     0  1948k      0 --:--:--  0:00:02 --:--:-- 1949k
initializing
failed to stream in to volume
errored

如果查看Windows worker日志,则会出现此错误:

{"timestamp":"1500642862.643555164",
"source":"baggageclaim",
"message":"baggageclaim.api.volume-server.stream-in.bad-stream-payload",
"log_level":1,
"data":{"error":"tar extract failed (exit status 2). output: \"\\ngzip: stdin: not in gzip format\\n/usr/bin/tar: Child returned status 1\\n/usr/bin/tar: Error is not recoverable: exiting now\\n\"",
"session":"2.1.8730",
 "volume":"15bf1fc6-0727-4962-6c84-18446e54ab96"}
}

关于什么会导致not in gzip format错误的任何想法? 知道如果我在linux平台上运行完全相同的任务,则一切正常。

platform: linux

image_resource:
  type: docker-image
  source: {repository: busybox}

inputs:
 - name: concourse


run:
  path: echo
  args: [ "Hello World!" ]
----- STDOUT
executing build 149
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
100 5699k    0 5699k    0     0  1917k      0 --:--:--  0:00:02 --:--:-- 1918k
initializing
Pulling busybox@sha256:2605a2c4875ce5eb27a9f7403263190cd1af31e48a2044d400320548356251c4...
sha256:2605a2c4875ce5eb27a9f7403263190cd1af31e48a2044d400320548356251c4: Pulling from library/busybox
9e87eff13613: Pulling fs layer
9e87eff13613: Verifying Checksum
9e87eff13613: Download complete
9e87eff13613: Pull complete
Digest: sha256:2605a2c4875ce5eb27a9f7403263190cd1af31e48a2044d400320548356251c4
Status: Downloaded newer image for busybox@sha256:2605a2c4875ce5eb27a9f7403263190cd1af31e48a2044d400320548356251c4

Successfully pulled busybox@sha256:2605a2c4875ce5eb27a9f7403263190cd1af31e48a2044d400320548356251c4.

running echo Hello World!
succeeded

谢谢。

以Administrator身份启动powershell,然后从那里运行concourse_worker.exe。 那对我有用。

我正在基于此AMI的AWS在Windows Server 2016上运行ami-e1876a98

感谢您的回答,它可以帮助我解决问题。

我正在MSYS 1.0环境中启动我的concourse worker 问题是, MSYS$PATH包含targunzip二进制文件。 当我开始在Power Shellcmd.exe内使用concourse worker ,在$PATH没有任何类似于MSYS unix的二进制文件时,它就像一个魅力!

注意:确保在$PATH Windows环境变量中没有MSYS二进制文件,以便使其正常工作,尤其要检查Git-Bash环境工具是否未添加到Windows $ PATH环境变量中。

再次感谢。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM