Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
parse-ci
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
s2870355
parse-ci
Commits
e735be3c
Commit
e735be3c
authored
1 year ago
by
s2870355
Browse files
Options
Downloads
Patches
Plain Diff
handle empty artifacts list
parent
a8aab6db
No related branches found
No related tags found
No related merge requests found
Pipeline
#83821
canceled
1 year ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
job_data.py
+8
-7
8 additions, 7 deletions
job_data.py
with
8 additions
and
7 deletions
job_data.py
+
8
−
7
View file @
e735be3c
...
...
@@ -65,7 +65,7 @@ class job_data:
image
=
None
depends
=
[]
stage
=
"
unknown
"
artifacts
=
[]
artifacts
=
None
cache
=
[]
for
line
in
file_string
.
splitlines
():
line
=
line
.
removesuffix
(
"
\n
"
)
...
...
@@ -117,10 +117,10 @@ class job_data:
name
:
str
=
self
.
location
.
replace
(
os
.
path
.
sep
,
'
/
'
)
stage
:
str
=
self
.
stage
needs
=
[
r
.
replace
(
os
.
path
.
sep
,
'
/
'
)
for
r
in
self
.
depends
]
if
len
(
self
.
artifact
)
!=
0
:
artifact
s
=
self
.
artifact
if
self
.
artifact
is
None
:
artifact
=
"
untracked
"
else
:
artifacts
=
"
untracked
"
artifacts
=
self
.
artifact
if
len
(
self
.
cache
)
!=
0
:
cache
=
self
.
cache
else
:
...
...
@@ -138,9 +138,10 @@ class job_data:
if
artifacts
==
"
untracked
"
:
output
=
output
+
'
\t
'
+
'
artifacts:
\n\t\t
untracked: true
\n
'
else
:
output
=
output
+
'
\t
'
+
'
artifacts:
\n\t\t
paths:
\n
'
for
artifact
in
artifacts
:
output
=
output
+
"
\t\t\t
-
\"
"
+
artifact
+
'
\"\n
'
if
len
(
artifacts
)
!=
0
:
output
=
output
+
'
\t
'
+
'
artifacts:
\n\t\t
paths:
\n
'
for
artifact
in
artifacts
:
output
=
output
+
"
\t\t\t
-
\"
"
+
artifact
+
'
\"\n
'
if
cache
is
not
None
:
if
cache
==
"
untracked
"
:
output
=
output
+
'
\t
'
+
'
cache:
\n\t\t
untracked: true
\n
'
...
...
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