Skip to content
Snippets Groups Projects
Commit 54adf2d4 authored by Luigi Sbailo's avatar Luigi Sbailo
Browse files

transition to new cluster

parent 2643a6f1
No related branches found
No related tags found
1 merge request!123testing develop merge
......@@ -32,10 +32,10 @@ git clone git@gitlab.mpcdf.mpg.de:nomad-lab/analytics-deployment.git /tmp/analyt
cd /tmp/analytics-deployment
# Update the tag of the docker image
sed -i "s/^ tag\:.*/ tag\: develop$CI_COMMIT_SHORT_SHA/g" deployments/hub/config/develop.yaml
sed -i "s/^ tag\:.*/ tag\: develop$CI_COMMIT_SHORT_SHA/g" deployments/hub/develop.yaml
# Finally, commit and push the changes
git add deployments/hub/config/develop.yaml
git add deployments/hub/develop.yaml
git commit -m "CI: Update the hub image for develop ($CI_PIPELINE_URL)"
git push
......
......@@ -36,13 +36,13 @@ python .gitlab-ci/generate_tutorials_json.py /tmp/analytics-deployment/deploymen
cd /tmp/analytics-deployment
# Update the tag of the docker image
sed -i "s/^ tag\:.*/ tag\: $CI_COMMIT_SHORT_SHA/g" deployments/hub/config/production.yaml
sed -i "s/^ tag\:.*/ tag\: $CI_COMMIT_SHORT_SHA/g" deployments/hub/config/public.yaml
sed -i "s/^ tag\:.*/ tag\: production$CI_COMMIT_SHORT_SHA/g" deployments/hub/config.yaml
sed -i "s/^ tag\:.*/ tag\: production$CI_COMMIT_SHORT_SHA/g" deployments/hub/public.yaml
# Finally, commit and push the changes
git add deployments/api/tutorials_metainfo.json
git add deployments/hub/config/production.yaml
git add deployments/hub/config/public.yaml
git add deployments/hub/config.yaml
git add deployments/hub/public.yaml
git commit -m "CI: Update the hub image for production ($CI_PIPELINE_URL)"
git push
......
......@@ -32,10 +32,10 @@ git clone git@gitlab.mpcdf.mpg.de:nomad-lab/analytics-deployment.git /tmp/analyt
cd /tmp/analytics-deployment
# Update the tag of the docker image
sed -i "s/^ tag\:.*/ tag\: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME/g" deployments/hub/config/staging.yaml
sed -i "s/^ tag\:.*/ tag\: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME$CI_COMMIT_SHORT_SHA/g" deployments/hub/staging.yaml
# Finally, commit and push the changes
git add deployments/hub/config/staging.yaml
git add deployments/hub/staging.yaml
git commit -m "CI: Update the hub image for staging ($CI_PIPELINE_URL)"
git push
......
......@@ -4,29 +4,20 @@ from pathlib import Path
cwd = Path(__file__).parent
def iter_folders(path):
for file in path.glob('**/metainfo.json'):
with open(file) as f:
yield json.load(f)
def save_into_file(data: dict):
if len(sys.argv) != 2:
print("Please define an json file as output!")
exit(1)
output = sys.argv[1]
with open(output, 'w') as f:
json.dump(data, f, indent=2)
if __name__ == '__main__':
# Defining the relative path of the tutorials
path = cwd / '../tutorials/'
outputfile = cwd / 'tutorials.json'
path = cwd / 'tutorials/'
list_of_tutorials = {'tutorials': list(iter_folders(path))}
print(json.dumps(list_of_tutorials, indent=2))
save_into_file(list_of_tutorials)
with open(outputfile , 'w') as f:
json.dump(list_of_tutorials, f, indent=2)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment