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
b40f81b5
Commit
b40f81b5
authored
Mar 22, 2019
by
SWE CI
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/v0.1.3'
parents
69f144b2
c57b15ef
Pipeline
#29330
passed with stage
in 19 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
cmd/ci.go
cmd/ci.go
+0
-6
cmd/ci_build.go
cmd/ci_build.go
+7
-0
cmd/ci_deploy.go
cmd/ci_deploy.go
+0
-3
No files found.
cmd/ci.go
View file @
b40f81b5
...
...
@@ -18,8 +18,6 @@ import (
"github.com/spf13/cobra"
)
var
dockerRegistry
string
var
dockerRegistryNamespace
string
var
imageTag
string
var
environmentSuffix
string
...
...
@@ -40,13 +38,9 @@ func init() {
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// configCmd.PersistentFlags().String("foo", "", "A help for foo")
ciCmd
.
PersistentFlags
()
.
StringVarP
(
&
dockerRegistry
,
"registry"
,
"r"
,
""
,
"url of the docker registry"
)
ciCmd
.
PersistentFlags
()
.
StringVarP
(
&
dockerRegistryNamespace
,
"registry-namespace"
,
"n"
,
""
,
"namespace in the docker registry"
)
ciCmd
.
PersistentFlags
()
.
StringVarP
(
&
imageTag
,
"image-tag"
,
"i"
,
""
,
"image tag for docker"
)
ciCmd
.
PersistentFlags
()
.
StringVarP
(
&
environmentSuffix
,
"environment"
,
"e"
,
""
,
"environment suffix to append to helm release name"
)
ciCmd
.
MarkPersistentFlagRequired
(
"registry"
)
ciCmd
.
MarkPersistentFlagRequired
(
"registry-namespace"
)
ciCmd
.
MarkPersistentFlagRequired
(
"image-tag"
)
// Cobra supports local flags which will only run when this command
...
...
cmd/ci_build.go
View file @
b40f81b5
...
...
@@ -21,6 +21,9 @@ import (
"github.com/spf13/cobra"
)
var
dockerRegistry
string
var
dockerRegistryNamespace
string
// buildCmd represents the build command
var
ciBuildCmd
=
&
cobra
.
Command
{
Use
:
"build"
,
...
...
@@ -53,7 +56,11 @@ func init() {
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// buildCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
ciBuildCmd
.
Flags
()
.
StringVarP
(
&
dockerRegistry
,
"registry"
,
"r"
,
""
,
"url of the docker registry"
)
ciBuildCmd
.
Flags
()
.
StringVarP
(
&
dockerRegistryNamespace
,
"registry-namespace"
,
"n"
,
""
,
"namespace in the docker registry"
)
ciBuildCmd
.
MarkFlagRequired
(
"registry"
)
ciBuildCmd
.
MarkFlagRequired
(
"registry-namespace"
)
}
func
buildCiDocker
(
config
config
.
Config
)
error
{
...
...
cmd/ci_deploy.go
View file @
b40f81b5
...
...
@@ -63,8 +63,6 @@ func fluxDeployCi(config config.Config) error {
for
_
,
deployable
:=
range
config
.
Deployables
{
image
:=
deployable
.
Name
dockerImageTag
:=
image
+
":"
+
imageTag
var
releaseName
string
if
environmentSuffix
==
""
{
releaseName
=
deployable
.
Name
...
...
@@ -74,7 +72,6 @@ func fluxDeployCi(config config.Config) error {
color
.
Blue
(
"Updating Flux Release:"
,
releaseName
)
os
.
Setenv
(
"KUBE_SERVICE_NAME"
,
releaseName
)
os
.
Setenv
(
"DOCKER_IMAGE_TAG"
,
dockerImageTag
)
os
.
Setenv
(
"CI_PROJECT_NAME"
,
image
)
err
:=
environment
.
Run
(
true
,
"fluxhelmrelease"
)
...
...
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