Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
documentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
cloud
documentation
Commits
8be296cc
Unverified
Commit
8be296cc
authored
3 years ago
by
Jaromír Hradil
Browse files
Options
Downloads
Patches
Plain Diff
Fixing image rotation pusblish errors
parent
be10d728
No related branches found
No related tags found
1 merge request
!93
Fixing image rotation publish errors
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+5
-15
5 additions, 15 deletions
.gitlab-ci.yml
ci/image_rotation_news_gen.py
+15
-2
15 additions, 2 deletions
ci/image_rotation_news_gen.py
content/cloud/image-rotation/index.md
+0
-1
0 additions, 1 deletion
content/cloud/image-rotation/index.md
with
20 additions
and
18 deletions
.gitlab-ci.yml
+
5
−
15
View file @
8be296cc
...
@@ -5,25 +5,14 @@ variables:
...
@@ -5,25 +5,14 @@ variables:
build-test
:
build-test
:
before_script
:
before_script
:
&before-script-build-deploy
-
apk update
-
apk update
-
apk add git
-
apk add git python3 py3-pip py3-yaml openssh-client curl moreutils
-
apk add python3
-
apk add py3-pip
-
apk add py3-yaml
-
apk add openssh-client
script
:
script
:
-
hugo --config config.toml -D --destination=./public
-
hugo --config config.toml -D --destination=./public
deploy_cpanel
:
deploy_cpanel
:
before_script
:
before_script
:
*before-script-build-deploy
-
apk update
-
apk add git
-
apk add python3
-
apk add py3-pip
-
apk add py3-yaml
-
apk add openssh-client
-
apk add curl
script
:
script
:
-
git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ics.muni.cz/cloud/hiera.git
-
git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ics.muni.cz/cloud/hiera.git
-
sed -i '11,$d' content/cloud/flavors/index.md
-
sed -i '11,$d' content/cloud/flavors/index.md
...
@@ -34,7 +23,8 @@ deploy_cpanel:
...
@@ -34,7 +23,8 @@ deploy_cpanel:
-
cat content/cloud/flavors/index.md
-
cat content/cloud/flavors/index.md
-
sed -i -e "s/BUILDIDTAG/$CI_COMMIT_SHORT_SHA/g" ./layouts/partials/site-footer.html
-
sed -i -e "s/BUILDIDTAG/$CI_COMMIT_SHORT_SHA/g" ./layouts/partials/site-footer.html
-
curl https://cloud.gitlab-pages.ics.muni.cz/image-rotation/image-rotation-journal.md >> content/cloud/image-rotation/index.md
-
curl https://cloud.gitlab-pages.ics.muni.cz/image-rotation/image-rotation-journal.md >> content/cloud/image-rotation/index.md
-
python3 ci/image_rotation_news_gen.py
-
'
grep
-v
"GeekdocHidden:
true"
"content/cloud/image-rotation/index.md"
|
sponge
"content/cloud/image-rotation/index.md"'
-
python3 ci/image_rotation_news_gen.py
-
hugo --config config.toml -D --destination=./public
-
hugo --config config.toml -D --destination=./public
-
eval $(ssh-agent -s)
-
eval $(ssh-agent -s)
...
...
This diff is collapsed.
Click to expand it.
ci/image_rotation_news_gen.py
+
15
−
2
View file @
8be296cc
"""
Generated dynamically image rotation news updates
"""
#!/usr/bin/env python3
"""
Script generates dynamically image rotation news updates
Actions performed:
generating of image rotation news
* if everything goes well
- image rotation news section is updated according to image rotation journal
Usage:
python3 ./image_rotation_news.gen.py
"""
import
re
import
re
import
datetime
import
datetime
...
@@ -35,7 +48,7 @@ def generate_news(image_update_dates):
...
@@ -35,7 +48,7 @@ def generate_news(image_update_dates):
update_date
=
datetime
.
datetime
.
strftime
(
update_date
,
"
%Y-%m-%d
"
)
update_date
=
datetime
.
datetime
.
strftime
(
update_date
,
"
%Y-%m-%d
"
)
new_entry
=
[
new_entry
=
[
f
"
**
{
update_date
}
** Image rotation update, details [here](https://docs.cloud.muni.cz/
"
f
"
**
{
update_date
}
** Image rotation update, details [here](https://docs.cloud.muni.cz/
"
f
"
cloud/image-rotation/image-rotation-update-from-
{
update_date
}
)
"
,
f
"
cloud/image-rotation/
#
image-rotation-update-from-
{
update_date
}
)
"
,
]
]
news_content
=
(
news_content
=
(
news_content
[:
line_idx
]
+
new_entry
+
[
""
]
+
news_content
[
line_idx
:]
news_content
[:
line_idx
]
+
new_entry
+
[
""
]
+
news_content
[
line_idx
:]
...
...
This diff is collapsed.
Click to expand it.
content/cloud/image-rotation/index.md
+
0
−
1
View file @
8be296cc
---
---
title
:
"
Image
rotation
journal"
date
:
2022-01-23T20:31:35+02:00
date
:
2022-01-23T20:31:35+02:00
draft
:
false
draft
:
false
disableToc
:
true
disableToc
:
true
...
...
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