Pin versions in pages templates
Why are we doing this work
Some of the pages templates in https://gitlab.com/gitlab-org/gitlab/-/tree/1c0abcb5524e1f5492f58b9e065ba3235da10e25/lib/gitlab/ci/templates/Pages don't work, because they don't use version pinning and some of the libraries / frameworks being used have progressed to the point where they are no longer compatible with the language version being used.
-
$ brunch build --production Error: Brunch 3+ requires Node.js v10.16 or higher (you have v4.2.2) Upgrade Node.js or use older Brunch (not recommended): npm i -g brunch@2
-
$ php composer.phar install No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information. Loading composer repositories with package information Info from https://repo.packagist.org: #StandWithUkraine Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires php ^8.0.2 <8.3 but your php version (7.2.34) does not satisfy that requirement. Problem 2 - Root composer.json requires illuminate/collections ^9.0 -> satisfiable by illuminate/collections[v9.0.0-beta.1, ..., 9.x-dev]. - illuminate/collections[v9.0.0-beta.1, ..., 9.x-dev] require php ^8.0.2 -> your php version (7.2.34) does not satisfy that requirement. Problem 3 - Root composer.json requires illuminate/container ^9.0 -> satisfiable by illuminate/container[v9.0.0-beta.1, ..., 9.x-dev]. - illuminate/container[v9.0.0-beta.1, ..., 9.x-dev] require php ^8.0.2 -> your php version (7.2.34) does not satisfy that requirement. Problem 4 - Root composer.json requires illuminate/filesystem ^9.0 -> satisfiable by illuminate/filesystem[v9.0.0-beta.1, ..., 9.x-dev]. - illuminate/filesystem[v9.0.0-beta.1, ..., 9.x-dev] require php ^8.0.2 -> your php version (7.2.34) does not satisfy that requirement. Problem 5 - Root composer.json requires illuminate/view ^9.8 -> satisfiable by illuminate/view[v9.8.0, ..., 9.x-dev]. - illuminate/view[v9.8.0, ..., 9.x-dev] require php ^8.0.2 -> your php version (7.2.34) does not satisfy that requirement. Problem 6 - Root composer.json requires friendsofphp/php-cs-fixer ^3.11 -> satisfiable by friendsofphp/php-cs-fixer[v3.11.0]. - friendsofphp/php-cs-fixer v3.11.0 requires php ^7.4 || ^8.0 -> your php version (7.2.34) does not satisfy that requirement. Problem 7 - illuminate/support[v9.0.0-beta.1, ..., 9.x-dev] require php ^8.0.2 -> your php version (7.2.34) does not satisfy that requirement. - Root composer.json requires illuminate/support ^9.0 -> satisfiable by illuminate/support[v9.0.0-beta.1, ..., 9.x-dev].
-
https://gitlab.com/gitlab-org/gitlab/-/blob/1c0abcb5524e1f5492f58b9e065ba3235da10e25/lib/gitlab/ci/templates/Pages/Lektor.gitlab-ci.yml - Using Python 2
$ pip install lektor DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support Collecting lektor Downloading Lektor-3.2.3-py2.py3-none-any.whl (3.2 MB) Collecting Jinja2>=2.11 Downloading Jinja2-2.11.3-py2.py3-none-any.whl (125 kB) Requirement already satisfied: pathlib2; python_version < "3.4" in /usr/local/lib/python2.7/site-packages (from lektor) (2.3.5) Collecting EXIFRead Downloading ExifRead-3.0.0.tar.gz (39 kB) ERROR: Command errored out with exit status 1: command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ch39QM/EXIFRead/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ch39QM/EXIFRead/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-ch39QM/EXIFRead/pip-egg-info cwd: /tmp/pip-install-ch39QM/EXIFRead/ Complete output (8 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-ch39QM/EXIFRead/setup.py", line 2, in <module> import exifread File "exifread/__init__.py", line 21 def _find_tiff_exif(fh: BinaryIO) -> tuple: ^ SyntaxError: invalid syntax ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. WARNING: You are using pip version 20.0.2; however, version 20.3.4 is available. You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
-
$ bundle install -j4 /usr/local/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.2.22) required by your /builds/leetickett-gitlab/nanoc/Gemfile.lock. (Gem::GemNotFoundException) To update to the latest version installed on your system, run `bundle update --bundler`. To install the missing version, run `gem install bundler:2.2.22` from /usr/local/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path' from /usr/local/bin/bundle:23:in `<main>'
Relevant links
Non-functional requirements
-
Documentation: -
Feature flag: -
Performance: -
Testing:
Implementation plan
- Consider bringing the templates up-to-date (use the latest versions)
- Use version pinning so that the templates will still work over time
List of CI templates to be revised:
-
Brunch.gitlab-ci.yml: !143336 (merged) -
Doxygen.gitlab-ci.yml: !144317 (merged) -
Gatsby.gitlab-ci.yml: !148120 (merged) -
HTML.gitlab-ci.yml: !144317 (merged) -
Harp.gitlab-ci.yml: !144317 (merged) -
Hexo.gitlab-ci.yml: !146050 (merged) -
Hugo.gitlab-ci.yml: !146050 (merged) -
Hyde.gitlab-ci.yml: !146050 (merged) -
JBake.gitlab-ci.yml: !146529 (merged) -
Jekyll.gitlab-ci.yml: !146529 (merged) -
Jigsaw.gitlab-ci.yml: !146529 (merged) -
Lektor.gitlab-ci.yml: !147491 (merged) -
Metalsmith.gitlab-ci.yml: !147491 (merged) -
Middleman.gitlab-ci.yml: !147491 (merged) -
Nanoc.gitlab-ci.yml: !147722 (merged) -
Octopress.gitlab-ci.yml: Unchanged -
Pelican.gitlab-ci.yml: !147722 (merged) -
SwaggerUI.gitlab-ci.yml: Unchanged
Verification steps
Edited by Naman Jagdish Gala