-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
198 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package buildtree | ||
|
||
import "fmt" | ||
|
||
type ErrCyclicDependency struct { | ||
Name string | ||
} | ||
|
||
func (e ErrCyclicDependency) Error() string { | ||
return fmt.Sprintf("cyclic dependency found for %q", e.Name) | ||
} | ||
|
||
type ErrDependencyMissing struct { | ||
Name string | ||
Depend string | ||
} | ||
|
||
func (e ErrDependencyMissing) Error() string { | ||
return fmt.Sprintf("dependency for %q not found: %q", e.Name, e.Depend) | ||
} | ||
|
||
type ErrMismatchDependencyImage struct { | ||
Name string | ||
Depend string | ||
ActualFullname string | ||
} | ||
|
||
func (e ErrMismatchDependencyImage) Error() string { | ||
return fmt.Sprintf("mismatch dependency for %q: %q in config but got %q in dockerfile", e.Name, e.Depend, e.ActualFullname) | ||
} | ||
|
||
type ErrMismatchDependencyTag struct { | ||
Name string | ||
Depend string | ||
ExpectedTag string | ||
ActualTag string | ||
} | ||
|
||
func (e ErrMismatchDependencyTag) Error() string { | ||
return fmt.Sprintf("mismatch dependency image tag for %q (parent is %q): %q in config but got %q in dockerfile", e.Name, e.Depend, e.ExpectedTag, e.ActualTag) | ||
} | ||
|
||
type ErrMissingCredential struct { | ||
RegistryName string | ||
} | ||
|
||
func (e ErrMissingCredential) Error() string { | ||
return fmt.Sprintf("missing credential for %q", e.RegistryName) | ||
} | ||
|
||
type ErrMissingTag struct { | ||
Tag string | ||
Name string | ||
} | ||
|
||
func (e ErrMissingTag) Error() string { | ||
return fmt.Sprintf("cannot find tag %q for provided image %q", e.Tag, e.Name) | ||
} | ||
|
||
type ErrImageTagOutdated struct { | ||
Name string | ||
} | ||
|
||
func (e ErrImageTagOutdated) Error() string { | ||
return fmt.Sprintf("image needs to be updated but still using old tag: %q", e.Name) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
root_dir: . | ||
build: | ||
- name: node1 | ||
tag: 1.0 | ||
from: ./node1 | ||
depend: node3 | ||
- name: node2 | ||
tag: 1.0 | ||
from: ./node2 | ||
depend: node1 | ||
- name: node3 | ||
tag: 1.0 | ||
from: ./node3 | ||
depend: node2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
FROM nginx:should-not-exists | ||
FROM nginx:should-not-exist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root_dir: . | ||
build: | ||
- name: ubuntu | ||
tag: 16.04 | ||
from: provided | ||
- name: node1 | ||
tag: 1.0 | ||
from: node1 | ||
depend: ubuntu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM alpine:edge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root_dir: . | ||
build: | ||
- name: ubuntu | ||
tag: 16.04 | ||
from: provided | ||
- name: node1 | ||
tag: 1.0 | ||
from: ./node1 | ||
depend: ubuntu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM ubuntu:14.04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root_dir: . | ||
build: | ||
- name: ubuntu | ||
tag: should-not-exist | ||
from: provided | ||
credentials: | ||
- name: dockerhub | ||
username: ${DOCKERHUB_USERNAME} | ||
password: ${DOCKERHUB_PASSWORD} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM ubuntu:should-not-exist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
root_dir: . | ||
build: | ||
- name: ubuntu | ||
tag: should-not-exist | ||
from: ./ubuntu | ||
- name: alpine | ||
tag: edge | ||
from: ./alpine | ||
depend: ubuntu | ||
credentials: | ||
- name: dockerhub | ||
username: ${DOCKERHUB_USERNAME} | ||
password: ${DOCKERHUB_PASSWORD} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM debian:8 |