我正在使用 Gitlab 设置 CI/CD 管道。我已经在 Digital Ocean Ubuntu 18.04 Droplet 上安装了 gitlab-runner,并向/etc/sudoersgitlab-runner 授予了权限,如下所示:
gitlab-runner ALL=(ALL:ALL)ALL
Run Code Online (Sandbox Code Playgroud)
对关联存储库的第一次提交正确构建了 docker-compose(应用程序本身是 Django+postgres),但以下提交无法清理以前的构建并失败:
Running with gitlab-runner 12.8.0 (1b659122)
on ubuntu-s-4vcpu-8gb-fra1-01 52WypZsE
Using Shell executor...
00:00
Running on ubuntu-s-4vcpu-8gb-fra1-01...
00:00
Fetching changes with git depth set to 50...
00:01
Reinitialized existing Git repository in /home/gitlab-runner/builds/52WypZsE/0/lorePieri/djangocicd/.git/
From https://gitlab.com/lorePieri/djangocicd
* [new ref] refs/pipelines/120533457 -> refs/pipelines/120533457
0072002..bd28ba4 develop -> origin/develop
Checking out bd28ba46 as develop...
warning: failed to remove app/staticfiles/admin/img/selector-icons.svg: Permission denied
warning: failed to remove app/staticfiles/admin/img/search.svg: …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 coreapi 和 Django Rest Framework 进行发布。我正在关注本教程,该教程基于官方教程。Coreapi 将架构下载到一个文件夹 (PATH) 中,该文件夹不是当前的文件夹,而不是像教程中那样记录一些信息。
$ coreapi get http://127.0.0.1:8000/schema/
<DownloadedFile 'PATH', open 'rb'>
Run Code Online (Sandbox Code Playgroud)
然后:
$ coreapi action snippets list
No current document. Use `coreapi get` to fetch a document first.
Run Code Online (Sandbox Code Playgroud)
同样,我无法发布:
$ coreapi credentials add 127.0.0.1 admin:testpass123 --auth basic
Added credentials 127.0.0.1 "Basic YWRtaW46d2lsbGlhbTE="
$ coreapi action snippets create --param title="Example" --param co
de="print('hello, world')"
No current document. Use `coreapi get` to fetch a document first.
Run Code Online (Sandbox Code Playgroud)
我试图在执行“coreapi action”命令的当前目录中复制架构文件,但没有改进。
在 VS Code 中,我不断收到弹出消息:
BracketPair 设置:exclusiveLanguages 不是数组来源:Null 扩展说明(Extension)
我如何让它静音?未安装插件 Bracket Pair Colorizer 2。
我正在尝试在 Cython 中同时编译 C 和 C++ 源代码。这是我当前的设置:
-setup.py
from distutils.core import setup
from Cython.Build import cythonize
from distutils.extension import Extension
import os
language = "c++"
extra_compile_flags = ["-std=c++17"]
os.environ["CC"] = "clang++"
ext_modules = [
Extension(
name="Dummy",
sources=["mydummy.pyx", "source1.cpp","source2.c"],
language=language,
extra_compile_args=extra_compile_flags,
)
]
ext_modules = cythonize(ext_modules)
setup(
name="myapp",
ext_modules=ext_modules,
)
Run Code Online (Sandbox Code Playgroud)
- 编译命令:
python3 setup.py build_ext --inplace --verbose
Run Code Online (Sandbox Code Playgroud)
在日志中我收到以下消息:
clang++ -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -c /path/source2.c -o build/temp.linux-x86_64-3.6/./path/source2.o -std=c++17 -O3
clang: …Run Code Online (Sandbox Code Playgroud) 我试图使用 system-curl 安装 cmake,如此处./bootstrap --system-curl所示。这样做,我得到了:
-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
CMake Error at CMakeLists.txt:413 (message):
CMAKE_USE_SYSTEM_CURL is ON but a curl is not found!
Call Stack (most recent call first):
CMakeLists.txt:682 (CMAKE_BUILD_UTILITIES)
-- Configuring incomplete, errors occurred!
See also "/root/temp/cmake-3.14.5/CMakeFiles/CMakeOutput.log".
See also "/root/temp/cmake-3.14.5/CMakeFiles/CMakeError.log".
---------------------------------------------
Error when bootstrapping CMake:
Problem while running initial CMake
Run Code Online (Sandbox Code Playgroud)