我正在尝试在Gitlab中构建项目,但是当 composition.yml 尝试获取 keycloak-theme.jar 时,出现了404错误。
如果我从浏览器中调用该URL,则可以下载此 keycloak-theme.jar ,但由于某些原因,Gitlab Runner中的ubuntu映像看不到该文件。
Gitlab Runner可能有问题吗?因为其他使用同一个ansible-manager的项目在几个月前就工作了,现在在构建过程中正在检索相同的错误,而且自几个月以来我没有更改任何代码行。
错误:
任务[下载自定义按键斗篷主题] **********************************************致命:[127.0.0.1]:失败! => {“已更改”:false,“目标”:“ influx / docker / config / keycloak”,“ gid”:0,“组”:“ root”,“ mode”:“ 0755”,“ msg”:“请求失败”,“所有者”: “ root”,“ response”:“ HTTP错误404:未找到”,“ size”:4096, “ state”:“目录”,“ status_code”:404,“ uid”:0,“ url”: “ https://gitlab.com/team-influx/keycloak-themes/default-theme/-/jobs/artifacts/1.1/raw/keycloak-theme.jar?job=keycloak_theme_build”}重试,请使用:--limit @ / builds / team-influx / project / Test / test / ansible-influx-manager / ci / influx_ci_release_playbook.retry
composition.yml
---
release:
title: 'test'
version: '0.1.0'
influx:
version: '1.3.1'
apps:
- name: 'schema'
version: 'master'
- name: 'bpmn-instances-manager'
version: 'master'
- name: 'bpmn-definitions-datastore'
version: 'master'
- name: 'bpmn-editor-bpmnjs'
version: 'master'
- name: 'bpmn-instances-datastore'
version: 'master'
- name: 'bpmn-definitions-manager'
version: 'master'
- name: 'bpmn-repository'
version: 'master'
project:
customer: 'Test/test'
apps:
- name: 'test'
version: 'master'
keycloak_theme:
name: 'default-theme'
version: '1.1'
.gitlab-ci.yml
image: ubuntu:latest
variables:
RELEASE_TITLE: 'test'
RELEASE_VERSION: '0.1.0'
AIM_REPO_URL: 'gitlab.com/team-influx/ansible-influx-manager.git'
before_script:
# install ansible
- apt-get update && apt-get install -y -qq software-properties-common git
- apt-add-repository ppa:ansible/ansible
- apt-get update && apt-get install -y -qq ansible
build_kam_release:
script:
- rm -rf ../ansible-influx-manager
- 'git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@${AIM_REPO_URL} ../ansible-influx-manager'
- mv * ../ansible-influx-manager/release
- ansible-playbook ../ansible-influx-manager/ci/influx_ci_release_playbook.yml
- mv ../influx .
artifacts:
name: '${RELEASE_TITLE}-${RELEASE_VERSION}'
paths:
- 'influx'
when: manual
keycloak_custom_theme.yml
---
- name: 'Download custom keycloak theme'
get_url:
url: '{{ gitlab_kc_themes_prefix }}{{ keycloak_theme.name }}/-/jobs/artifacts/{{ keycloak_theme.version }}{{ gitlab_kc_themes_suffix }}'
dest: '{{ influx_home_dir }}/docker/config/keycloak'
headers: 'PRIVATE-TOKEN: {{ gitlab_access_token }}'