This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GAZELLE = "//:gazelle" | |
| GVT = "//vendor/github.com/FiloSottile/gvt:gvt" | |
| WORKSPACE = "//:WORKSPACE" | |
| def _gvt_impl(ctx): | |
| result = ctx.new_file(ctx.label.name) | |
| gazelle = ctx.attr._gazelle.files.to_list()[0] | |
| gvt = ctx.attr._gvt.files.to_list()[0] | |
| workspace = ctx.attr._workspace.files.to_list()[0] | |
| print(ctx.attr._gazelle) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| load("@io_bazel_rules_docker//container:container.bzl", "repositories", "container_pull", "container_image") | |
| DEFAULT_VERSION = "1.1.54292" | |
| def _pull_name(kind, version): | |
| return "external_clickhouse_{}_{}".format(kind, version) | |
| def _pull_label(kind, version): | |
| return "@{}//image".format(_pull_name(kind, version)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def _clickhouse_export_impl(ctx): | |
| print(ctx.file.server, dir(ctx.attr.server), type(ctx.attr.server)) | |
| server_source = ctx.attr.server.files.to_list()[0] | |
| client_source = ctx.attr.client.files.to_list()[0] | |
| server_result = ctx.outputs.server | |
| client_result = ctx.outputs.client | |
| ... | |
| _clickhouse_export = rule( | |
| implementation = _clickhouse_export_impl, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| COMMAND = """#!/bin/bash | |
| set -x | |
| ls -al | |
| docker load --input {server_source} | awk '{{print $3}}' > {server_result} | |
| docker load --input {client_source} | awk '{{print $3}}' > {client_result} | |
| """ | |
| def _clickhouse_export_impl(ctx): | |
| server_source = ctx.attr.server.files.to_list()[0] | |
| client_source = ctx.attr.client.files.to_list()[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import sys | |
| import queue | |
| import threading | |
| import re | |
| import requests | |
| import logging | |
| import colorlog | |
| import hashlib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| load("//bzl:fmt.bzl", "fmt") | |
| fmt(name="fmt") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TODO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [jenkins@ci-slave-1:Ireland oleg]$ grep -A 1 -B 1 error_log /home/jenkins/backend-ci/bin/nginx.conf | |
| pid /home/jenkins/backend-ci/bin/nginx.pid; | |
| error_log /dev/stderr error; | |
| -- | |
| access_log /dev/stderr combined_plus; | |
| error_log /dev/stderr error; | |
| [jenkins@ci-slave-1:Ireland oleg]$ /sbin/nginx -c /home/jenkins/backend-ci/bin/nginx.conf | |
| nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(FMT).state: bin/xargs-if-changed | |
| rm -f $@ | |
| touch $@ | |
| $(FMT): bin/xargs-if-changed bin/gofmt $(FMT).state $(SIGN__GO__SOURCE) $(SIGN__GO__TEST) $(SIGN__GO__GENERATED) | |
| $(info [fmt]) | |
| make/02.files-go-source.sh | XARGS_STATE=$(FMT).state XARGS_WRAP_OUTPUT=0 bin/xargs-if-changed bin/gofmt -l -s -w | |
| make/02.files-go-test.sh | XARGS_STATE=$(FMT).state XARGS_WRAP_OUTPUT=0 bin/xargs-if-changed bin/gofmt -l -s -w | |
| touch $@ | |
| fmt: $(FMT) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(VET).state: | |
| @touch $@ | |
| $(VET): bin/xargs-if-changed bin/vet $(VET).state $(SIGN__GO__SOURCE) $(SIGN__GO__TEST) $(SIGN__GO__GENERATED) | |
| $(info [vet]) | |
| @(make/02.files-go-source.sh; make/02.files-go-test.sh) | XARGS_STATE=$(VET).state XARGS_WRAP_OUTPUT=0 bin/xargs-if-changed bin/vet | |
| @touch $@ | |
| vet: $(VET) |