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
42f3d28d
Commit
42f3d28d
authored
Mar 22, 2019
by
Christopher Harm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changing inputs to fluxhelmrelease deploy command
parent
4d87115b
Pipeline
#29297
passed with stages
in 52 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
cmd/ci.go
cmd/ci.go
+2
-2
cmd/ci_deploy.go
cmd/ci_deploy.go
+2
-3
No files found.
cmd/ci.go
View file @
42f3d28d
...
...
@@ -42,12 +42,12 @@ func init() {
// 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"
,
"i"
,
""
,
"image tag for docker"
)
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"
)
ciCmd
.
MarkPersistentFlagRequired
(
"image
-tag
"
)
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
...
...
cmd/ci_deploy.go
View file @
42f3d28d
...
...
@@ -63,8 +63,7 @@ func fluxDeployCi(config config.Config) error {
for
_
,
deployable
:=
range
config
.
Deployables
{
image
:=
deployable
.
Name
dockerImage
:=
dockerRegistry
+
"/"
+
dockerRegistryNamespace
+
"/"
+
image
dockerTag
:=
dockerImage
+
":"
+
imageTag
dockerImageTag
:=
image
+
":"
+
imageTag
var
releaseName
string
if
environmentSuffix
==
""
{
...
...
@@ -75,7 +74,7 @@ func fluxDeployCi(config config.Config) error {
color
.
Blue
(
"Updating Flux Release:"
,
releaseName
)
os
.
Setenv
(
"KUBE_SERVICE_NAME"
,
releaseName
)
os
.
Setenv
(
"DOCKER_IMAGE_TAG"
,
dockerTag
)
os
.
Setenv
(
"DOCKER_IMAGE_TAG"
,
docker
Image
Tag
)
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