Created on 12 June 2023, over 1 year ago
Updated 29 July 2023, over 1 year ago

Problem/Motivation

GitlabCi has been released to all projects and will eventually replace DrupalCi.

GitlabCi offers more advanced features including code coverage reporting which can help improve releases going forward.

Steps to reproduce

N/A

Proposed resolution

Adopt a GitlabCi file and migrate away from DrupalCi

Remaining tasks

Create and test a .gitlab-ci.yml file for the project.

User interface changes

None

API changes

None

Data model changes

None

πŸ“Œ Task
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States cmlara

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @cmlara
  • πŸ‡«πŸ‡·France fgm Paris, France

    I'm interested in seeing how this goes, to replicate for πŸ“Œ Migrate to DrupalCI from Travis-CI Needs work .

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.0.7 + Environment: PHP 8.1 & sqlite-3.27
    last update over 1 year ago
    25 pass
  • @cmlara opened merge request.
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.0.7 + Environment: PHP 8.1 & sqlite-3.27
    last update over 1 year ago
    25 pass
  • πŸ‡ΊπŸ‡ΈUnited States cmlara

    The fails in eslint and phpcs are acceptable failures for this.

    The eslint checks were not performed before so we haven't complied with those standards in the past. The current PHPCS failures are new standards that have recently been adopted so we have not yet gone through and done an audit for them. These are valid errors, but are non-critical and are not faults in GitlabCi.

    Looking at the logs it looks like GitLab may now know when the containers are not ready (previously It was known not to) however we will want to keep an eye out to be sure we don't have the same race condition that occurred in #3314292.

    Putting the rest here for historical context.

    I had experienced issues with firecow/gitlab-ci-local failing with

    Error: Command failed with exit code 1: docker cp /tmp/rabbitmq/.gitlab-ci-local/artifacts/composer/. 02cbe63055fed9cef6ca2d51365641b286707371b51f238dd2e3101f5f3c1116:/gcl-builds
    Error response from daemon: Error processing tar file(exit status 1): cannot overwrite directory "/gcl-builds/web/modules/custom/rabbitmq/config" with non-directory "/gcl-builds"
        at makeError (/usr/local/lib/node_modules/gitlab-ci-local/node_modules/execa/lib/error.js:60:11)
        at handlePromise (/usr/local/lib/node_modules/gitlab-ci-local/node_modules/execa/index.js:118:26)
        at processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async Promise.all (index 0)
        at Job.copyArtifactsIn (/usr/local/lib/node_modules/gitlab-ci-local/src/job.ts:848:9)
        at Job.execScripts (/usr/local/lib/node_modules/gitlab-ci-local/src/job.ts:697:9)
        at Job.start (/usr/local/lib/node_modules/gitlab-ci-local/src/job.ts:487:42)
        at async Promise.all (index 3)
        at Function.runLoop (/usr/local/lib/node_modules/gitlab-ci-local/src/executor.ts:17:13)
        at Function.runPipeline (/usr/local/lib/node_modules/gitlab-ci-local/src/commander.ts:20:9)
    

    This error originates from the fact that during the phpunit stage I have it erasing the module symlinks and instead mirroring a copy of the source into the modules/custom/ folder. On firecow/gitlab-ci-local this prevents the after_script from executing.

    I thought this was just a firecow/gitlab-local-ci issue and as such pushed the first commit up to be run on the real GitlabCi system.

    Everything appeared to be functional untill the after_script, which took 5 minutes with a single sed to complete. Looking closer it actually appears the command didn't actually run on GitLabCi.

    This proceeds to continue on to uploading the artifact (unmodified) and than GitLab failing to be able to process the result file in some manner, possibly because it gets stuck trying to resolve paths or because the artifacts are not actually accessible because of a silent failure earlier in the process (all speculation).

    In the end switching to a reference inside of the script: step and avoiding after_script solves this. Perhaps this is another argument for switching to xdebug code coverage instead of pcov (pcov doesn't work with the symlink structure) to avoid making massive edits to our build system design and encountering errors like this.

  • πŸ‡ΊπŸ‡ΈUnited States cmlara

    @fgm
    For the record this template is a bit overkill, I'm using knowledge I gained during the alpha stages to 'jump into the deep end' with this and enabling phpstan L9 and code coverage reporting which are not a part of the basic D.O. templates.

    That said the before_script may be useful for you if you need to install the mongodb php extension using PECL and the services section is probably useful to demonstrate how to launch an additional container.

  • πŸ‡«πŸ‡·France fgm Paris, France

    @cmlara thanks for the explanation. The PECL install is indeed an issue.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.0.7 + Environment: PHP 8.1 & sqlite-3.27
    last update over 1 year ago
    27 pass
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.0.7 + Environment: PHP 8.1 & sqlite-3.27
    last update over 1 year ago
    27 pass
  • @cmlara opened merge request.
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.0.7 + Environment: PHP 8.1 & sqlite-3.27
    last update over 1 year ago
    23 pass
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.0.7 + Environment: PHP 8.1 & sqlite-3.27
    last update over 1 year ago
    15 pass, 2 fail
  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States cmlara
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024