Merge branch 'dev' into 'pretzel-branch'

Remove deprecated experimental tag

See merge request crafty-controller/crafty-commander!124
This commit is contained in:
Andrew 2021-12-21 21:17:38 +00:00
commit b6c9c96419
3 changed files with 18 additions and 12 deletions

View File

@ -4,11 +4,14 @@ stages:
- docker-dev - docker-dev
- docker-prod - docker-prod
variables:
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: "/certs"
docker-build-dev: docker-build-dev:
image: docker:latest image: docker:latest
services: services:
- name: docker:dind - name: docker:dind
command: ["--experimental"]
stage: docker-dev stage: docker-dev
tags: tags:
- docker - docker
@ -26,13 +29,15 @@ docker-build-dev:
mkdir -p ~/.docker/cli-plugins mkdir -p ~/.docker/cli-plugins
mv docker-buildx ~/.docker/cli-plugins/docker-buildx mv docker-buildx ~/.docker/cli-plugins/docker-buildx
docker version 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 - echo $CI_BUILD_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
script: script:
- | - |
tag=":$CI_COMMIT_REF_SLUG" tag=":$CI_COMMIT_REF_SLUG"
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag" 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 - docker buildx build
--cache-from type=registry,ref="$CI_REGISTRY_IMAGE${tag}" --cache-from type=registry,ref="$CI_REGISTRY_IMAGE${tag}"
--build-arg BUILDKIT_INLINE_CACHE=1 --build-arg BUILDKIT_INLINE_CACHE=1
@ -42,6 +47,7 @@ docker-build-dev:
after_script: after_script:
- | - |
docker buildx rm zedBuilder && echo "Successfully Stopped builder instance" || echo "Failed to stop builder instance." 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:" echo "Please review multi-arch manifests are present:"
docker buildx imagetools inspect "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" docker buildx imagetools inspect "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
@ -49,7 +55,6 @@ docker-build-prod:
image: docker:latest image: docker:latest
services: services:
- name: docker:dind - name: docker:dind
command: ["--experimental"]
stage: docker-prod stage: docker-prod
tags: tags:
- docker - docker
@ -67,13 +72,15 @@ docker-build-prod:
mkdir -p ~/.docker/cli-plugins mkdir -p ~/.docker/cli-plugins
mv docker-buildx ~/.docker/cli-plugins/docker-buildx mv docker-buildx ~/.docker/cli-plugins/docker-buildx
docker version 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 - echo $CI_BUILD_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
script: script:
- | - |
tag="" tag=""
echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'" 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 - docker buildx build
--cache-from type=registry,ref="$CI_REGISTRY_IMAGE${tag}" --cache-from type=registry,ref="$CI_REGISTRY_IMAGE${tag}"
--build-arg BUILDKIT_INLINE_CACHE=1 --build-arg BUILDKIT_INLINE_CACHE=1
@ -83,6 +90,7 @@ docker-build-prod:
after_script: after_script:
- | - |
docker buildx rm zedBuilder && echo "Successfully Stopped builder instance" || echo "Failed to stop builder instance." 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:" echo "Please review multi-arch manifests are present:"
docker buildx imagetools inspect "$CI_REGISTRY_IMAGE${tag}" docker buildx imagetools inspect "$CI_REGISTRY_IMAGE${tag}"

View File

@ -94,7 +94,7 @@ class Helpers:
return True return True
except Exception as err: except Exception as err:
return False return False
@staticmethod @staticmethod
def check_port(server_port): def check_port(server_port):
a_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) a_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@ -653,9 +653,9 @@ class Helpers:
@staticmethod @staticmethod
def generate_tree(folder, output=""): def generate_tree(folder, output=""):
for file in sorted(os.scandir(folder), key=lambda e: e.name): for raw_filename in os.listdir(folder):
filename = html.escape(file.name) filename = html.escape(raw_filename)
rel = os.path.join(folder, filename) rel = os.path.join(folder, raw_filename)
if os.path.isdir(rel): if os.path.isdir(rel):
output += \ output += \
"""<li class="tree-item" data-path="{}"> """<li class="tree-item" data-path="{}">

View File

@ -25,11 +25,9 @@ class HTTPHandlerPage(BaseHandler):
def get(self, page): def get(self, page):
url = self.request.full_url url = self.request.full_url
port = 443 port = 443
print(url)
if url[len(url)-1] == '/': if url[len(url)-1] == '/':
url = url.strip(url[len(url)-1]) url = url.strip(url[len(url)-1])
url_list = url.split('/') url_list = url.split('/')
print(url_list)
if url_list[0] != "": if url_list[0] != "":
primary_url = url_list[0] + ":"+str(port)+"/" primary_url = url_list[0] + ":"+str(port)+"/"
backup_url = url_list[0] + ":" +str(helper.get_setting["https_port"]) +"/" backup_url = url_list[0] + ":" +str(helper.get_setting["https_port"]) +"/"