Skip to content

Commit

Permalink
Replace slave but node in all files
Browse files Browse the repository at this point in the history
It breaks compatibility as slave is no longer read.

Signed-off-by: Cédric Ollivier <[email protected]>
  • Loading branch information
collivier committed Jun 2, 2023
1 parent 75d7367 commit 18dad06
Show file tree
Hide file tree
Showing 18 changed files with 137 additions and 205 deletions.
7 changes: 3 additions & 4 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ ipaddress: "{{ ansible_default_ipv4.address }}"
external_ipaddress: "{{ ipaddress }}"
project: xtesting
db_project: "{{ project }}"
use_slave: # true if slaves are deployed
use_node: # true if runners/agents are deployed
user_mail: root@localhost

kubernetes_deploy: false
kubernetes_recreate: false
use_kubernetes: "{{ kubernetes_deploy }}"
use_node: "{{ use_kubernetes }}"

# testcases
repo: opnfv
Expand All @@ -21,7 +20,7 @@ docker_tags:
- latest:
branch: master
dependency: '3.13'
# slave: lf-build2
# node: lf-build2
docker_args:
env: {}
volumes: []
Expand Down Expand Up @@ -215,8 +214,8 @@ http_dst_url: http://{{ external_ipaddress }}:{{ s3www_port }}
push_to_db: true
mongo_deploy: true
mongo_port: 27017
mongo_url: mongodb://{{ ipaddress }}:{{ mongo_port }}
mongo_wait: 1
mongo_url: mongodb://{{ ipaddress }}:{{ mongo_port }}
node_name: '{{ project }}'

# testapi
Expand Down
8 changes: 4 additions & 4 deletions templates/gitlab-ci.jobs.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
{% for volume in docker_args.volumes %}
- mkdir -p {{ volume.split(':').1 |dirname }} && cp -f {{ volume.split(':').0 |basename }} {{ volume.split(':').1 }}
{% endfor %}
{% elif use_kubernetes and not use_slave %}
{% elif use_kubernetes and not use_node %}
.{{ project}}_config: &{{ project}}_config
before_script:
{% for volume in docker_args.volumes %}
Expand All @@ -55,7 +55,7 @@
{{ test }}:
only:
- schedules
{% if use_slave %}
{% if use_node %}
tags:
- {{ project }}-daily
{% endif %}
Expand All @@ -65,7 +65,7 @@
{% else %}

{% endif -%}
{% if use_artifacts or (use_kubernetes and not use_slave) %}<<: [*{{ project}}_variables,*{{ project}}_config]
{% if use_artifacts or (use_kubernetes and not use_node) %}<<: [*{{ project}}_variables,*{{ project}}_config]
{% else %}<<: *{{ project}}_variables
{% endif -%}
{% if suite.timeout is defined %}timeout: {{ suite.timeout }}
Expand All @@ -80,7 +80,7 @@
zip:
only:
- schedules
{% if use_slave %}
{% if use_node %}
tags:
- {{ project }}-daily
{% endif %}
Expand Down
8 changes: 4 additions & 4 deletions templates/gitlab-ci.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ stages:
{% for volume in docker_args.volumes %}
- mkdir -p {{ volume.split(':').1 |dirname }} && cp -f {{ volume.split(':').0 |basename }} {{ volume.split(':').1 }}
{% endfor %}
{% elif use_kubernetes and not use_slave %}
{% elif use_kubernetes and not use_node %}
.{{ project}}_config: &{{ project}}_config
before_script:
{% for volume in docker_args.volumes %}
Expand All @@ -52,7 +52,7 @@ stages:
{{ test }}:
only:
- schedules
{% if use_slave %}
{% if use_node %}
tags:
- {{ project }}-daily
{% endif %}
Expand All @@ -62,7 +62,7 @@ stages:
{% else %}

{% endif -%}
{% if use_artifacts or gitlab_use_chainedci or (use_kubernetes and not use_slave) %}<<: *{{ project}}_config
{% if use_artifacts or gitlab_use_chainedci or (use_kubernetes and not use_node) %}<<: *{{ project}}_config
{% endif -%}
{% if suite.timeout is defined %}timeout: {{ suite.timeout }}
{% endif -%}
Expand All @@ -76,7 +76,7 @@ stages:
zip:
only:
- schedules
{% if use_slave %}
{% if use_node %}
tags:
- {{ project }}-daily
{% endif %}
Expand Down
Loading

0 comments on commit 18dad06

Please sign in to comment.