我试图设置Gitlab Pages,直到现在我完成了上传我的静态网站文件
Uploading artifacts...
coverage/lcov-report: found 77 matching files
Uploading artifacts to coordinator... ok id=1038 responseStatus=201 Created token=QXJjgkf2
Run Code Online (Sandbox Code Playgroud)
但我不知道我的页面托管在哪里.
我瞥了一眼这个文档,但它对我来说仍然含糊不清.
project1在我的团队之下team1.我假设我应该在http://team1.abc.def.com/project1上看到我的静态页面,但没有任何内容.我的网页到底在哪里托管?
我有以下gitlab-ci.yml文件,它读取package.json使用jq处理器动态设置工件文件夹的变量名称,类似于
image: node:latest
stages:
- build
before_script:
## steps ignored for purpose of question
- export NAME_OF_ARTIFACT_FOLDER=$(cat package.json | jq -r .name)"_"$(cat package.json | jq -r .version)".zip"
- echo $NAME_OF_ARTIFACT_FOLDER ##prints the expected name here eg. myApp_1.0.0.zip
prod_build:
stage: build
script:
- echo $NAME_OF_ARTIFACT_FOLDER ##prints the expected name here eg. myApp_1.0.0.zip
- yarn run build
artifacts:
paths:
- dist/$NAME_OF_ARTIFACT_FOLDER ## this does not work
expire_in: 2 hrs
Run Code Online (Sandbox Code Playgroud)
这里的问题是- dist/$NAME_OF_ARTIFACT_FOLDER不起作用,不确定这里是否遗漏了什么。
编辑
在对如下所示的预期路径进行硬编码后,它工作正常,这意味着文件夹名称是有效的,并且工件确实被正确识别,但在来自 $NAME_OF_ARTIFACT_FOLDER …
我想了解 gitlab 中项目和子组之间的区别是什么?
请帮助我理解上述内容。
问候,
桑托什
我研究过Gitlab Runner两种类型,一种是Custom Runner,另一种是Shared Runner。
我在 中使用了Custom Runner类似的方法来创建的。它运行良好并创建了所需的构建。但通过这种方式,我遇到的一个问题是,它取决于我的系统,这意味着当我的系统打开时,我的工作正常,但当我的系统关闭时,则无法执行操作,因为它取决于我的系统运行程序。dockerGitlabapkAndroidCustom RunnerGitlab
我已阅读有关Shared Runner不依赖于任何内容并执行操作的内容。我已阅读文档,但没有找到实现它的正确方法。
请检查我.gitlab-ci.yml下面的文件
image: jangrewe/gitlab-ci-android
stages:
- build
before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
- chmod +x ./gradlew
cache:
key: ${CI_PROJECT_ID}
paths:
- .gradle/
build:
stage: build
tags:
- dev-ci
script:
- ./gradlew assembleDevelopment assembleProduction assembleStaging
artifacts:
paths:
- app/build/outputs/
Run Code Online (Sandbox Code Playgroud)
请帮助Shared Runner我Gitlab
我的总体目标是安装一个自托管的 gitlab-runner,该运行程序仅限于使用我自己的 docker 注册表中准备好的 docker 镜像。
为此,我有一个 system.d 配置,如下所示:
/etc/systemd/system/docker.service.d/allow-private-registry-only.conf
BLOCK_REGISTRY='--block-registry=all'
ADD_REGISTRY='--add-registry=my.private.registry:8080'
Run Code Online (Sandbox Code Playgroud)
这样,docker pull就只允许从中提取图像my.private.registry/。
在我设法使其工作后,我想清理我的本地注册表并删除旧的docker images. 正是在这个过程中,我偶然发现了一个名为 docker 镜像,该镜像可能是gitlab-runnergitlab/gitlab-runner-helper本身使用的某个组件,并且可能是从.docker.io
docker.io现在我想知道使用gitlab-runner时是否可能/建议阻止图像?
任何提示表示赞赏!
我正在将我的项目从 GitHub.com 迁移到自托管的 GitLab CE 实例。我之前设置了一个 GitHub Actions 管道,以便在从标签中删除新版本时发布应用程序。也就是说,当我github.com/<organization>/<project>/tags编辑标签来发布版本时,以下*-workflow.yml脚本片段将触发我想要的操作:
on:
release:
types: [created]
Run Code Online (Sandbox Code Playgroud)
GitLab CI/CD ( ) 上的等效项是什么.gitlab-ci.yml?我搜索了所有GitLab 文档和辅助网站(例如 gitlab.reddit.com 和 Stack Overflow),但找不到任何方法来做到这一点。需要明确的是,在 GitLab 中将标签转换为真实版本的步骤如下:
<GitLab CE>/<group>/<project>/-/releases/new我希望 GitLabscript在上述步骤 4 后立即执行。
我是 GitLab CI/CD 的新手,我想知道我的管道在做什么。语法是正确的,但作业一直失败,但我不知道为什么,想检查跟踪。查看作业跟踪时,它显示“此作业没有跟踪”。如果我查看作业日志,也会发生同样的情况。只有文字“无作业日志”。
我运行的每一个作业都没有痕迹,所以我怀疑这是我们自托管的 gitlab-runner 中的配置问题。我发现帖子有同样的问题,但没有任何解决方案。我尝试运行 gitlab-runner 调试模式,但它的输出没有用。
我正在使用 shell 执行器并在 gitlab-runner 上安装了 docker。
编辑:我碰巧获得了一次作业日志,但重新运行该作业给了我相同的“无作业日志”/“此作业没有痕迹”。
我有一个名为“public”的文件夹,其中包含子文件夹(带有子文件夹和文件等)和文件,例如:
\n\xe2\x94\x94 public\n \xe2\x94\x94 folder1\n \xe2\x94\x94 file1.txt\n \xe2\x94\x94 folder2\n p_file1.txt\n p_file2.txt\nRun Code Online (Sandbox Code Playgroud)\n这些文件夹和文件应作为 gitlab 运行程序运行的工件返回。只要这有效,文件夹“public”就会将 zip 文件的一部分作为其他文件夹的父文件夹。我只想将子文件夹和文件放入 zip 文件中,而不需要其父文件夹“public”(在上面的示例中替换“public”,但将“artifact.zip”替换为预期结构)。
\n到目前为止我尝试过:
\n- "public"\n- "public/*"\n- "public/**"\n- "public/**/*"\nRun Code Online (Sandbox Code Playgroud)\n编辑(我可能不太清楚):\n我想在 gitlab-ci.yml 中指定它:
\n artifacts:\n name: app\n paths:\n - ???\nRun Code Online (Sandbox Code Playgroud)\n 这是我的 gitlab-ci.yml:
image: vibraniumcore/gcc-cmake-boost-mysqlcon
#image: gitlab/dind
stages:
- test
- build
Run Tests:
stage: test
tags:
- c++
script:
- mkdir build
- cd build
- cmake ..
- cmake --build . --target VibraniumCoreTests
- cd ./Tests
- ./VibraniumCoreTests
Build VibraniumCore:
stage: build
tags:
- c++
script:
- mkdir build
- cd build
- cmake ..
- cmake --build .
Build AuthServer:
stage: build
tags:
- c++
script:
- cd Scripts
- ./build_authserver.sh
Build WorldServer:
stage: build
tags:
- c++ …Run Code Online (Sandbox Code Playgroud) 我在 EC2 上使用 Gitlab 运行程序build,在 ECS 上test使用docker 映像。deploy
我使用“推/拉”逻辑开始我的 CI 工作流程:我在第一阶段构建所有 docker 映像并将它们推送到我的 gitlab 存储库,然后在该阶段拉它们test。
我认为通过保持阶段之间构建的图像可以大大缩短工作流程build时间。buildtest
我的gitlab-ci.yml看起来像这样:
stages:
- build
- test
- deploy
build_backend:
stage: build
image: docker
services:
- docker:dind
before_script:
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin
script:
- docker build -t backend:$CI_COMMIT_BRANCH ./backend
only:
refs:
- develop
- master
build_generator:
stage: build
image: docker
services:
- docker:dind
before_script:
- echo …Run Code Online (Sandbox Code Playgroud)