Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
devtool
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
k8s
devtool
Commits
5a4febfb
Commit
5a4febfb
authored
Mar 25, 2019
by
Christopher Harm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing docker build context for ci builds
parent
53754a9f
Pipeline
#29497
passed with stages
in 49 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
cmd/ci_build.go
cmd/ci_build.go
+10
-1
No files found.
cmd/ci_build.go
View file @
5a4febfb
...
...
@@ -15,6 +15,9 @@
package
cmd
import
(
"fmt"
"strings"
"git.psu.edu/k8s/devtool/config"
"git.psu.edu/k8s/devtool/environment"
"github.com/fatih/color"
...
...
@@ -79,8 +82,14 @@ func buildCiDocker(config config.Config) error {
dockerImage
:=
dockerRegistry
+
"/"
+
dockerRegistryNamespace
+
"/"
+
image
dockerTag
:=
dockerImage
+
":"
+
imageTag
dockerRootDir
:=
"."
if
idx
:=
strings
.
LastIndex
(
dockerfile
,
"/"
);
idx
!=
-
1
{
dockerRootDir
=
dockerfile
[
:
idx
]
fmt
.
Println
(
dockerRootDir
)
}
color
.
New
(
color
.
FgGreen
)
.
Printf
(
"Building: %s
\n
"
,
dockerTag
)
err
:=
environment
.
Run
(
true
,
"docker"
,
"build"
,
"-t"
,
dockerTag
,
"-f"
,
dockerfile
,
"."
)
err
:=
environment
.
Run
(
true
,
"docker"
,
"build"
,
"-t"
,
dockerTag
,
"-f"
,
dockerfile
,
dockerRootDir
)
if
err
!=
nil
{
return
err
}
...
...
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