Commit f2e4c7b3 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

refactor: simplify build by puting everyting in public/

parent c96a378db6aa
......@@ -7,7 +7,7 @@ mr_center:
- TOKEN=$GITLAB_TOKEN python mr_center.py
artifacts:
paths:
- build/mr.html
- public/mr.html
expire_in: 1 hour
pipelines_status:
......@@ -17,18 +17,13 @@ pipelines_status:
- TOKEN=$GITLAB_TOKEN python pipelines_status.py
artifacts:
paths:
- build/index.html
- public/index.html
expire_in: 1 hour
pages:
stage: deploy
before_script:
- pip install -r requirements.txt
script:
- mv build/index.html public/pipelines.html
- mv build/mr.html public/mr.html
- mkdir -p public/css
- mv style.css public/css/style.css
- echo "gitlab absolutly wants a script with something"
artifacts:
paths:
- public
......@@ -68,12 +68,9 @@ for cube in all_cubes:
"labels": {x.name: x.attributes for x in project.labels.list(all=True)}
}
context["css"] = open("./style.css", "r").read()
os.system("mkdir -p build") # XXX lazy
os.system("mkdir -p public") # XXX lazy
result = jinja2.Template(open("template/mr.html", "r").read()).render(**context)
open("build/mr.html", "w").write(result)
open("public/mr.html", "w").write(result)
# reference:
# In [71]: project.attributes
......
......@@ -61,11 +61,9 @@ for cube in all_cubes:
"jobs": jobs,
}
context["css"] = open("./style.css", "r").read()
os.system("mkdir -p build") # XXX lazy
result = jinja2.Template(open("template/index.html", "r").read()).render(**context)
open("build/index.html", "w").write(result)
os.system("mkdir -p public") # XXX lazy
result = jinja2.Template(open("template/pipelines.html", "r").read()).render(**context)
open("public/pipelines.html", "w").write(result)
# reference:
# In [71]: project.attributes
......
......@@ -2,9 +2,7 @@
<html>
<head>
<title>All open MRs</title>
<style type="text/css" media="screen">
{{ css }}
</style>
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<h1>MR Center <small>all PR that needs attention</small></h1>
......
......@@ -2,9 +2,7 @@
<html>
<head>
<title>Latest Build status</title>
<style type="text/css" media="screen">
{{ css }}
</style>
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<h1>Is everything green?</h1>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment