Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
antragraum-proxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
app
antragraum-proxy
Commits
294130b3
Commit
294130b3
authored
7 months ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
add go test in jenkinsfile
parent
85476568
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Jenkinsfile
+11
-0
11 additions, 0 deletions
Jenkinsfile
internal/config/config.go
+4
-2
4 additions, 2 deletions
internal/config/config.go
with
15 additions
and
2 deletions
Jenkinsfile
+
11
−
0
View file @
294130b3
...
@@ -82,6 +82,17 @@ tools { go 'go-1.22.0' }
...
@@ -82,6 +82,17 @@ tools { go 'go-1.22.0' }
}
}
}
}
}
}
stage
(
'Test antragraum-proxy'
)
{
steps
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
sh
'''
go test ./internal/*
'''
}
}
}
stage
(
'Build and publish Docker image'
)
{
stage
(
'Build and publish Docker image'
)
{
steps
{
steps
{
...
...
This diff is collapsed.
Click to expand it.
internal/config/config.go
+
4
−
2
View file @
294130b3
...
@@ -59,7 +59,7 @@ type Config struct {
...
@@ -59,7 +59,7 @@ type Config struct {
}
`yaml:"logging"`
}
`yaml:"logging"`
}
}
func
LoadConfig
()
Config
{
func
LoadConfig
(
configFilePath
...
string
)
Config
{
var
config
Config
var
config
Config
env
:=
os
.
Getenv
(
"APP_ENV"
)
env
:=
os
.
Getenv
(
"APP_ENV"
)
...
@@ -69,7 +69,9 @@ func LoadConfig() Config {
...
@@ -69,7 +69,9 @@ func LoadConfig() Config {
fp
:=
fmt
.
Sprintf
(
"config/config-%s.yml"
,
env
)
fp
:=
fmt
.
Sprintf
(
"config/config-%s.yml"
,
env
)
if
testing
.
Testing
()
{
if
len
(
configFilePath
)
>
0
{
fp
=
configFilePath
[
0
]
}
else
if
testing
.
Testing
()
{
fp
=
testFilePath
fp
=
testFilePath
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment