Reprepro working
This commit is contained in:
parent
e9feefa035
commit
fed137f82d
@ -1,8 +0,0 @@
|
|||||||
Origin: PeachCloud
|
|
||||||
Label: PeachCloud
|
|
||||||
Codename: buster
|
|
||||||
Architectures: amd64
|
|
||||||
Components: main
|
|
||||||
Description: Apt repository for PeachCloud debian packages
|
|
||||||
SignWith: {{gpg_key_id}}
|
|
||||||
DebOverride: override.buster
|
|
@ -1,3 +0,0 @@
|
|||||||
verbose
|
|
||||||
basedir {{debian_rep_dir}}
|
|
||||||
ask-passphrase
|
|
@ -1,4 +0,0 @@
|
|||||||
{% for service in services %}
|
|
||||||
{{service}} Priority optional
|
|
||||||
{{service}} Section net
|
|
||||||
{% endfor %}
|
|
@ -1,7 +1,7 @@
|
|||||||
Origin: PeachCloud
|
Origin: PeachCloud
|
||||||
Label: PeachCloud
|
Label: PeachCloud
|
||||||
Codename: buster
|
Codename: buster
|
||||||
Architectures: amd64
|
Architectures: amd64 arm64
|
||||||
Components: main
|
Components: main
|
||||||
Description: Apt repository for PeachCloud debian packages
|
Description: Apt repository for PeachCloud debian packages
|
||||||
SignWith: {{gpg_key_id}}
|
SignWith: {{gpg_key_id}}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name 167.99.136.83;
|
server_name deb.peachcloud.org;
|
||||||
|
|
||||||
access_log /var/log/nginx-debian.log;
|
access_log /var/log/nginx-debian.log;
|
||||||
error_log /var/log/nginx-debian.error;
|
error_log /var/log/nginx-debian.error;
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
while read oldrev newrev ref
|
|
||||||
do
|
|
||||||
if [[ $ref =~ .*/master$ ]];
|
|
||||||
then
|
|
||||||
echo "Master ref received. Deploying master branch to build directory..."
|
|
||||||
git --work-tree={{src_dir}}/devdocs_build --git-dir={{src_dir}}/devdocs_bare checkout -f
|
|
||||||
echo "Building docs and deploying to production..."
|
|
||||||
/root/.cargo/bin/mdbook build {{src_dir}}/devdocs_build --dest-dir {{web_dir}}/docs:peachcloud:org/html
|
|
||||||
else
|
|
||||||
echo "Ref $ref successfully received. Doing nothing: only the master branch may be deployed on this server."
|
|
||||||
fi
|
|
||||||
done
|
|
@ -1,31 +0,0 @@
|
|||||||
user www-data;
|
|
||||||
worker_processes 1;
|
|
||||||
worker_rlimit_nofile 8192;
|
|
||||||
|
|
||||||
events {
|
|
||||||
worker_connections 3000;
|
|
||||||
}
|
|
||||||
|
|
||||||
error_log /var/log/nginx/error.log warn;
|
|
||||||
pid /var/run/nginx.pid;
|
|
||||||
|
|
||||||
http {
|
|
||||||
include /etc/nginx/mime.types;
|
|
||||||
default_type application/octet-stream;
|
|
||||||
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
||||||
'$status $body_bytes_sent "$http_referer" '
|
|
||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
||||||
|
|
||||||
access_log /var/log/nginx/access.log main;
|
|
||||||
|
|
||||||
sendfile on;
|
|
||||||
#tcp_nopush on;
|
|
||||||
|
|
||||||
keepalive_timeout 65;
|
|
||||||
|
|
||||||
#gzip on;
|
|
||||||
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
|
||||||
include /etc/nginx/sites-enabled/*;
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name 159.89.5.141;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
root {{web_dir}}/docs:peachcloud:org/html;
|
|
||||||
index index.html;
|
|
||||||
try_files $uri $uri/ /index.html;
|
|
||||||
}
|
|
||||||
}
|
|
@ -98,11 +98,8 @@ for service in SERVICES:
|
|||||||
service_path = os.path.join(MICROSERVICES_SRC_DIR, service_name)
|
service_path = os.path.join(MICROSERVICES_SRC_DIR, service_name)
|
||||||
print("[ BUILIDING SERVICE {} ]".format(service_name))
|
print("[ BUILIDING SERVICE {} ]".format(service_name))
|
||||||
subprocess.call(["git", "pull"], cwd=service_path)
|
subprocess.call(["git", "pull"], cwd=service_path)
|
||||||
debian_package_path = str(subprocess.check_output(["/root/.cargo/bin/cargo", "deb", "--target", "aarch64-unknown-linux-gnu"], cwd=service_path))
|
debian_package_path = subprocess.check_output(["/root/.cargo/bin/cargo", "deb", "--target", "aarch64-unknown-linux-gnu"], cwd=service_path).decode("utf-8").strip()
|
||||||
print('OUTPUT: {}'.format(debian_package_path))
|
print('OUTPUT: {}'.format(debian_package_path))
|
||||||
subprocess.call("reprepro includedeb buster {deb_path}".format(
|
subprocess.call(["reprepro", "includedeb", "buster", debian_package_path], cwd=DEBIAN_REPO_DIR)
|
||||||
debian_dir=DEBIAN_REPO_DIR,
|
|
||||||
deb_path=debian_package_path
|
|
||||||
), cwd=DEBIAN_REPO_DIR)
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ print('PROJECT_PATH: {}'.format(PROJECT_PATH))
|
|||||||
|
|
||||||
template_path = os.path.join(PROJECT_PATH, 'conf/templates')
|
template_path = os.path.join(PROJECT_PATH, 'conf/templates')
|
||||||
template_loader = jinja2.FileSystemLoader(searchpath=template_path)
|
template_loader = jinja2.FileSystemLoader(searchpath=template_path)
|
||||||
template_env = jinja2.Environment(loader=template_loader)
|
template_env = jinja2.Environment(loader=template_loader, keep_trailing_newline=True)
|
||||||
|
|
||||||
|
|
||||||
def render_template(src, dest, template_vars=None):
|
def render_template(src, dest, template_vars=None):
|
||||||
@ -20,7 +20,7 @@ def render_template(src, dest, template_vars=None):
|
|||||||
template = template_env.get_template(src)
|
template = template_env.get_template(src)
|
||||||
if not template_vars:
|
if not template_vars:
|
||||||
template_vars= {}
|
template_vars= {}
|
||||||
output_text = template.render(template_vars=template_vars)
|
output_text = template.render(**template_vars)
|
||||||
if os.path.exists(dest):
|
if os.path.exists(dest):
|
||||||
os.remove(dest)
|
os.remove(dest)
|
||||||
with open(dest, 'w') as f:
|
with open(dest, 'w') as f:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user