Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
cc61a7df
Commit
cc61a7df
authored
Dec 03, 2014
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command/push: warn for bad builds
parent
c9504d50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
command/push.go
command/push.go
+20
-0
No files found.
command/push.go
View file @
cc61a7df
...
...
@@ -147,6 +147,26 @@ func (c *PushCommand) Run(args []string) int {
uploadOpts
.
Builds
[
b
.
Name
]
=
info
}
// Warn about builds not having post-processors.
var
badBuilds
[]
string
for
name
,
b
:=
range
uploadOpts
.
Builds
{
if
b
.
Artifact
{
continue
}
badBuilds
=
append
(
badBuilds
,
name
)
}
if
len
(
badBuilds
)
>
0
{
c
.
Ui
.
Error
(
fmt
.
Sprintf
(
"Warning! One or more of the builds in this template does not
\n
"
+
"have an Atlas post-processor. Artifacts from this template will
\n
"
+
"not appear in the Atlas artifact registry.
\n\n
"
+
"This is just a warning. Atlas will still build your template
\n
"
+
"and assume other post-processors are sending the artifacts where
\n
"
+
"they need to go.
\n\n
"
+
"Builds: %s
\n\n
"
,
strings
.
Join
(
badBuilds
,
", "
)))
}
// Create the build config if it doesn't currently exist.
if
err
:=
c
.
create
(
uploadOpts
.
Slug
,
create
);
err
!=
nil
{
c
.
Ui
.
Error
(
err
.
Error
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment