Unable to upload artifacts: broken pipe
Summary
I'm trying to pass artifacts from one stage to another, but I keep getting a 'broken pipe' error when adding all the files I actually need.
Steps to reproduce
I use the following script:
stages:
- build
- deploy
build:
stage: build
image: microsoft/dotnet:latest
artifacts:
paths:
- 'Docker/output/'
script:
- 'cd src/Asgard.Kodi.Db'
- 'dotnet restore'
- 'cd ../Asgard.Kodi.Api'
- 'dotnet restore'
- 'dotnet publish'
- 'cd ../../Docker'
- 'rm -rf output'
- 'mkdir output'
- 'cp -a ../src/Asgard.Kodi.Api/bin/Debug/netcoreapp1.0/publish/. output/'
- 'cd output && ls'
deploy:
image: docker:latest
stage: deploy
script:
- 'cd Docker'
- 'pwd'
- 'ls'
- 'docker build -t tvl/asgard.kodi .'
Which first builds the files listed in the logs section into the 'Docker/output/' folder.
What is the current bug behavior?
I am unable to upload:
Uploading artifacts...
Docker/output/: found 315 matching files
ERROR: Uploading artifacts to coordinator... error error=couldn't execute POST against http://gitlab/ci/api/v1/builds/56/artifacts?: Post http://gitlab/ci/api/v1/builds/56/artifacts?: write tcp 172.17.0.9:40980->192.168.1.228:80: write: broken pipe id=56 token=SFxeHDae
WARNING: Retrying...
ERROR: Uploading artifacts to coordinator... error error=couldn't execute POST against http://gitlab/ci/api/v1/builds/56/artifacts?: Post http://gitlab/ci/api/v1/builds/56/artifacts?: write tcp 172.17.0.9:40992->192.168.1.228:80: write: broken pipe id=56 token=SFxeHDae
WARNING: Retrying...
ERROR: Uploading artifacts to coordinator... error error=couldn't execute POST against http://gitlab/ci/api/v1/builds/56/artifacts?: Post http://gitlab/ci/api/v1/builds/56/artifacts?: write tcp 172.17.0.9:41000->192.168.1.228:80: write: broken pipe id=56 token=SFxeHDae
FATAL: invalid argument
ERROR: Build failed: exit code 1
What is the expected correct behavior?
Artifact should be uploaded, or a better error message should be shown that would allow me to figure out what's wrong.
(What you should see instead)
I tried with
artifacts:
paths:
- 'Docker/output/*.json'
And got the following result:
Uploading artifacts...
Uploading artifacts to coordinator... ok id=58 responseStatus=201 Created token=EEe-FK93
Build succeeded
Relevant logs and/or screenshots
Files in output directory:
Asgard.Kodi.Api.deps.json
Asgard.Kodi.Api.dll
Asgard.Kodi.Api.pdb
Asgard.Kodi.Api.runtimeconfig.json
Asgard.Kodi.Db.dll
Asgard.Kodi.Db.pdb
Dapper.dll
Elasticsearch.Net.dll
Google.Protobuf.dll
Microsoft.AspNetCore.Antiforgery.dll
Microsoft.AspNetCore.Authorization.dll
Microsoft.AspNetCore.Cors.dll
Microsoft.AspNetCore.Cryptography.Internal.dll
Microsoft.AspNetCore.DataProtection.Abstractions.dll
Microsoft.AspNetCore.DataProtection.dll
Microsoft.AspNetCore.Diagnostics.Abstractions.dll
Microsoft.AspNetCore.Diagnostics.dll
Microsoft.AspNetCore.Hosting.Abstractions.dll
Microsoft.AspNetCore.Hosting.Server.Abstractions.dll
Microsoft.AspNetCore.Hosting.dll
Microsoft.AspNetCore.Html.Abstractions.dll
Microsoft.AspNetCore.Http.Abstractions.dll
Microsoft.AspNetCore.Http.Extensions.dll
Microsoft.AspNetCore.Http.Features.dll
Microsoft.AspNetCore.Http.dll
Microsoft.AspNetCore.HttpOverrides.dll
Microsoft.AspNetCore.JsonPatch.dll
Microsoft.AspNetCore.Localization.dll
Microsoft.AspNetCore.Mvc.Abstractions.dll
Microsoft.AspNetCore.Mvc.ApiExplorer.dll
Microsoft.AspNetCore.Mvc.Core.dll
Microsoft.AspNetCore.Mvc.Cors.dll
Microsoft.AspNetCore.Mvc.DataAnnotations.dll
Microsoft.AspNetCore.Mvc.Formatters.Json.dll
Microsoft.AspNetCore.Mvc.Localization.dll
Microsoft.AspNetCore.Mvc.Razor.Host.dll
Microsoft.AspNetCore.Mvc.Razor.dll
Microsoft.AspNetCore.Mvc.TagHelpers.dll
Microsoft.AspNetCore.Mvc.ViewFeatures.dll
Microsoft.AspNetCore.Mvc.dll
Microsoft.AspNetCore.Razor.Runtime.dll
Microsoft.AspNetCore.Razor.dll
Microsoft.AspNetCore.ResponseCaching.Abstractions.dll
Microsoft.AspNetCore.Routing.Abstractions.dll
Microsoft.AspNetCore.Routing.dll
Microsoft.AspNetCore.Server.IISIntegration.dll
Microsoft.AspNetCore.Server.Kestrel.dll
Microsoft.AspNetCore.WebUtilities.dll
Microsoft.CSharp.dll
Microsoft.DotNet.PlatformAbstractions.dll
Microsoft.Extensions.Caching.Abstractions.dll
Microsoft.Extensions.Caching.Memory.dll
Microsoft.Extensions.Configuration.Abstractions.dll
Microsoft.Extensions.Configuration.EnvironmentVariables.dll
Microsoft.Extensions.Configuration.FileExtensions.dll
Microsoft.Extensions.Configuration.Json.dll
Microsoft.Extensions.Configuration.dll
Microsoft.Extensions.DependencyInjection.Abstractions.dll
Microsoft.Extensions.DependencyInjection.dll
Microsoft.Extensions.DependencyModel.dll
Microsoft.Extensions.FileProviders.Abstractions.dll
Microsoft.Extensions.FileProviders.Composite.dll
Microsoft.Extensions.FileProviders.Physical.dll
Microsoft.Extensions.FileSystemGlobbing.dll
Microsoft.Extensions.Globalization.CultureInfoCache.dll
Microsoft.Extensions.Localization.Abstractions.dll
Microsoft.Extensions.Localization.dll
Microsoft.Extensions.Logging.Abstractions.dll
Microsoft.Extensions.Logging.Console.dll
Microsoft.Extensions.Logging.dll
Microsoft.Extensions.ObjectPool.dll
Microsoft.Extensions.Options.dll
Microsoft.Extensions.PlatformAbstractions.dll
Microsoft.Extensions.Primitives.dll
Microsoft.Extensions.WebEncoders.dll
Microsoft.Net.Http.Headers.dll
MySql.Data.Core.dll
Newtonsoft.Json.dll
Serilog.Sinks.ColoredConsole.dll
Serilog.Sinks.Elasticsearch.dll
Serilog.Sinks.File.dll
Serilog.Sinks.PeriodicBatching.dll
Serilog.Sinks.RollingFile.dll
Serilog.dll
System.AppContext.dll
System.Buffers.dll
System.Collections.Concurrent.dll
System.Collections.Immutable.dll
System.Collections.NonGeneric.dll
System.Collections.Specialized.dll
System.ComponentModel.Annotations.dll
System.ComponentModel.Primitives.dll
System.ComponentModel.TypeConverter.dll
System.ComponentModel.dll
System.Data.Common.dll
System.Diagnostics.Contracts.dll
System.Diagnostics.DiagnosticSource.dll
System.Diagnostics.StackTrace.dll
System.Diagnostics.TextWriterTraceListener.dll
System.Dynamic.Runtime.dll
System.IO.Compression.ZipFile.dll
System.IO.FileSystem.Primitives.dll
System.Linq.Expressions.dll
System.Linq.dll
System.Net.WebSockets.dll
System.Numerics.Vectors.dll
System.ObjectModel.dll
System.Reflection.Emit.ILGeneration.dll
System.Reflection.Emit.Lightweight.dll
System.Reflection.Emit.dll
System.Reflection.Metadata.dll
System.Reflection.TypeExtensions.dll
System.Resources.Reader.dll
System.Runtime.CompilerServices.Unsafe.dll
System.Runtime.InteropServices.RuntimeInformation.dll
System.Runtime.Loader.dll
System.Runtime.Numerics.dll
System.Runtime.Serialization.Primitives.dll
System.Security.Claims.dll
System.Security.Cryptography.OpenSsl.dll
System.Security.Cryptography.Primitives.dll
System.Security.Principal.dll
System.Text.Encodings.Web.dll
System.Text.RegularExpressions.dll
System.Threading.Tasks.Extensions.dll
System.Threading.Thread.dll
System.Threading.ThreadPool.dll
System.Threading.dll
System.Xml.ReaderWriter.dll
System.Xml.XDocument.dll
appsettings.json
refs
runtimes
web.config
Output of checks
This is locally hosted gitlab ce.
Results of GitLab environment info
Installed in docker, results:
System information
System:
Current User: git
Using RVM: no
Ruby Version: 2.3.3p222
Gem Version: 2.6.6
Bundler Version:1.13.7
Rake Version: 10.5.0
Sidekiq Version:4.2.7
GitLab information
Version: 8.15.4
Revision: a0b1379
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: http://gitlab
HTTP Clone URL: http://gitlab/some-group/some-project.git
SSH Clone URL: git@gitlab:some-group/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 4.1.1
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)
Checking GitLab Shell ...
GitLab Shell version >= 4.1.1 ? ... OK (4.1.1)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
2/1 ... ok
2/2 ... ok
2/3 ... ok
2/4 ... ok
2/5 ... ok
2/6 ... ok
2/7 ... ok
2/8 ... ok
2/9 ... ok
4/10 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
projects have namespace: ...
2/1 ... yes
2/2 ... yes
2/3 ... yes
2/4 ... yes
2/5 ... yes
2/6 ... yes
2/7 ... yes
2/8 ... yes
2/9 ... yes
4/10 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.3)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 2.7.3 ? ... yes (2.8.4)
Active users: 2
Checking GitLab ... Finished
Possible fixes
No idea, sorry.