0
votes

I´m trying to build my project in Gitlab but I´m getting an 404 error when the composition.yml tries to get the keycloak-theme.jar.

If I call the url from the browser I can download this keycloak-theme.jar but for some reason the ubuntu image in the Gitlab Runner does not see the file.

Could be a problem with the Gitlab Runner? Because other projects which use the same ansible-manager worked months ago and now are retrieving the same error during the building and I haven't changed any line of code since months.

Error:

TASK [Download custom keycloak theme] ****************************************** fatal: [127.0.0.1]: FAILED! => {"changed": false, "dest": "influx/docker/config/keycloak", "gid": 0, "group": "root", "mode": "0755", "msg": "Request failed", "owner": "root", "response": "HTTP Error 404: Not Found", "size": 4096, "state": "directory", "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"} to retry, use: --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 }}'
1

1 Answers

0
votes

The GitLab access token was expired.

To set a new one it's necessary to generate a new one here Profile>Settings>Access Tokens