Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reference-repository
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
grid5000
reference-repository
Commits
3d45f598
Commit
3d45f598
authored
1 year ago
by
Philippe Virouleau
Browse files
Options
Downloads
Patches
Plain Diff
Support for ruby 3.1
parent
2e459e91
No related branches found
No related tags found
1 merge request
!551
Introduce support for ruby 3.1 (14905)
Pipeline
#867474
skipped
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+20
-5
20 additions, 5 deletions
.gitlab-ci.yml
.ruby-version
+1
-1
1 addition, 1 deletion
.ruby-version
lib/refrepo/input_loader.rb
+9
-2
9 additions, 2 deletions
lib/refrepo/input_loader.rb
with
30 additions
and
8 deletions
.gitlab-ci.yml
+
20
−
5
View file @
3d45f598
...
@@ -16,8 +16,21 @@ include:
...
@@ -16,8 +16,21 @@ include:
# Import g5k default stages
# Import g5k default stages
-
'
/g5k-default-stages.yml'
-
'
/g5k-default-stages.yml'
.template-refrepo
:
extends
:
.template-test
parallel
:
matrix
:
-
DEBIAN_VERSION
:
[
bullseye
,
bookworm
]
image
:
debian:$DEBIAN_VERSION
before_script
:
# This cache is configured in '.base'
-
export APT_CACHE_DIR=`pwd`/vendor/apt && mkdir -pv $APT_CACHE_DIR
-
apt-get update && apt-get -o dir::cache::archives="$APT_CACHE_DIR" -y --no-install-recommends install build-essential wget git ruby ruby-dev bundler rake gpg clustershell graphviz
# Call the original before_script section
-
!reference
[
.base
,
before_script
]
validate-data
:
validate-data
:
extends
:
.te
st-for-bullseye
extends
:
.te
mplate-refrepo
stage
:
validate
stage
:
validate
script
:
script
:
# Add G5K CA certificate
# Add G5K CA certificate
...
@@ -27,15 +40,17 @@ validate-data:
...
@@ -27,15 +40,17 @@ validate-data:
-
bundle exec rake valid:duplicates
-
bundle exec rake valid:duplicates
wikigen
:
wikigen
:
extends
:
.te
st-for-bullseye
extends
:
.te
mplate-test
stage
:
validate
stage
:
validate
allow_failure
:
true
allow_failure
:
true
parallel
:
parallel
:
matrix
:
matrix
:
-
GENERATOR
:
[
cpu_parameters
,
disk_reservation
,
environments
,
group_storage
,
hardware
,
kwollect_metrics
,
oar_properties
,
status
]
-
GENERATOR
:
[
cpu_parameters
,
disk_reservation
,
environments
,
group_storage
,
hardware
,
kwollect_metrics
,
oar_properties
,
status
]
SITE
:
global
SITE
:
global
DEBIAN_VERSION
:
[
bullseye
,
bookworm
]
-
GENERATOR
:
[
site_hardware
,
site_network
]
-
GENERATOR
:
[
site_hardware
,
site_network
]
SITE
:
[
grenoble
,
lille
,
luxembourg
,
lyon
,
nancy
,
nantes
,
rennes
,
sophia
,
toulouse
]
SITE
:
[
grenoble
,
lille
,
luxembourg
,
lyon
,
nancy
,
nantes
,
rennes
,
sophia
,
toulouse
]
DEBIAN_VERSION
:
[
bullseye
,
bookworm
]
script
:
script
:
-
echo "$GRID5000_API" > "${HOME}/.grid5000_api.yml"
-
echo "$GRID5000_API" > "${HOME}/.grid5000_api.yml"
-
bundle exec rake gen:wiki NAME=${GENERATOR} SITE=${SITE} DO=diff
-
bundle exec rake gen:wiki NAME=${GENERATOR} SITE=${SITE} DO=diff
...
@@ -44,7 +59,7 @@ wikigen:
...
@@ -44,7 +59,7 @@ wikigen:
-
master
-
master
generate-reference-api
:
generate-reference-api
:
extends
:
.te
st-for-bullseye
extends
:
.te
mplate-refrepo
stage
:
generate
stage
:
generate
script
:
script
:
-
export TZ=Europe/Paris
-
export TZ=Europe/Paris
...
@@ -63,14 +78,14 @@ deploy:
...
@@ -63,14 +78,14 @@ deploy:
rspec
:
rspec
:
stage
:
deploy
# we use 'deploy' here to avoid blocking on this when updating the ref-repo
stage
:
deploy
# we use 'deploy' here to avoid blocking on this when updating the ref-repo
extends
:
.te
st-for-bullseye
extends
:
.te
mplate-refrepo
script
:
script
:
-
export TZ=Europe/Paris
-
export TZ=Europe/Paris
-
bundle exec rspec
-
bundle exec rspec
valid-homogeneity
:
valid-homogeneity
:
stage
:
deploy
stage
:
deploy
extends
:
.te
st-for-bullseye
extends
:
.te
mplate-refrepo
script
:
script
:
-
wget --no-check-certificate -q https://www.grid5000.fr/certs/ca2019.grid5000.fr.crt -O /usr/local/share/ca-certificates/ca2019.grid5000.fr.crt
-
wget --no-check-certificate -q https://www.grid5000.fr/certs/ca2019.grid5000.fr.crt -O /usr/local/share/ca-certificates/ca2019.grid5000.fr.crt
-
/usr/sbin/update-ca-certificates
-
/usr/sbin/update-ca-certificates
...
...
This diff is collapsed.
Click to expand it.
.ruby-version
+
1
−
1
View file @
3d45f598
ruby-
2.7.4
ruby-
3.1.0
This diff is collapsed.
Click to expand it.
lib/refrepo/input_loader.rb
+
9
−
2
View file @
3d45f598
...
@@ -16,14 +16,21 @@ def load_yaml_file_hierarchy(directory = File.expand_path("../../input/grid5000/
...
@@ -16,14 +16,21 @@ def load_yaml_file_hierarchy(directory = File.expand_path("../../input/grid5000/
# => List deepest files first as they have lowest priority when hash keys are duplicated.
# => List deepest files first as they have lowest priority when hash keys are duplicated.
list_of_yaml_files
=
Dir
[
'**/*.y*ml'
,
'**/*.y*ml.erb'
].
sort_by
{
|
x
|
-
x
.
count
(
'/'
)
}
list_of_yaml_files
=
Dir
[
'**/*.y*ml'
,
'**/*.y*ml.erb'
].
sort_by
{
|
x
|
-
x
.
count
(
'/'
)
}
load_args
=
{}
if
::
Gem
::
Version
.
new
(
RUBY_VERSION
)
>=
::
Gem
::
Version
.
new
(
"3.1.0"
)
# Fix compatibility with ruby 3.1
load_args
[
:permitted_classes
]
=
[
Date
,
Time
]
load_args
[
:aliases
]
=
true
end
list_of_yaml_files
.
each
{
|
filename
|
list_of_yaml_files
.
each
{
|
filename
|
begin
begin
# Load YAML
# Load YAML
if
/\.y.*ml\.erb$/
.
match
(
filename
)
if
/\.y.*ml\.erb$/
.
match
(
filename
)
# For files with .erb.yaml extensions, process the template before loading the YAML.
# For files with .erb.yaml extensions, process the template before loading the YAML.
file_hash
=
YAML
::
load
(
ERB
.
new
(
File
.
read
(
filename
)).
result
(
binding
))
file_hash
=
YAML
::
load
(
ERB
.
new
(
File
.
read
(
filename
)).
result
(
binding
)
,
**
load_args
)
else
else
file_hash
=
YAML
::
load_file
(
filename
)
file_hash
=
YAML
::
load_file
(
filename
,
**
load_args
)
end
end
if
not
file_hash
if
not
file_hash
raise
StandardError
.
new
(
"loaded hash is empty"
)
raise
StandardError
.
new
(
"loaded hash is empty"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment