Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jass
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Statistical-Genetics
jass
Commits
3d1befad
There was an error fetching the commit references. Please try again later.
Commit
3d1befad
authored
2 months ago
by
Bryan BRANCOTTE
Browse files
Options
Downloads
Patches
Plain Diff
Add log-fetcher ci tasks
parent
63168bb3
No related branches found
No related tags found
1 merge request
!112
Add log-fetcher ci tasks
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+45
-0
45 additions, 0 deletions
.gitlab-ci.yml
with
45 additions
and
0 deletions
.gitlab-ci.yml
+
45
−
0
View file @
3d1befad
...
@@ -349,3 +349,48 @@ delete-data-from-prod:
...
@@ -349,3 +349,48 @@ delete-data-from-prod:
-
master
-
master
environment
:
environment
:
name
:
"
k8sprod-02/jass-prod/${CI_COMMIT_REF_SLUG}"
name
:
"
k8sprod-02/jass-prod/${CI_COMMIT_REF_SLUG}"
.log-fetcher
:
stage
:
deploy
needs
:
[]
when
:
manual
image
:
harbor.pasteur.fr/kube-system/helm-kubectl:3.12.0
variables
:
GIT_STRATEGY
:
none
# don't need to checkout sources
LAST_ROWS_COUNT
:
"
400"
# you can override it when triggering the job
CHART_LOCATION
:
"
chart"
script
:
-
kubectl -n ${NAMESPACE} get quota
-
mkdir logs
-
|
for POD in $(kubectl -n ${NAMESPACE} get po -l="app.kubernetes.io/instance=${CI_COMMIT_REF_SLUG}" --output=jsonpath='{.items[*].metadata.name}'); do
echo "************************************************************"
echo "************************************************************"
echo "* ${POD}";
echo "************************************************************"
kubectl -n ${NAMESPACE} logs $POD --tail ${LAST_ROWS_COUNT} > logs/${POD}.log
cat logs/${POD}.log
done
-
echo "Check Job artifacts to download or browse log files. See "Job artifacts">"Browse" on right panel"
artifacts
:
when
:
always
paths
:
-
logs
expire_in
:
1 month
log-fetcher-in-dev
:
extends
:
.log-fetcher
variables
:
NAMESPACE
:
"
jass-dev"
environment
:
name
:
"
k8sdev-01/${NAMESPACE}/${CI_COMMIT_REF_SLUG}"
log-fetcher-in-prod
:
extends
:
.log-fetcher
variables
:
NAMESPACE
:
"
jass-prod"
environment
:
name
:
"
k8sprod-02/${NAMESPACE}/${CI_COMMIT_REF_SLUG}"
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