mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 01:35:28 +01:00
Merge branch 'dev' into 'pretzel-branch'
Remove deprecated experimental tag See merge request crafty-controller/crafty-commander!124
This commit is contained in:
commit
b6c9c96419
@ -4,11 +4,14 @@ stages:
|
||||
- docker-dev
|
||||
- docker-prod
|
||||
|
||||
variables:
|
||||
DOCKER_HOST: tcp://docker:2376
|
||||
DOCKER_TLS_CERTDIR: "/certs"
|
||||
|
||||
docker-build-dev:
|
||||
image: docker:latest
|
||||
services:
|
||||
- name: docker:dind
|
||||
command: ["--experimental"]
|
||||
stage: docker-dev
|
||||
tags:
|
||||
- docker
|
||||
@ -26,13 +29,15 @@ docker-build-dev:
|
||||
mkdir -p ~/.docker/cli-plugins
|
||||
mv docker-buildx ~/.docker/cli-plugins/docker-buildx
|
||||
docker version
|
||||
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
- docker run --rm --privileged aptman/qus -- -r
|
||||
- docker run --rm --privileged aptman/qus -s -- -p aarch64 x86_64
|
||||
- echo $CI_BUILD_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
|
||||
script:
|
||||
- |
|
||||
tag=":$CI_COMMIT_REF_SLUG"
|
||||
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
|
||||
- docker buildx create --use --name zedBuilder
|
||||
- docker context create tls-environment
|
||||
- docker buildx create --name zedBuilder --use tls-environment
|
||||
- docker buildx build
|
||||
--cache-from type=registry,ref="$CI_REGISTRY_IMAGE${tag}"
|
||||
--build-arg BUILDKIT_INLINE_CACHE=1
|
||||
@ -42,6 +47,7 @@ docker-build-dev:
|
||||
after_script:
|
||||
- |
|
||||
docker buildx rm zedBuilder && echo "Successfully Stopped builder instance" || echo "Failed to stop builder instance."
|
||||
docker context rm tls-environment || true
|
||||
echo "Please review multi-arch manifests are present:"
|
||||
docker buildx imagetools inspect "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
|
||||
|
||||
@ -49,7 +55,6 @@ docker-build-prod:
|
||||
image: docker:latest
|
||||
services:
|
||||
- name: docker:dind
|
||||
command: ["--experimental"]
|
||||
stage: docker-prod
|
||||
tags:
|
||||
- docker
|
||||
@ -67,13 +72,15 @@ docker-build-prod:
|
||||
mkdir -p ~/.docker/cli-plugins
|
||||
mv docker-buildx ~/.docker/cli-plugins/docker-buildx
|
||||
docker version
|
||||
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
- docker run --rm --privileged aptman/qus -- -r
|
||||
- docker run --rm --privileged aptman/qus -s -- -p aarch64 x86_64
|
||||
- echo $CI_BUILD_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
|
||||
script:
|
||||
- |
|
||||
tag=""
|
||||
echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'"
|
||||
- docker buildx create --use --name zedBuilder
|
||||
- docker context create tls-environment
|
||||
- docker buildx create --name zedBuilder --use tls-environment
|
||||
- docker buildx build
|
||||
--cache-from type=registry,ref="$CI_REGISTRY_IMAGE${tag}"
|
||||
--build-arg BUILDKIT_INLINE_CACHE=1
|
||||
@ -83,6 +90,7 @@ docker-build-prod:
|
||||
after_script:
|
||||
- |
|
||||
docker buildx rm zedBuilder && echo "Successfully Stopped builder instance" || echo "Failed to stop builder instance."
|
||||
docker context rm tls-environment || true
|
||||
echo "Please review multi-arch manifests are present:"
|
||||
docker buildx imagetools inspect "$CI_REGISTRY_IMAGE${tag}"
|
||||
|
||||
|
@ -94,7 +94,7 @@ class Helpers:
|
||||
return True
|
||||
except Exception as err:
|
||||
return False
|
||||
|
||||
|
||||
@staticmethod
|
||||
def check_port(server_port):
|
||||
a_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
@ -653,9 +653,9 @@ class Helpers:
|
||||
|
||||
@staticmethod
|
||||
def generate_tree(folder, output=""):
|
||||
for file in sorted(os.scandir(folder), key=lambda e: e.name):
|
||||
filename = html.escape(file.name)
|
||||
rel = os.path.join(folder, filename)
|
||||
for raw_filename in os.listdir(folder):
|
||||
filename = html.escape(raw_filename)
|
||||
rel = os.path.join(folder, raw_filename)
|
||||
if os.path.isdir(rel):
|
||||
output += \
|
||||
"""<li class="tree-item" data-path="{}">
|
||||
|
@ -25,11 +25,9 @@ class HTTPHandlerPage(BaseHandler):
|
||||
def get(self, page):
|
||||
url = self.request.full_url
|
||||
port = 443
|
||||
print(url)
|
||||
if url[len(url)-1] == '/':
|
||||
url = url.strip(url[len(url)-1])
|
||||
url_list = url.split('/')
|
||||
print(url_list)
|
||||
if url_list[0] != "":
|
||||
primary_url = url_list[0] + ":"+str(port)+"/"
|
||||
backup_url = url_list[0] + ":" +str(helper.get_setting["https_port"]) +"/"
|
||||
|
Loading…
x
Reference in New Issue
Block a user