From 4cb862a9081548893fd0543491f3c901e959badb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=BChnel?= Date: Mon, 14 Oct 2019 09:07:07 +0200 Subject: [PATCH] backup for github launch --- .../start_agent.sh | 2 +- kubernetes/deploy.sh | 2 +- kubernetes/reverse-proxy/update_auth.sh | 20 +++++++++++++++++++ scripts/phabtalk/.gitignore | 1 + scripts/phabtalk/phabtalk.py | 18 +++++++++++++++++ scripts/phabtalk/requirements.txt | 1 + 6 files changed, 42 insertions(+), 2 deletions(-) create mode 100755 kubernetes/reverse-proxy/update_auth.sh create mode 100644 scripts/phabtalk/.gitignore create mode 100755 scripts/phabtalk/phabtalk.py create mode 100644 scripts/phabtalk/requirements.txt diff --git a/containers/agent-debian-testing-clang8-ssd/start_agent.sh b/containers/agent-debian-testing-clang8-ssd/start_agent.sh index 1ff7454..db1240c 100755 --- a/containers/agent-debian-testing-clang8-ssd/start_agent.sh +++ b/containers/agent-debian-testing-clang8-ssd/start_agent.sh @@ -24,7 +24,7 @@ chown -R jenkins:jenkins "${AGENT_ROOT}" mkdir -p "${CCACHE_PATH}" chown -R jenkins:jenkins "${CCACHE_PATH}" -# TODO(kuhnel): wipe the disk on startup +# TODO(kuhnel): wipe the disk(s) on startup # start ssh server /usr/sbin/sshd -D \ No newline at end of file diff --git a/kubernetes/deploy.sh b/kubernetes/deploy.sh index f0b2927..85d01e0 100755 --- a/kubernetes/deploy.sh +++ b/kubernetes/deploy.sh @@ -17,5 +17,5 @@ set -eux # nfs needs to be deployed first, as it creates the presistent volumes kubectl apply -f nfs.yaml -kubectl apply -k -f results-nginx +kubectl apply -k results-nginx kubectl apply -f jenkins.yaml \ No newline at end of file diff --git a/kubernetes/reverse-proxy/update_auth.sh b/kubernetes/reverse-proxy/update_auth.sh new file mode 100755 index 0000000..4bec1f2 --- /dev/null +++ b/kubernetes/reverse-proxy/update_auth.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://llvm.org/LICENSE.txt +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +set -eux + +#delete the old secret +kubectl delete secret proxy-auth --namespace=jenkins +# upload the new secret +kubectl create secret generic proxy-auth --from-file=auth --namespace=jenkins \ No newline at end of file diff --git a/scripts/phabtalk/.gitignore b/scripts/phabtalk/.gitignore new file mode 100644 index 0000000..f5e96db --- /dev/null +++ b/scripts/phabtalk/.gitignore @@ -0,0 +1 @@ +venv \ No newline at end of file diff --git a/scripts/phabtalk/phabtalk.py b/scripts/phabtalk/phabtalk.py new file mode 100755 index 0000000..cf83f38 --- /dev/null +++ b/scripts/phabtalk/phabtalk.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 +from phabricator import Phabricator + + +class PhabTalk: + + def __init__(self): + self._phab = Phabricator() + + def get_revision_id + +def main(phid: str, diff: str): + result = phab.differential.querydiffs(ids=[diff]) + return 'D'+result[diff]['revisionID']) + + +if __name__ == '__main__': + main('PHID-HMBT-vitgimipuq4ntrmacw67','223623') \ No newline at end of file diff --git a/scripts/phabtalk/requirements.txt b/scripts/phabtalk/requirements.txt new file mode 100644 index 0000000..dc91ba8 --- /dev/null +++ b/scripts/phabtalk/requirements.txt @@ -0,0 +1 @@ +phabricator==0.7.0 \ No newline at end of file