Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
gitlab-runner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
gitlab-runner
Commits
faffb538
There was a problem fetching the pipeline summary.
Commit
faffb538
authored
7 years ago
by
Tomasz Maczukin
Browse files
Options
Downloads
Plain Diff
Merge branch '1965-extractor-fix' into 'master'
cache-extractor command returns an error on 404 Closes
#1965
See merge request
!429
parents
f88ddd5e
336fc873
No related branches found
No related tags found
Loading
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
commands/helpers/cache_extractor.go
+6
-2
6 additions, 2 deletions
commands/helpers/cache_extractor.go
commands/helpers/cache_extractor_test.go
+3
-2
3 additions, 2 deletions
commands/helpers/cache_extractor_test.go
with
9 additions
and
4 deletions
commands/helpers/cache_extractor.go
+
6
−
2
View file @
faffb538
...
...
@@ -78,8 +78,12 @@ func (c *CacheExtractorCommand) Execute(context *cli.Context) {
if
c
.
URL
!=
""
{
err
:=
c
.
doRetry
(
c
.
download
)
if
err
!=
nil
&&
!
os
.
IsNotExist
(
err
)
{
logrus
.
Warningln
(
err
)
if
err
!=
nil
{
if
os
.
IsNotExist
(
err
)
{
logrus
.
Fatalln
(
err
)
}
else
{
logrus
.
Warningln
(
err
)
}
}
}
...
...
This diff is collapsed.
Click to expand it.
commands/helpers/cache_extractor_test.go
+
3
−
2
View file @
faffb538
...
...
@@ -10,8 +10,9 @@ import (
"github.com/stretchr/testify/assert"
"gitlab.com/gitlab-org/gitlab-ci-multi-runner/helpers"
"time"
"gitlab.com/gitlab-org/gitlab-ci-multi-runner/helpers"
)
const
cacheExtractorArchive
=
"archive.zip"
...
...
@@ -98,7 +99,7 @@ func TestCacheExtractorRemoteServerNotFound(t *testing.T) {
File
:
"non-existing-test.zip"
,
URL
:
ts
.
URL
+
"/invalid-file.zip"
,
}
assert
.
Not
Panics
(
t
,
func
()
{
assert
.
Panics
(
t
,
func
()
{
cmd
.
Execute
(
nil
)
})
_
,
err
:=
os
.
Stat
(
cacheExtractorTestArchivedFile
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment