From 1eb1d2680062c6125b0f08c2028ef2362487f962 Mon Sep 17 00:00:00 2001 From: Frank Becker Date: Fri, 19 Jul 2024 14:15:59 +0200 Subject: [PATCH 1/5] 583: access services in local network Task-URL: https://github.com/eclipse-mylyn/org.eclipse.mylyn/issues/583 --- org.eclipse.mylyn.releng/multipass/.gitignore | 1 + org.eclipse.mylyn.releng/multipass/README.md | 16 +++++++++- .../multipass/create_vm.yml | 32 +++++++++++++++++++ .../multipass/global_setup.yml | 24 +++++++------- .../multipass/inventory.yml | 5 +-- .../multipass/mylyn_setup.yml | 5 +++ .../roles/bugzilla/tasks/build_start.yml | 2 +- .../multipass/roles/gitlab/tasks/main.yml | 2 +- .../roles/jenkins/tasks/build_start.yml | 2 +- .../roles/multipass_create_vm/tasks/main.yml | 30 +++++++++-------- .../tasks/multipass_list.yml | 16 +++++++--- .../tasks/test_and_update_remote_host_etc.yml | 18 +++++++++++ 12 files changed, 118 insertions(+), 35 deletions(-) diff --git a/org.eclipse.mylyn.releng/multipass/.gitignore b/org.eclipse.mylyn.releng/multipass/.gitignore index 95a2ba4b35..a3a1fd2f2b 100644 --- a/org.eclipse.mylyn.releng/multipass/.gitignore +++ b/org.eclipse.mylyn.releng/multipass/.gitignore @@ -1 +1,2 @@ /first_setup/ +/mylyn_vars/ diff --git a/org.eclipse.mylyn.releng/multipass/README.md b/org.eclipse.mylyn.releng/multipass/README.md index d77e6fde3e..c050e7e754 100644 --- a/org.eclipse.mylyn.releng/multipass/README.md +++ b/org.eclipse.mylyn.releng/multipass/README.md @@ -80,4 +80,18 @@ This setup is only tested on am MacBook Pro M1. or ansible-playbook create_vm.yml --ask-become-pass --extra-vars="docker_run_mode=single" ansible-playbook mylyn_setup.yml --extra-vars="docker_run_mode=single" - ``` \ No newline at end of file + ``` + +Now you can use the URLs https://traefik.mylyn.local and https://mylyn.local/mylyn_idx/ for verification on the installation host computer. +You will get certification warnings and must trust the self signed certificate. + +If you want to access the URLs from an other computer in your local environment you must add a line to your /etc/hosts file. +Look into /etc/hosts of your installation host computer and you see the following line +``` +192.168.64.3 mylynmstr01 mylyn.local traefik.mylyn.local jenkins.mylyn.local hello.mylyn.local artifactory.mylyn.local gitlab.mylyn.local +``` +copy this line and replace the IP adress with the local network IP address assinged to the mylynmstr01 vm +``` +192.168.2.120 mylynmstr01 mylyn.local traefik.mylyn.local jenkins.mylyn.local hello.mylyn.local artifactory.mylyn.local gitlab.mylyn.local +``` +Now you shold be able to assess the URLs from the other computer diff --git a/org.eclipse.mylyn.releng/multipass/create_vm.yml b/org.eclipse.mylyn.releng/multipass/create_vm.yml index e4962d37aa..2350a9c2ed 100644 --- a/org.eclipse.mylyn.releng/multipass/create_vm.yml +++ b/org.eclipse.mylyn.releng/multipass/create_vm.yml @@ -3,6 +3,16 @@ # - hosts: localhost gather_facts: true + pre_tasks: + - file: + path: mylyn_vars + state: directory + post_tasks: + - no_log: false + copy: + force: true + dest: "mylyn_vars/{{ inventory_hostname }}.json" + content: "{{ vars | dict2items | json_query('[?starts_with(key, `inst_`)]') | items2dict }}" tasks: - name: include global mode ansible.builtin.include_tasks: @@ -13,6 +23,17 @@ # - hosts: localhost gather_facts: false + pre_tasks: + - include_vars: + dir: mylyn_vars + extensions: + - json + post_tasks: + - no_log: false + delegate_to: localhost + copy: + dest: "mylyn_vars/{{ inventory_hostname }}.json" + content: "{{ vars | dict2items | json_query('[?starts_with(key, `inst_`)]') | items2dict }}" roles: - role: multipass_create_vm tags: @@ -26,6 +47,17 @@ # - hosts: "{{ hostvars['localhost'].rootca_server_name }}" gather_facts: false + pre_tasks: + - include_vars: + dir: mylyn_vars + extensions: + - json + post_tasks: + - no_log: false + delegate_to: localhost + copy: + dest: "mylyn_vars/{{ inventory_hostname }}.json" + content: "{{ vars | dict2items | json_query('[?starts_with(key, `inst_`)]') | items2dict }}" vars: rootca_name: "{{ hostvars['localhost'].rootca_server_name }}" roles: diff --git a/org.eclipse.mylyn.releng/multipass/global_setup.yml b/org.eclipse.mylyn.releng/multipass/global_setup.yml index 025b9a0f06..8ed8e50835 100644 --- a/org.eclipse.mylyn.releng/multipass/global_setup.yml +++ b/org.eclipse.mylyn.releng/multipass/global_setup.yml @@ -5,6 +5,7 @@ remote_domain: "{{ remote_dom | default('public.mydomain.de')}}" docker_swarm_recreate: "{{ swarm_recreate | default(false) }}" docker_mode_global: "{{ docker_run_mode | default('container') }}" + network_ip_matcher: "{{ local_network_ip_matcher | default('^192\\.168\\.2\\..*') }}" tags: - global @@ -59,16 +60,15 @@ - "{{ setup_lst_tmp }}" tags: - global - - - ansible.builtin.debug: msg="all hosts = {{ setup_lst }}" # verbosity=3 - tags: - - global - - ansible.builtin.debug: msg="all non admin vm = {{ setup_noadmin_vm_list }}" # verbosity=3 - tags: - - global - - ansible.builtin.debug: msg="rootca_server_name = {{ rootca_server_name }}" # verbosity=3 - tags: - - global - - ansible.builtin.debug: msg="prim_install_server_name = {{ prim_install_server_name }}" # verbosity=3 + - name: debug list + vars: + msg: | + rootca_server_name = {{ rootca_server_name }} + localhostPlatform = {{ localhostPlatform }} + all hosts = {{ setup_lst }} + all non admin vm = {{ setup_noadmin_vm_list }} + ansible.builtin.debug: + msg: "{{ msg.split('\n') }}" + verbosity: 0 tags: - - global + - global diff --git a/org.eclipse.mylyn.releng/multipass/inventory.yml b/org.eclipse.mylyn.releng/multipass/inventory.yml index 3193231dd2..ddac86cd96 100644 --- a/org.eclipse.mylyn.releng/multipass/inventory.yml +++ b/org.eclipse.mylyn.releng/multipass/inventory.yml @@ -15,7 +15,8 @@ all: multipass_disk: 30G multipass_memory: 10G multipass_cpus: 4 -# additional_launch_parms: --network en0 # acces from external +# only needed when you want to share your instance to other devices in Network or Internet + additional_launch_parms: '--network=en0' mylyn_swarm_worker: hosts: mylynwrk01: @@ -37,7 +38,7 @@ all: ansible_user: ubuntu ansible_ssh_common_args: "-o StrictHostKeyChecking=no -o ControlMaster=no -o ControlPath=none" ansible_ssh_private_key_file: first_setup/ubuntu_key - default_etc_hosts: "mylyn-local traefik.mylyn.local mylyn-local.mylyn.local mylyn.local jenkins.mylyn.local hello.mylyn.local artifactory.mylyn.local gitlab.mylyn.local" + default_etc_hosts: "mylynmstr01 mylyn.local traefik.mylyn.local jenkins.mylyn.local hello.mylyn.local artifactory.mylyn.local gitlab.mylyn.local" mylynwrk01: ansible_connection: ssh ansible_host: "192.168.64.4" diff --git a/org.eclipse.mylyn.releng/multipass/mylyn_setup.yml b/org.eclipse.mylyn.releng/multipass/mylyn_setup.yml index cb9a8513bd..6ba2d77269 100644 --- a/org.eclipse.mylyn.releng/multipass/mylyn_setup.yml +++ b/org.eclipse.mylyn.releng/multipass/mylyn_setup.yml @@ -65,6 +65,11 @@ # - hosts: "{{ hostvars['localhost'].prim_install_server_name }}" gather_facts: false + pre_tasks: + - include_vars: + dir: mylyn_vars + extensions: + - json vars: swarm_master_name: "{{ hostvars['localhost'].prim_install_server_name }}" docker_mode: "{{ hostvars['localhost'].docker_mode_global }}" diff --git a/org.eclipse.mylyn.releng/multipass/roles/bugzilla/tasks/build_start.yml b/org.eclipse.mylyn.releng/multipass/roles/bugzilla/tasks/build_start.yml index 6240bcafbe..665eae60b2 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/bugzilla/tasks/build_start.yml +++ b/org.eclipse.mylyn.releng/multipass/roles/bugzilla/tasks/build_start.yml @@ -52,7 +52,7 @@ var: extra_info_label - name: myServiceLabel {{ act_item.image_tag }} set_fact: - serviceLabel: '{"type":"{{ bugzilla_type }}","url":"/{{ act_item.servmame }}/", "version": "{{ bugzilla_version.stdout }}", "info": "{{ bugzilla_info }}", "properties": { "host-name": "{{ remote_domain_name }}", "host-ip": "{{ansible_ssh_host}}", "ansible-name": "{{ inventory_hostname }}", "docker": "true" {{ extra_info_label }} } }' + serviceLabel: '{"type":"{{ bugzilla_type }}","url":"/{{ act_item.servmame }}/", "version": "{{ bugzilla_version.stdout }}", "info": "{{ bugzilla_info }}", "properties": { "host-name": "{{ remote_domain_name }}", "remote_ip": "{{ inst_network_ip }}", "ansible-name": "{{ inventory_hostname }}", "ansible-host-ip": "{{ansible_ssh_host}}", "docker": "true" {{ extra_info_label }} } }' - name: debug1 {{ act_item.image_tag }} debug: var: serviceLabel diff --git a/org.eclipse.mylyn.releng/multipass/roles/gitlab/tasks/main.yml b/org.eclipse.mylyn.releng/multipass/roles/gitlab/tasks/main.yml index 1fbbf86083..88f85fa973 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/gitlab/tasks/main.yml +++ b/org.eclipse.mylyn.releng/multipass/roles/gitlab/tasks/main.yml @@ -31,7 +31,7 @@ - name: myServiceLabel set_fact: - serviceLabel: '{"type":"gitlab","url":"https://{{ gitlabHostURL }}","version":"{{gitlabImageVersion}}","info":"","properties":{"host-name":"{{ gitlabHostURL }}","host-ip":"{{ansible_ssh_host}}","ansible-name":"{{ inventory_hostname }}","docker":"true","default":"true"} }' + serviceLabel: '{"type":"gitlab","url":"https://{{ gitlabHostURL }}","version":"{{gitlabImageVersion}}","info":"","properties":{"host-name":"{{ gitlabHostURL }}","remote_ip": "{{ inst_network_ip }}","ansible-host-ip":"{{ansible_ssh_host}}","ansible-name":"{{ inventory_hostname }}","docker":"true","default":"true"} }' - name: setlabels registry ansible.builtin.set_fact: diff --git a/org.eclipse.mylyn.releng/multipass/roles/jenkins/tasks/build_start.yml b/org.eclipse.mylyn.releng/multipass/roles/jenkins/tasks/build_start.yml index 172ccccc7b..82edb43b88 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/jenkins/tasks/build_start.yml +++ b/org.eclipse.mylyn.releng/multipass/roles/jenkins/tasks/build_start.yml @@ -39,7 +39,7 @@ extra_info_label: "{{ (',' + act_item.extra_info) if (act_item.extra_info | length > 0 ) else ''}}" - name: myServiceLabel set_fact: - serviceLabel: '{"type":"{{ jenkins_type }}","url":"/{{act_item.servmame}}/", "version": "{{version.stdout}}", "info": "", "properties": { "host-name": "{{ common_domain_name }}", "host-ip": "{{ansible_ssh_host}}", "ansible-name": "{{ inventory_hostname }}", "docker": "true" {{ extra_info_label }} } }' + serviceLabel: '{"type":"{{ jenkins_type }}","url":"/{{act_item.servmame}}/", "version": "{{version.stdout}}", "info": "", "properties": { "host-name": "{{ remote_domain_name }}", "remote_ip": "{{ inst_network_ip }}", "ansible-host-ip": "{{ansible_ssh_host}}", "ansible-name": "{{ inventory_hostname }}", "docker": "true" {{ extra_info_label }} } }' - name: setlabels {{ act_item.image_tag }} ansible.builtin.set_fact: diff --git a/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm/tasks/main.yml b/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm/tasks/main.yml index 0bcdea7f68..25de47b58e 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm/tasks/main.yml +++ b/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm/tasks/main.yml @@ -28,13 +28,14 @@ - {{ user_data }} - name: create if needed - shell: multipass launch -n {{ item.name }} --disk {{ item.disk }} --mem {{ item.memory }} --cpus {{ item.cpus }} --cloud-init first_setup/cloud-init.yaml + shell: multipass launch -n {{ item.name }} --disk {{ item.disk }} --mem {{ item.memory }} --cpus {{ item.cpus }} {{ item.launch_extra }} --cloud-init first_setup/cloud-init.yaml when: item.name not in inst_list | map(attribute='inst_name') with_items: "{{ setup_lst }}" - name: new list ansible.builtin.include_tasks: file: multipass_list.yml -- debug: var=inst_list verbosity=3 +- name: debug new list + debug: var=inst_list verbosity=3 - name: build name ip map ansible.builtin.set_fact: @@ -43,7 +44,8 @@ item.name in inst_list | map(attribute='inst_name') and (inst_list | selectattr("inst_name", "equalto", item.name))| map(attribute='ip_adr4') != [item.ip4 ] with_items: "{{ setup_lst }}" -- debug: var=ip_2_change verbosity=3 +- name: debug ip_2_change + debug: var=ip_2_change verbosity=3 when: ip_2_change is defined - name: "Replace line in file inventory.yml" @@ -52,22 +54,24 @@ regexp: "(^\\s*ansible_host:\\s*)(\"{{ item.aip | regex_escape() }}\")(.*)$" replace: "\\1\"{{item.mip}}\"" with_items: "{{ ip_2_change }}" - when: ip_2_change is defined -- name: change etc hosts + when: ip_2_change is defined + +- name: remove mylyn vm from etc hosts become: true become_user: root - ansible.builtin.replace: + ansible.builtin.lineinfile: path: /etc/hosts - regexp: "{{item.aip | regex_escape()}}(\\s+.*)?$" - replace: "{{item.mip}}\\1" + regexp: "{{'^.*'+ item.aname +'.*' }}" + state: absent with_items: "{{ ip_2_change }}" - when: ip_2_change is defined and (not item.aip is search("192.168.64.x")) -- name: append etc hosts + when: ip_2_change is defined + +- name: add mylyn vm to etc hosts} become: true become_user: root ansible.builtin.lineinfile: path: /etc/hosts - line: "{{ item.mip }} {{hostvars[item.aname].default_etc_hosts}}" - insertafter: EOF + line: "{{ item.mip + ' ' + hostvars[item.aname].default_etc_hosts }}" + state: present with_items: "{{ ip_2_change }}" - when: ip_2_change is defined and (item.aip is search("192.168.64.x")) + when: ip_2_change is defined diff --git a/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm/tasks/multipass_list.yml b/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm/tasks/multipass_list.yml index b3f237aa3f..365521fa78 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm/tasks/multipass_list.yml +++ b/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm/tasks/multipass_list.yml @@ -6,11 +6,19 @@ - name: json obj ansible.builtin.set_fact: inst_json_obj: "{{ multipass_instances.stdout | from_json}}" -- name: json names - ansible.builtin.set_fact: - inst_name_list: "{{ inst_json_obj.list | map(attribute='name') | list() }}" - name: inst_list ansible.builtin.set_fact: inst_list: "{{ inst_json_obj.list | json_query(jmesquery) }}" vars: - jmesquery: "[*].{inst_name: name, inst_state: state, ip_adr4: ipv4[0]}" + jmesquery: "[*].{inst_name: name, inst_state: state, ip_adr4: ipv4[0], ip_adr4a: ipv4[1]}" + +- name: json ipadr + ansible.builtin.set_fact: + inst_ipadr_list: "{{ inst_json_obj.list | json_query(jmesquery) | list() }}" + vars: + jmesquery: "[?name=='mylynmstr01'].ipv4" +- name: inst_network_ip + ansible.builtin.set_fact: + inst_network_ip: "{{ item }}" + when: item is regex(network_ip_matcher) + with_items: "{{ inst_ipadr_list}}" \ No newline at end of file diff --git a/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm_setup/tasks/test_and_update_remote_host_etc.yml b/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm_setup/tasks/test_and_update_remote_host_etc.yml index 935651e3b0..1a7997b239 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm_setup/tasks/test_and_update_remote_host_etc.yml +++ b/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm_setup/tasks/test_and_update_remote_host_etc.yml @@ -1,4 +1,21 @@ --- +- name: remove etc hosts if not included {{ act_name.name }} + become: true + become_user: root + ansible.builtin.lineinfile: + path: /etc/hosts + regexp: "{{'^.*mylyn.*' }}" + state: absent + delegate_to: "{{ act_name.name }}" + +- name: add etc hosts if not included {{ act_name.name }} + become: true + become_user: root + ansible.builtin.lineinfile: + path: /etc/hosts + line: "{{inst_network_ip + ' ' + hostvars['mylynmstr01'].default_etc_hosts }}" + state: present + delegate_to: "{{ act_name.name }}" - name: add etc hosts if not included {{ act_name.name }} become: true become_user: root @@ -6,5 +23,6 @@ path: /etc/hosts line: "{{ item.ip4 + ' ' + hostvars[item.name].default_etc_hosts }}" insertafter: EOF + when: item.name != 'mylynmstr01' loop: "{{ setup_lst }}" delegate_to: "{{ act_name.name }}" From 74a4c15c8df2b711fd61ce5691997a6a26e5faca Mon Sep 17 00:00:00 2001 From: Frank Becker Date: Sat, 3 Aug 2024 19:58:05 +0200 Subject: [PATCH 2/5] first part cleanup and better handling of /etc/hosts files --- org.eclipse.mylyn.releng/multipass/README.md | 4 +- .../multipass/create_vm.yml | 21 +++--- .../multipass/global_setup.yml | 29 ++++---- .../multipass/inventory.yml | 5 +- .../multipass/mylyn_setup.yml | 57 ++++++++++------ .../roles/artifactory/files/system.yaml | 66 +++++++++++++++++++ .../artifactory/tasks/create_data_volume.yml | 27 ++++++++ .../roles/artifactory/tasks/main.yml | 31 ++++++++- .../roles/bugzilla/tasks/build_start.yml | 16 +++-- .../roles/crtcertificate/tasks/main.yml | 7 -- .../multipass/roles/gitlab/tasks/main.yml | 6 +- .../roles/jenkins/tasks/build_start.yml | 5 +- .../roles/multipass_create_vm/tasks/main.yml | 32 +++++---- .../tasks/multipass_list.yml | 6 +- .../multipass_create_vm_setup/tasks/main.yml | 2 +- .../tasks/test_and_update_remote_host_etc.yml | 15 +---- .../multipass/roles/mylyn_idx/tasks/main.yml | 2 +- 17 files changed, 238 insertions(+), 93 deletions(-) create mode 100644 org.eclipse.mylyn.releng/multipass/roles/artifactory/files/system.yaml diff --git a/org.eclipse.mylyn.releng/multipass/README.md b/org.eclipse.mylyn.releng/multipass/README.md index c050e7e754..1fd418ca5b 100644 --- a/org.eclipse.mylyn.releng/multipass/README.md +++ b/org.eclipse.mylyn.releng/multipass/README.md @@ -88,10 +88,10 @@ You will get certification warnings and must trust the self signed certificate. If you want to access the URLs from an other computer in your local environment you must add a line to your /etc/hosts file. Look into /etc/hosts of your installation host computer and you see the following line ``` -192.168.64.3 mylynmstr01 mylyn.local traefik.mylyn.local jenkins.mylyn.local hello.mylyn.local artifactory.mylyn.local gitlab.mylyn.local +192.168.64.3 mylynmstr01 mylyn.local traefik.mylyn.local jenkins.mylyn.local artifactory.mylyn.local gitlab.mylyn.local ``` copy this line and replace the IP adress with the local network IP address assinged to the mylynmstr01 vm ``` -192.168.2.120 mylynmstr01 mylyn.local traefik.mylyn.local jenkins.mylyn.local hello.mylyn.local artifactory.mylyn.local gitlab.mylyn.local +192.168.2.120 mylynmstr01 mylyn.local traefik.mylyn.local jenkins.mylyn.local artifactory.mylyn.local gitlab.mylyn.local ``` Now you shold be able to assess the URLs from the other computer diff --git a/org.eclipse.mylyn.releng/multipass/create_vm.yml b/org.eclipse.mylyn.releng/multipass/create_vm.yml index 2350a9c2ed..670702455a 100644 --- a/org.eclipse.mylyn.releng/multipass/create_vm.yml +++ b/org.eclipse.mylyn.releng/multipass/create_vm.yml @@ -4,6 +4,9 @@ - hosts: localhost gather_facts: true pre_tasks: + - file: + path: mylyn_vars + state: absent - file: path: mylyn_vars state: directory @@ -12,7 +15,7 @@ copy: force: true dest: "mylyn_vars/{{ inventory_hostname }}.json" - content: "{{ vars | dict2items | json_query('[?starts_with(key, `inst_`)]') | items2dict }}" + content: "{{ vars | dict2items | json_query('[?starts_with(key, `mylyn_`)]') | items2dict }}" tasks: - name: include global mode ansible.builtin.include_tasks: @@ -33,7 +36,7 @@ delegate_to: localhost copy: dest: "mylyn_vars/{{ inventory_hostname }}.json" - content: "{{ vars | dict2items | json_query('[?starts_with(key, `inst_`)]') | items2dict }}" + content: "{{ vars | dict2items | json_query('[?starts_with(key, `mylyn_`)]') | items2dict }}" roles: - role: multipass_create_vm tags: @@ -57,21 +60,21 @@ delegate_to: localhost copy: dest: "mylyn_vars/{{ inventory_hostname }}.json" - content: "{{ vars | dict2items | json_query('[?starts_with(key, `inst_`)]') | items2dict }}" + content: "{{ vars | dict2items | json_query('[?starts_with(key, `mylyn_`)]') | items2dict }}" vars: rootca_name: "{{ hostvars['localhost'].rootca_server_name }}" roles: - role: crtrootca vars: - common_domain_name: "{{ hostvars['localhost'].local_domain }}" + common_domain_name: "{{ hostvars['localhost'].mylyn_service_domain }}" tags: - createValidCertificates - base_software - role: crtcertificate vars: subject_alt: - - "DNS:*.{{ hostvars['localhost'].local_domain }}" - common_domain_name: "{{ hostvars['localhost'].local_domain }}" + - "DNS:*.{{ hostvars['localhost'].mylyn_service_domain }}" + common_domain_name: "{{ hostvars['localhost'].mylyn_service_domain }}" tags: - createValidCertificates - base_software @@ -79,7 +82,7 @@ # # create Certificates for amm non Admin Nodes # -- hosts: "{{ hostvars['localhost'].setup_noadmin_vm_list }}" +- hosts: "{{ hostvars['localhost'].mylyn_noadmin_vm_hosts }}" gather_facts: true vars: rootca_name: "{{ hostvars['localhost'].rootca_server_name }}" @@ -90,7 +93,7 @@ - base_software vars: subject_alt: "{{ hostvars[inventory_hostname].default_etc_hosts.split() | map('regex_replace', '^', 'DNS:') | list }}" - common_domain_name: "{{ hostvars['localhost'].local_domain }}" + common_domain_name: "{{ hostvars['localhost'].mylyn_service_domain }}" - role: dockerhost tags: - base_software @@ -122,7 +125,7 @@ - base_software delegate_to: "{{ item }}" with_items: - - "{{ hostvars['localhost'].setup_noadmin_vm_list }}" + - "{{ hostvars['localhost'].mylyn_noadmin_vm_hosts }}" # # Copy rootca to local and crete cacerts with our rootca diff --git a/org.eclipse.mylyn.releng/multipass/global_setup.yml b/org.eclipse.mylyn.releng/multipass/global_setup.yml index 8ed8e50835..f7e365a1b4 100644 --- a/org.eclipse.mylyn.releng/multipass/global_setup.yml +++ b/org.eclipse.mylyn.releng/multipass/global_setup.yml @@ -1,11 +1,10 @@ - name: set global var ansible.builtin.set_fact: grp_prefix: "{{ prefix | default('mylyn')}}" - local_domain: "{{ local_dom | default('mylyn.local')}}" - remote_domain: "{{ remote_dom | default('public.mydomain.de')}}" + mylyn_service_domain: "{{ local_domain | default('mylyn.local')}}" docker_swarm_recreate: "{{ swarm_recreate | default(false) }}" docker_mode_global: "{{ docker_run_mode | default('container') }}" - network_ip_matcher: "{{ local_network_ip_matcher | default('^192\\.168\\.2\\..*') }}" + network_ip_matcher: "{{ local_network_ip_matcher | default('^192\\.168\\.64\\..*') }}" tags: - global @@ -13,7 +12,7 @@ ansible.builtin.set_fact: setup_lst_tmp: "{{ groups[grp_prefix + \"_admin\"] + groups[grp_prefix + \"_swarm_master\"] }}" - setup_noadmin_vm_list: + mylyn_noadmin_vm_hosts: "{{ groups[grp_prefix + \"_swarm_master\"] }}" tags: - global @@ -22,32 +21,32 @@ ansible.builtin.set_fact: setup_lst_tmp: "{{ setup_lst_tmp + groups[grp_prefix + \"_swarm_worker\" ] }}" - setup_noadmin_vm_list: - "{{ setup_noadmin_vm_list + groups[grp_prefix + \"_swarm_worker\" ] }}" + mylyn_noadmin_vm_hosts: + "{{ mylyn_noadmin_vm_hosts + groups[grp_prefix + \"_swarm_worker\" ] }}" tags: - global when: (docker_mode_global == 'swarm' or docker_mode_global == 'all') - name: set list admin server ansible.builtin.set_fact: rootca_server_name: "{{ groups[hostvars['localhost'].grp_prefix + \"_admin\"][0] }}" - prim_install_server_name: "{{ groups[hostvars['localhost'].grp_prefix + \"_swarm_master\"][0] }}" + mylyn_service_vm_name: "{{ groups[hostvars['localhost'].grp_prefix + \"_swarm_master\"][0] }}" tags: - global - name: build single ansible.builtin.set_fact: setup_lst_tmp: "{{ groups[grp_prefix + \"_swarm_master\" ] }}" - setup_noadmin_vm_list: + mylyn_noadmin_vm_hosts: "{{ groups[grp_prefix + \"_swarm_master\" ] }}" rootca_server_name: - "{{ prim_install_server_name }}" + "{{ mylyn_service_vm_name }}" tags: - global when: (docker_mode_global == 'single') - - name: build setup_lst + - name: build mylyn_vm_hosts ansible.builtin.set_fact: - setup_lst: "{{ setup_lst | default([]) + [ { 'name': item, 'ip4': hostvars[item].ansible_host, 'disk': hostvars[item].multipass_disk, 'memory': hostvars[item].multipass_memory, 'cpus': hostvars[item].multipass_cpus, 'launch_extra': hostvars[item].additional_launch_parms } ] }}" + mylyn_vm_hosts: "{{ mylyn_vm_hosts | default([]) + [ { 'name': item, 'ip4': hostvars[item].ansible_host, 'disk': hostvars[item].multipass_disk, 'memory': hostvars[item].multipass_memory, 'cpus': hostvars[item].multipass_cpus, 'launch_extra': hostvars[item].additional_launch_parms } ] }}" with_items: - "{{ setup_lst_tmp }}" tags: @@ -64,9 +63,11 @@ vars: msg: | rootca_server_name = {{ rootca_server_name }} - localhostPlatform = {{ localhostPlatform }} - all hosts = {{ setup_lst }} - all non admin vm = {{ setup_noadmin_vm_list }} + localhostPlatform = {{ localhostPlatform }} + all hosts = {{ mylyn_vm_hosts }} + all non admin vm = {{ mylyn_noadmin_vm_hosts }} + service vm = {{ mylyn_service_vm_name }} + service domain = {{ mylyn_service_domain }} ansible.builtin.debug: msg: "{{ msg.split('\n') }}" verbosity: 0 diff --git a/org.eclipse.mylyn.releng/multipass/inventory.yml b/org.eclipse.mylyn.releng/multipass/inventory.yml index ddac86cd96..de01a8c20b 100644 --- a/org.eclipse.mylyn.releng/multipass/inventory.yml +++ b/org.eclipse.mylyn.releng/multipass/inventory.yml @@ -15,7 +15,8 @@ all: multipass_disk: 30G multipass_memory: 10G multipass_cpus: 4 -# only needed when you want to share your instance to other devices in Network or Internet +# only needed when you want to share your instance to other devices in Network or Internet +# en0 is valid for for mac os with apple silicon additional_launch_parms: '--network=en0' mylyn_swarm_worker: hosts: @@ -38,7 +39,7 @@ all: ansible_user: ubuntu ansible_ssh_common_args: "-o StrictHostKeyChecking=no -o ControlMaster=no -o ControlPath=none" ansible_ssh_private_key_file: first_setup/ubuntu_key - default_etc_hosts: "mylynmstr01 mylyn.local traefik.mylyn.local jenkins.mylyn.local hello.mylyn.local artifactory.mylyn.local gitlab.mylyn.local" + default_etc_hosts: "mylynmstr01 mylyn.local traefik.mylyn.local jenkins.mylyn.local artifactory.mylyn.local gitlab.mylyn.local" mylynwrk01: ansible_connection: ssh ansible_host: "192.168.64.4" diff --git a/org.eclipse.mylyn.releng/multipass/mylyn_setup.yml b/org.eclipse.mylyn.releng/multipass/mylyn_setup.yml index 6ba2d77269..29b4b61739 100644 --- a/org.eclipse.mylyn.releng/multipass/mylyn_setup.yml +++ b/org.eclipse.mylyn.releng/multipass/mylyn_setup.yml @@ -3,6 +3,11 @@ # - hosts: localhost gather_facts: true + pre_tasks: + - include_vars: + dir: mylyn_vars + extensions: + - json tasks: - name: include global mode ansible.builtin.include_tasks: @@ -16,8 +21,13 @@ # # start all non admin Docker Nodes # -- hosts: "{{ hostvars['localhost'].setup_noadmin_vm_list }}" +- hosts: "{{ hostvars['localhost'].mylyn_noadmin_vm_hosts }}" gather_facts: true + pre_tasks: + - include_vars: + dir: mylyn_vars + extensions: + - json vars: rootca_name: "{{ hostvars['localhost'].rootca_server_name }}" tasks: @@ -29,14 +39,22 @@ - name: debug distribution debug: msg: "{{ ansible_facts['distribution'] +'/' + ansible_facts['architecture'] + ' on ' + hostvars['localhost'].localhostPlatform }}" + - name: debug mylyn_service_domain + debug: + msg: "{{ hostvars['localhost'].mylyn_service_domain }}" # # 1) install Docker Swarm Leader (if needed) # 2) stop all Docker Services / Container # -- hosts: "{{ hostvars['localhost'].prim_install_server_name }}" +- hosts: "{{ hostvars['localhost'].mylyn_service_vm_name }}" gather_facts: false + pre_tasks: + - include_vars: + dir: mylyn_vars + extensions: + - json vars: - swarm_master_name: "{{ hostvars['localhost'].prim_install_server_name }}" + swarm_master_name: "{{ hostvars['localhost'].mylyn_service_vm_name }}" roles: - role: swarm_delete when: ((hostvars['localhost'].docker_swarm_recreate | bool == true) or (hostvars['localhost'].docker_mode_global == "container")) @@ -51,8 +69,13 @@ # # cleanup all docker instances # -- hosts: "{{ hostvars['localhost'].setup_noadmin_vm_list }}" +- hosts: "{{ hostvars['localhost'].mylyn_noadmin_vm_hosts }}" gather_facts: true + pre_tasks: + - include_vars: + dir: mylyn_vars + extensions: + - json vars: rootca_name: "{{ hostvars['localhost'].rootca_server_name }}" roles: @@ -63,7 +86,7 @@ # Services installieren # install Docker Services / Container # -- hosts: "{{ hostvars['localhost'].prim_install_server_name }}" +- hosts: "{{ hostvars['localhost'].mylyn_service_vm_name }}" gather_facts: false pre_tasks: - include_vars: @@ -71,36 +94,33 @@ extensions: - json vars: - swarm_master_name: "{{ hostvars['localhost'].prim_install_server_name }}" + swarm_master_name: "{{ hostvars['localhost'].mylyn_service_vm_name }}" docker_mode: "{{ hostvars['localhost'].docker_mode_global }}" roles: - role: traeefik vars: - common_domain_name: "{{ hostvars['localhost'].local_domain }}" + common_domain_name: "{{ hostvars['localhost'].mylyn_service_domain }}" - role: socket-proxy - role: mylyn_idx vars: - common_domain_name: "{{ hostvars['localhost'].local_domain }}" - remote_domain_name: "{{ hostvars['localhost'].remote_domain }}" + common_domain_name: "{{ hostvars['localhost'].mylyn_service_domain }}" - role: artifactory tags: - artifactory vars: - common_domain_name: "{{ hostvars['localhost'].local_domain }}" -# remote_domain_name: "{{ hostvars['localhost'].remote_domain }}" + common_domain_name: "{{ hostvars['localhost'].mylyn_service_domain }}" - role: gitlab tags: - gitlab vars: - common_domain_name: "{{ hostvars['localhost'].local_domain }}" + common_domain_name: "{{ hostvars['localhost'].mylyn_service_domain }}" gitlabImageVersion: "16.11.1" - gitlabHostURL: "gitlab.{{ hostvars['localhost'].local_domain }}" + gitlabHostURL: "gitlab.{{ hostvars['localhost'].mylyn_service_domain }}" - role: jenkins tags: - jenkins vars: - common_domain_name: "{{ hostvars['localhost'].local_domain }}" - remote_domain_name: "{{ hostvars['localhost'].remote_domain }}" + common_domain_name: "{{ hostvars['localhost'].mylyn_service_domain }}" jenkins_instances: # - { servmame: "jenkins-2_303_3", port1: 8081, port2: 50001, data_dir: "jenkins-2.303.3", image_tag: "jenkins/jenkins:2.303.3-lts-jdk11", extra_info: '' } # - { servmame: "jenkins-1_651_1", port1: 8084, port2: 50004, data_dir: "jenkins-2.303.3", image_tag: "jenkins:1.651.1", extra_info: '"' } @@ -110,13 +130,12 @@ tags: - bugzilla vars: - common_domain_name: "{{ hostvars['localhost'].local_domain }}" - remote_domain_name: "{{ hostvars['localhost'].remote_domain }}" + common_domain_name: "{{ hostvars['localhost'].mylyn_service_domain }}" bugzilla_instances: - { git_branch: "release-4.4.13", servmame: "bugzilla-4_4", port1: 8090, port2: 8490, image_tag: "4.4", extra_info: '"default": "true"' } # - { git_branch: "release-4.4.13", servmame: "bugzilla-4_4-custom-wf", port1: 8091, port2: 8491, image_tag: "4.4-custom_wf", extra_info: '"custom_wf":"true"' } # - { git_branch: "release-4.4.13", servmame: "bugzilla-4_4-custom-wf-and-status", port1: 8092, port2: 8492, image_tag: "4.4-custom_wf_a_s", extra_info: '"custom_wf_and_status":"true"' } # - { git_branch: "release-4.4.13", servmame: "bugzilla-4_4-bugaliases", port1: 8093, port2: 8493, image_tag: "4.4-bugaliases", extra_info: '"use_bug_alias":"true"' } # - { git_branch: "5.2", servmame: "bugzilla-5_2", port1: 8094, port2: 8494, image_tag: "5.2", extra_info: '' } -# - { git_branch: "5.2", servmame: "bugzilla-5_2-rest", port1: 8095, port2: 8495, image_tag: "5.2-rest", extra_info: '"rest_enabled":"true", "default": "true", "testdataVersion": "Version1"' } -# - { git_branch: "5.2", servmame: "bugzilla-5_2-rest-api", port1: 8096, port2: 8496, image_tag: "5.2-rest-api", extra_info: '"rest_enabled": "true", "api_key_enabled": "true", "testdataVersion": "Version1"' } + - { git_branch: "5.2", servmame: "bugzilla-5_2-rest", port1: 8095, port2: 8495, image_tag: "5.2-rest", extra_info: '"rest_enabled":"true", "default": "true", "testdataVersion": "Version1"' } + - { git_branch: "5.2", servmame: "bugzilla-5_2-rest-api", port1: 8096, port2: 8496, image_tag: "5.2-rest-api", extra_info: '"rest_enabled": "true", "api_key_enabled": "true", "testdataVersion": "Version1"' } diff --git a/org.eclipse.mylyn.releng/multipass/roles/artifactory/files/system.yaml b/org.eclipse.mylyn.releng/multipass/roles/artifactory/files/system.yaml new file mode 100644 index 0000000000..e9dde23c5f --- /dev/null +++ b/org.eclipse.mylyn.releng/multipass/roles/artifactory/files/system.yaml @@ -0,0 +1,66 @@ +## @formatter:off +## JFROG ARTIFACTORY SYSTEM CONFIGURATION FILE +## HOW TO USE: comment-out any field and keep the correct yaml indentation by deleting only the leading '#' character. +configVersion: 1 +## NOTE: JFROG_HOME is a place holder for the JFrog root directory containing the deployed product, the home directory for all JFrog products. +## Replace JFROG_HOME with the real path! For example, in RPM install, JFROG_HOME=/opt/jfrog + +## NOTE: Sensitive information such as passwords and join key are encrypted on first read. +## NOTE: The provided commented key and value is the default. + +## SHARED CONFIGURATIONS +## A shared section for keys across all services in this config +shared: + ## Java 17 distribution to use + #javaHome: "JFROG_HOME/artifactory/app/third-party/java" + + ## Extra Java options to pass to the JVM. These values add to or override the defaults. + #extraJavaOpts: "-Xms512m -Xmx2g" + + ## Security Configuration + security: + ## Join key value for joining the cluster (takes precedence over 'joinKeyFile') + # joinKey: "" + + ## Join key file location + # joinKeyFile: "" + + ## Master key file location + ## Generated by the product on first startup if not provided + # masterKeyFile: "" + + ## Maximum time to wait for key files (master.key and join.key) + # bootstrapKeysReadTimeoutSecs: 120 + # + ## Node Settings + node: + ## A unique id to identify this node. + ## Default auto generated at startup. + # id: "art1" + + ## Default auto resolved by startup script + # ip: + + ## Sets this node as primary in HA installation + # primary: true + + ## Sets this node as part of HA installation + # haEnabled: true + + ## Database Configuration + database: + ## To run Artifactory with any database other than PostgreSQL allowNonPostgresql set to true. + allowNonPostgresql: true + ## One of mysql, oracle, mssql, postgresql, mariadb + ## Default Embedded derby + + ## Example for postgresql + # type: postgresql + # driver: org.postgresql.Driver + # url: "jdbc:postgresql:///artifactory" + # username: artifactory + # password: password +access: + +## Extra Java options to pass to the JVM. These values add to or override the defaults. +#extraJavaOpts: "-XX:InitialRAMPercentage=20 -XX:MaxRAMPercentage=25" diff --git a/org.eclipse.mylyn.releng/multipass/roles/artifactory/tasks/create_data_volume.yml b/org.eclipse.mylyn.releng/multipass/roles/artifactory/tasks/create_data_volume.yml index b031d69256..1b927df3f1 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/artifactory/tasks/create_data_volume.yml +++ b/org.eclipse.mylyn.releng/multipass/roles/artifactory/tasks/create_data_volume.yml @@ -2,3 +2,30 @@ community.docker.docker_volume: name: "{{ role_name }}-data-volume" state: present +- name: mkdir + ansible.builtin.shell: | + docker run -d -v "{{ role_name }}-data-volume:/var/opt/jfrog/artifactory" --name artifactory_tmp busybox:latest sh -c 'mkdir -p /var/opt/jfrog/artifactory/etc/ && chown -R 1030:1030 /var/opt/jfrog/artifactory && ls -al /var/opt/jfrog/artifactory/etc && tail -f /dev/null' + register: version +- name: print version + debug: + msg: "{{ version.stdout }}" +- name: Copy file into existing container + ansible.builtin.shell: docker cp /mylyn-config-dir/{{ role_name }}/system.yaml artifactory_tmp:/var/opt/jfrog/artifactory/etc/system.yaml +- name: verify + ansible.builtin.shell: | + docker exec artifactory_tmp ls -al /var/opt/jfrog/artifactory/etc/ + docker exec artifactory_tmp cat /var/opt/jfrog/artifactory/etc/system.yaml + register: verify +- name: print verify + debug: + msg: "{{ verify.stdout }}" +- name: chmod + ansible.builtin.shell: | + docker exec artifactory_tmp sh -c 'chown -R 1030:1030 /var/opt/jfrog/artifactory && ls -al /var/opt/jfrog/artifactory/etc' + +- name: stop tmp container + ansible.builtin.shell: | + docker stop artifactory_tmp +- name: rm tmp container + ansible.builtin.shell: | + docker rm artifactory_tmp \ No newline at end of file diff --git a/org.eclipse.mylyn.releng/multipass/roles/artifactory/tasks/main.yml b/org.eclipse.mylyn.releng/multipass/roles/artifactory/tasks/main.yml index b219dd3721..68457b62bf 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/artifactory/tasks/main.yml +++ b/org.eclipse.mylyn.releng/multipass/roles/artifactory/tasks/main.yml @@ -10,14 +10,39 @@ - name: print buildout3 debug: msg: "{{ docker_data_info_volumes.volumes | length }}" +- name: Recursively remove directory + ansible.builtin.file: + path: "{{ item }}" + state: absent + become: true + loop: + - /mylyn-config-dir/{{ role_name }} + - /mylyn-runtime-dir/{{ role_name }} -- name: include jobs-volume +- name: Creates directory + ansible.builtin.file: + path: "{{ item }}" + state: directory + owner: ubuntu + group: ubuntu + mode: '0755' + loop: + - /mylyn-config-dir/{{ role_name }} + - /mylyn-runtime-dir/{{ role_name }} + +- name: "Copy latest file(s)" + synchronize: + delete: yes + src: files/ + dest: /mylyn-config-dir/{{ role_name }}/ + recursive: yes + + +- name: include data-volume ansible.builtin.include_tasks: file: create_data_volume.yml when: (docker_data_info_volumes.volumes is defined) and (docker_data_info_volumes.volumes | length==0) - - - name: setlabels ansible.builtin.set_fact: label_data: | diff --git a/org.eclipse.mylyn.releng/multipass/roles/bugzilla/tasks/build_start.yml b/org.eclipse.mylyn.releng/multipass/roles/bugzilla/tasks/build_start.yml index 665eae60b2..d21f94a480 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/bugzilla/tasks/build_start.yml +++ b/org.eclipse.mylyn.releng/multipass/roles/bugzilla/tasks/build_start.yml @@ -44,15 +44,19 @@ - set_fact: bugzilla_info: "{{bugzilla_info_array | join(', ') | to_yaml }}" extra_info_label: "{{ (',' + act_item.extra_info) if (act_item.extra_info | length > 0 ) else ''}}" + label_service_ip: "{{mylyn_network_ip if mylyn_network_ip is defined else ansible_ssh_host }}" - name: bugzilla_info {{ act_item.image_tag }} debug: var: bugzilla_info - name: extra_info_label {{ act_item.image_tag }} debug: var: extra_info_label +- name: label_service_ip {{ act_item.image_tag }} + debug: + var: label_service_ip - name: myServiceLabel {{ act_item.image_tag }} set_fact: - serviceLabel: '{"type":"{{ bugzilla_type }}","url":"/{{ act_item.servmame }}/", "version": "{{ bugzilla_version.stdout }}", "info": "{{ bugzilla_info }}", "properties": { "host-name": "{{ remote_domain_name }}", "remote_ip": "{{ inst_network_ip }}", "ansible-name": "{{ inventory_hostname }}", "ansible-host-ip": "{{ansible_ssh_host}}", "docker": "true" {{ extra_info_label }} } }' + serviceLabel: '{"type":"{{ bugzilla_type }}","url":"/{{ act_item.servmame }}/", "version": "{{ bugzilla_version.stdout }}", "info": "{{ bugzilla_info }}", "properties": { "host-name": "{{ common_domain_name }}", "remote_ip": "{{ label_service_ip }}", "ansible-name": "{{ inventory_hostname }}", "ansible-host-ip": "{{ansible_ssh_host}}", "docker": "true" {{ extra_info_label }} } }' - name: debug1 {{ act_item.image_tag }} debug: var: serviceLabel @@ -63,7 +67,7 @@ label_data: | { traefik.enable: "true" , traefik.docker.network: mylyn_net , - traefik.http.routers.{{ act_item.servmame }}_https.rule: "(Host(`{{ common_domain_name }}`) || Host(`{{ remote_domain_name }}`)) && PathPrefix(`/{{ act_item.servmame }}`)" , + traefik.http.routers.{{ act_item.servmame }}_https.rule: "Host(`{{ common_domain_name }}`) && PathPrefix(`/{{ act_item.servmame }}`)" , traefik.http.routers.{{ act_item.servmame }}_https.entrypoints: websecure , traefik.http.routers.{{ act_item.servmame }}_https.tls: "true" , traefik.http.routers.{{ act_item.servmame }}_https.middlewares: stripprefix_{{ act_item.servmame }} , @@ -92,9 +96,9 @@ # - published_port: "{{ act_item.port1 }}" # target_port: "{{ act_item.port1 }}" env: - BASE_URL: "{{ remote_domain_name }}" + BASE_URL: "{{ common_domain_name }}" BUG_SERVICE_NAME: "{{ act_item.servmame}}" - CERT_FILE_NAME: "mylynmstr01" + CERT_FILE_NAME: "{{ mylyn_service_vm_name }}" mounts: - source: "/mylyn-config-dir/certs" target: "/certificates" @@ -126,9 +130,9 @@ restart: true restart_policy: "unless-stopped" env: - BASE_URL: "{{ remote_domain_name }}" + BASE_URL: "{{ common_domain_name }}" BUG_SERVICE_NAME: "{{ act_item.servmame}}" - CERT_FILE_NAME: "mylynmstr01" + CERT_FILE_NAME: "{{ mylyn_service_vm_name }}" volumes: - "/mylyn-config-dir/certs:/certificates" labels: "{{ label_data | from_yaml }}" diff --git a/org.eclipse.mylyn.releng/multipass/roles/crtcertificate/tasks/main.yml b/org.eclipse.mylyn.releng/multipass/roles/crtcertificate/tasks/main.yml index 170c69c400..4254937891 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/crtcertificate/tasks/main.yml +++ b/org.eclipse.mylyn.releng/multipass/roles/crtcertificate/tasks/main.yml @@ -8,13 +8,6 @@ src: ./first_setup/ubuntu_key.pub dest: .ssh/id_rsa.pub -# - name: add to known_hosts -# become: true -# become_user: root -# ansible.builtin.shell: "ssh-keyscan -H {{ item.name }} >> /home/ubuntu/.ssh/known_hosts" -# loop: "{{ hostvars['localhost'].setup_lst }}" -# run_once: true -# - name: delete ca_path exists become: true ansible.builtin.file: diff --git a/org.eclipse.mylyn.releng/multipass/roles/gitlab/tasks/main.yml b/org.eclipse.mylyn.releng/multipass/roles/gitlab/tasks/main.yml index 88f85fa973..27766b037a 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/gitlab/tasks/main.yml +++ b/org.eclipse.mylyn.releng/multipass/roles/gitlab/tasks/main.yml @@ -29,9 +29,13 @@ - /mylyn-config-dir/{{ role_name }} - /mylyn-runtime-dir/{{ role_name }} +- name: tmp_label + set_fact: + label_service_ip: "{{mylyn_network_ip if mylyn_network_ip is defined else ansible_ssh_host }}" + - name: myServiceLabel set_fact: - serviceLabel: '{"type":"gitlab","url":"https://{{ gitlabHostURL }}","version":"{{gitlabImageVersion}}","info":"","properties":{"host-name":"{{ gitlabHostURL }}","remote_ip": "{{ inst_network_ip }}","ansible-host-ip":"{{ansible_ssh_host}}","ansible-name":"{{ inventory_hostname }}","docker":"true","default":"true"} }' + serviceLabel: '{"type":"gitlab","url":"https://{{ gitlabHostURL }}","version":"{{gitlabImageVersion}}","info":"","properties":{"host-name":"{{ gitlabHostURL }}","remote_ip": "{{ label_service_ip }}","ansible-host-ip":"{{ansible_ssh_host}}","ansible-name":"{{ inventory_hostname }}","docker":"true","default":"true"} }' - name: setlabels registry ansible.builtin.set_fact: diff --git a/org.eclipse.mylyn.releng/multipass/roles/jenkins/tasks/build_start.yml b/org.eclipse.mylyn.releng/multipass/roles/jenkins/tasks/build_start.yml index 82edb43b88..3d536756db 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/jenkins/tasks/build_start.yml +++ b/org.eclipse.mylyn.releng/multipass/roles/jenkins/tasks/build_start.yml @@ -32,6 +32,7 @@ - name: myServiceInfo {{ act_item.image_tag }} set_fact: extra_info_entries: "{{ ('{' + act_item.extra_info + '}') | from_yaml }} " + label_service_ip: "{{mylyn_network_ip if mylyn_network_ip is defined else ansible_ssh_host }}" - set_fact: jenkins_type: "{{ 'localTest' if ('local_test_service' in extra_info_entries and extra_info_entries['local_test_service'] | bool == true) else 'jenkins' }}" - name: extra_info_label @@ -39,14 +40,14 @@ extra_info_label: "{{ (',' + act_item.extra_info) if (act_item.extra_info | length > 0 ) else ''}}" - name: myServiceLabel set_fact: - serviceLabel: '{"type":"{{ jenkins_type }}","url":"/{{act_item.servmame}}/", "version": "{{version.stdout}}", "info": "", "properties": { "host-name": "{{ remote_domain_name }}", "remote_ip": "{{ inst_network_ip }}", "ansible-host-ip": "{{ansible_ssh_host}}", "ansible-name": "{{ inventory_hostname }}", "docker": "true" {{ extra_info_label }} } }' + serviceLabel: '{"type":"{{ jenkins_type }}","url":"/{{act_item.servmame}}/", "version": "{{version.stdout}}", "info": "", "properties": { "host-name": "{{ common_domain_name }}", "remote_ip": "{{ label_service_ip }}", "ansible-host-ip": "{{ansible_ssh_host}}", "ansible-name": "{{ inventory_hostname }}", "docker": "true" {{ extra_info_label }} } }' - name: setlabels {{ act_item.image_tag }} ansible.builtin.set_fact: label_data: | { traefik.enable: "true" , traefik.docker.network: mylyn_net , - traefik.http.routers.{{ act_item.servmame }}_https.rule: "(Host(`{{ common_domain_name }}`) || Host(`{{ remote_domain_name }}`)) && PathPrefix(`/{{ act_item.servmame }}`)" , + traefik.http.routers.{{ act_item.servmame }}_https.rule: "Host(`{{ common_domain_name }}`) && PathPrefix(`/{{ act_item.servmame }}`)" , traefik.http.routers.{{ act_item.servmame }}_https.entrypoints: websecure , traefik.http.routers.{{ act_item.servmame }}_https.tls: "true" , traefik.http.routers.{{ act_item.servmame }}_https.service: {{ act_item.servmame }} , diff --git a/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm/tasks/main.yml b/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm/tasks/main.yml index 25de47b58e..db5c8044a7 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm/tasks/main.yml +++ b/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm/tasks/main.yml @@ -3,7 +3,7 @@ ansible.builtin.include_tasks: file: multipass_list.yml - debug: var=inst_list verbosity=3 -- debug: var=setup_lst verbosity=3 +- debug: var=mylyn_vm_hosts verbosity=3 - name: ensure first_setup exists ansible.builtin.file: @@ -28,9 +28,9 @@ - {{ user_data }} - name: create if needed - shell: multipass launch -n {{ item.name }} --disk {{ item.disk }} --mem {{ item.memory }} --cpus {{ item.cpus }} {{ item.launch_extra }} --cloud-init first_setup/cloud-init.yaml + shell: multipass launch -n {{ item.name }} --disk {{ item.disk }} --memory {{ item.memory }} --cpus {{ item.cpus }} {{ item.launch_extra }} --cloud-init first_setup/cloud-init.yaml when: item.name not in inst_list | map(attribute='inst_name') - with_items: "{{ setup_lst }}" + with_items: "{{ mylyn_vm_hosts }}" - name: new list ansible.builtin.include_tasks: file: multipass_list.yml @@ -43,7 +43,7 @@ when: > item.name in inst_list | map(attribute='inst_name') and (inst_list | selectattr("inst_name", "equalto", item.name))| map(attribute='ip_adr4') != [item.ip4 ] - with_items: "{{ setup_lst }}" + with_items: "{{ mylyn_vm_hosts }}" - name: debug ip_2_change debug: var=ip_2_change verbosity=3 when: ip_2_change is defined @@ -61,17 +61,27 @@ become_user: root ansible.builtin.lineinfile: path: /etc/hosts - regexp: "{{'^.*'+ item.aname +'.*' }}" + regexp: "{{'^.*'+ item.name +'.*' }}" state: absent - with_items: "{{ ip_2_change }}" - when: ip_2_change is defined + with_items: "{{ mylyn_vm_hosts }}" + -- name: add mylyn vm to etc hosts} +- name: add mylyn non service vm to etc hosts become: true become_user: root ansible.builtin.lineinfile: path: /etc/hosts - line: "{{ item.mip + ' ' + hostvars[item.aname].default_etc_hosts }}" + line: "{{ item.ip4 + ' ' + hostvars[item.name].default_etc_hosts }}" state: present - with_items: "{{ ip_2_change }}" - when: ip_2_change is defined + with_items: "{{ mylyn_vm_hosts }}" + when: item.name != mylyn_service_vm_name + +- name: add mylyn service vm to etc hosts + become: true + become_user: root + ansible.builtin.lineinfile: + path: /etc/hosts + line: "{{ mylyn_network_ip + ' ' + hostvars[item.name].default_etc_hosts }}" + state: present + with_items: "{{ mylyn_vm_hosts }}" + when: item.name == mylyn_service_vm_name \ No newline at end of file diff --git a/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm/tasks/multipass_list.yml b/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm/tasks/multipass_list.yml index 365521fa78..6670ca157b 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm/tasks/multipass_list.yml +++ b/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm/tasks/multipass_list.yml @@ -16,9 +16,9 @@ ansible.builtin.set_fact: inst_ipadr_list: "{{ inst_json_obj.list | json_query(jmesquery) | list() }}" vars: - jmesquery: "[?name=='mylynmstr01'].ipv4" -- name: inst_network_ip + jmesquery: "[?name== '{{mylyn_service_vm_name}}'].ipv4" +- name: mylyn_network_ip ansible.builtin.set_fact: - inst_network_ip: "{{ item }}" + mylyn_network_ip: "{{ item }}" when: item is regex(network_ip_matcher) with_items: "{{ inst_ipadr_list}}" \ No newline at end of file diff --git a/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm_setup/tasks/main.yml b/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm_setup/tasks/main.yml index d875769983..e61b320b11 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm_setup/tasks/main.yml +++ b/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm_setup/tasks/main.yml @@ -2,6 +2,6 @@ - name: inital list ansible.builtin.include_tasks: file: test_and_update_remote_host_etc.yml - with_items: "{{ setup_lst }}" + with_items: "{{ mylyn_vm_hosts }}" loop_control: loop_var: act_name \ No newline at end of file diff --git a/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm_setup/tasks/test_and_update_remote_host_etc.yml b/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm_setup/tasks/test_and_update_remote_host_etc.yml index 1a7997b239..a0241c3957 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm_setup/tasks/test_and_update_remote_host_etc.yml +++ b/org.eclipse.mylyn.releng/multipass/roles/multipass_create_vm_setup/tasks/test_and_update_remote_host_etc.yml @@ -1,5 +1,5 @@ --- -- name: remove etc hosts if not included {{ act_name.name }} +- name: remove mylyn from etc hosts {{ act_name.name }} become: true become_user: root ansible.builtin.lineinfile: @@ -8,21 +8,12 @@ state: absent delegate_to: "{{ act_name.name }}" -- name: add etc hosts if not included {{ act_name.name }} - become: true - become_user: root - ansible.builtin.lineinfile: - path: /etc/hosts - line: "{{inst_network_ip + ' ' + hostvars['mylynmstr01'].default_etc_hosts }}" - state: present - delegate_to: "{{ act_name.name }}" -- name: add etc hosts if not included {{ act_name.name }} +- name: add mylyn to etc hosts if not included {{ act_name.name }} become: true become_user: root ansible.builtin.lineinfile: path: /etc/hosts line: "{{ item.ip4 + ' ' + hostvars[item.name].default_etc_hosts }}" insertafter: EOF - when: item.name != 'mylynmstr01' - loop: "{{ setup_lst }}" + loop: "{{ mylyn_vm_hosts }}" delegate_to: "{{ act_name.name }}" diff --git a/org.eclipse.mylyn.releng/multipass/roles/mylyn_idx/tasks/main.yml b/org.eclipse.mylyn.releng/multipass/roles/mylyn_idx/tasks/main.yml index 01fc88e4cc..f6adf1663b 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/mylyn_idx/tasks/main.yml +++ b/org.eclipse.mylyn.releng/multipass/roles/mylyn_idx/tasks/main.yml @@ -30,7 +30,7 @@ label_data: { traefik.enable: "true", traefik.docker.network: "mylyn_net", - traefik.http.routers.mylyn_idx_https.rule: "(Host(`{{ common_domain_name }}`) || Host(`{{ remote_domain_name }}`)) && PathPrefix(`/mylyn_idx`)", + traefik.http.routers.mylyn_idx_https.rule: "Host(`{{ common_domain_name }}`) && PathPrefix(`/mylyn_idx`)", traefik.http.routers.mylyn_idx_https.entrypoints: "websecure", traefik.http.routers.mylyn_idx_https.tls: "true", traefik.http.routers.mylyn_idx_https.service: "mylyn_idx", From 83013d3ea7ebbb3208206ef31ecc4e8826064e14 Mon Sep 17 00:00:00 2001 From: Frank Becker Date: Sun, 4 Aug 2024 21:40:03 +0200 Subject: [PATCH 3/5] fix: correct some small bugzilla 5.x setup problems --- .../commons/sdk/util/CommonTestUtil.java | 8 +++++++ .../roles/bugzilla/files/versions/Dockerfile | 1 + .../bugzilla/files/versions/src/.gitignore | 1 + .../bugzilla/files/versions/src/answersV5.2 | 21 +++++++++++++++++++ .../src/{answers => answersVrelease-4.4.13} | 0 5 files changed, 31 insertions(+) create mode 100644 org.eclipse.mylyn.releng/multipass/roles/bugzilla/files/versions/src/.gitignore create mode 100644 org.eclipse.mylyn.releng/multipass/roles/bugzilla/files/versions/src/answersV5.2 rename org.eclipse.mylyn.releng/multipass/roles/bugzilla/files/versions/src/{answers => answersVrelease-4.4.13} (100%) diff --git a/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/CommonTestUtil.java b/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/CommonTestUtil.java index 6047cdc18d..d1eece6d23 100644 --- a/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/CommonTestUtil.java +++ b/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/CommonTestUtil.java @@ -362,6 +362,14 @@ public static boolean runHeartbeatTestsOnly() { return !Boolean.getBoolean("org.eclipse.mylyn.tests.all"); } + /** + * Returns whether to run a limited suite of tests. Returns true, unless a system property has been set to force running of all network + * tests (using CI Server). + */ + public static boolean runNonCIServerTestsOnly() { + return !Boolean.getBoolean("org.eclipse.mylyn.ci.server.tests"); + } + /** * Unzips the given zip file to the given destination directory extracting only those entries the pass through the given filter. * diff --git a/org.eclipse.mylyn.releng/multipass/roles/bugzilla/files/versions/Dockerfile b/org.eclipse.mylyn.releng/multipass/roles/bugzilla/files/versions/Dockerfile index 58d9d7d1e3..e23198a315 100644 --- a/org.eclipse.mylyn.releng/multipass/roles/bugzilla/files/versions/Dockerfile +++ b/org.eclipse.mylyn.releng/multipass/roles/bugzilla/files/versions/Dockerfile @@ -13,6 +13,7 @@ ADD src /opt/ # Run build script RUN echo GIT_BRANCH_TAG=$GIT_BRANCH_TAG EXTRAINFO=$EXTRAINFO +RUN mv /opt/answersV$GIT_BRANCH_TAG /opt/answers RUN /opt/build.sh GIT_BRANCH_TAG=$GIT_BRANCH_TAG EXTRAINFO="$EXTRAINFO" # Run start script diff --git a/org.eclipse.mylyn.releng/multipass/roles/bugzilla/files/versions/src/.gitignore b/org.eclipse.mylyn.releng/multipass/roles/bugzilla/files/versions/src/.gitignore new file mode 100644 index 0000000000..03765b3591 --- /dev/null +++ b/org.eclipse.mylyn.releng/multipass/roles/bugzilla/files/versions/src/.gitignore @@ -0,0 +1 @@ +/answers diff --git a/org.eclipse.mylyn.releng/multipass/roles/bugzilla/files/versions/src/answersV5.2 b/org.eclipse.mylyn.releng/multipass/roles/bugzilla/files/versions/src/answersV5.2 new file mode 100644 index 0000000000..d54ccc494e --- /dev/null +++ b/org.eclipse.mylyn.releng/multipass/roles/bugzilla/files/versions/src/answersV5.2 @@ -0,0 +1,21 @@ +$answer{'webservergroup'} = 'www-data'; +$answer{'db_host'} = 'localhost'; +$answer{'db_driver'} = 'mariadb'; +$answer{'db_port'} = 0; +$answer{'db_name'} = 'bugzilla'; +$answer{'db_user'} = 'bugs'; +$answer{'db_pass'} = 'ovlwq8'; +$answer{'ADMIN_OK'} = 'Y'; +$answer{'ADMIN_LOGIN'} = 'admin@mylyn.eclipse.org'; +$answer{'ADMIN_EMAIL'} = 'admin@mylyn.eclipse.org'; +$answer{'ADMIN_PASSWORD'} = 'main4Afo'; +$answer{'ADMIN_REALNAME'} = 'Mylyn Admin'; +$answer{'SMTP_SERVER'} = ''; +$answer{'usetargetmilestone'} = '1'; +$answer{'mail_delivery_method'} = 'None'; +$answer{'useqacontact'} = '1'; +$answer{'usestatuswhiteboard'} = '1'; +$answer{'maintainer'} = 'admin@mylyn.eclipse.org'; +$answer{'insidergroup'} = 'bz_canusewhineatothers'; +$answer{'use_email_as_login'} = '1'; +$answer{'NO_PAUSE'} = 1; diff --git a/org.eclipse.mylyn.releng/multipass/roles/bugzilla/files/versions/src/answers b/org.eclipse.mylyn.releng/multipass/roles/bugzilla/files/versions/src/answersVrelease-4.4.13 similarity index 100% rename from org.eclipse.mylyn.releng/multipass/roles/bugzilla/files/versions/src/answers rename to org.eclipse.mylyn.releng/multipass/roles/bugzilla/files/versions/src/answersVrelease-4.4.13 From ad5b9fc8ecb93c6b4623ac730437eeec2bba442f Mon Sep 17 00:00:00 2001 From: Frank Becker Date: Wed, 7 Aug 2024 20:53:50 +0200 Subject: [PATCH 4/5] reenable Bugzilla Rest Connnector Tests (#590) --- .../commons/sdk/util/CommonTestUtil.java | 4 +- .../sdk/util/ConditionalIgnoreRule.java | 2 +- .../sdk/util/MustRunOnCIServerRule.java | 23 +++++++++ .../local-All-BugzillaRestCoreTests.launch | 12 ++--- .../core/tests/BugzillaRestClientTest.java | 51 ++++++++++++++++--- .../tests/BugzillaRestConfigurationTest.java | 22 ++++++-- .../core/tests/BugzillaRestConnectorTest.java | 23 +++++++-- .../tests/BugzillaRestFlagMapperTest.java | 13 +++-- .../rest/core/tests/MustRunOnApikeyRule.java | 3 +- .../testdata/Version1/configuration.json | 2 +- .../multipass/inventory.yml | 2 +- 11 files changed, 122 insertions(+), 35 deletions(-) create mode 100644 mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/MustRunOnCIServerRule.java diff --git a/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/CommonTestUtil.java b/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/CommonTestUtil.java index d1eece6d23..b2813417e8 100644 --- a/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/CommonTestUtil.java +++ b/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/CommonTestUtil.java @@ -366,8 +366,8 @@ public static boolean runHeartbeatTestsOnly() { * Returns whether to run a limited suite of tests. Returns true, unless a system property has been set to force running of all network * tests (using CI Server). */ - public static boolean runNonCIServerTestsOnly() { - return !Boolean.getBoolean("org.eclipse.mylyn.ci.server.tests"); + public static boolean runOnCIServerTestsOnly() { + return Boolean.getBoolean("org.eclipse.mylyn.ci.server.tests"); } /** diff --git a/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/ConditionalIgnoreRule.java b/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/ConditionalIgnoreRule.java index 65ae8a215c..96bfe3dfc3 100644 --- a/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/ConditionalIgnoreRule.java +++ b/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/ConditionalIgnoreRule.java @@ -91,7 +91,7 @@ IgnoreCondition create() { private IgnoreCondition createCondition() throws Exception { IgnoreCondition result; if (isConditionTypeStandalone()) { - result = conditionType.newInstance(); + result = conditionType.getDeclaredConstructor().newInstance(); } else { result = conditionType.getDeclaredConstructor(testClass).newInstance(testClass); } diff --git a/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/MustRunOnCIServerRule.java b/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/MustRunOnCIServerRule.java new file mode 100644 index 0000000000..0acba5c706 --- /dev/null +++ b/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/MustRunOnCIServerRule.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright (c) 2024 Frank Becker and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * https://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Frank Becker - initial API and implementation + *******************************************************************************/ + +package org.eclipse.mylyn.commons.sdk.util; + +public class MustRunOnCIServerRule implements ConditionalIgnoreRule.IgnoreCondition { + + @Override + public boolean isSatisfied(AbstractTestFixture fixture) { + return !CommonTestUtil.runOnCIServerTestsOnly(); + } + +} \ No newline at end of file diff --git a/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/config/local-All-BugzillaRestCoreTests.launch b/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/config/local-All-BugzillaRestCoreTests.launch index 0ccc80687c..31d355ef05 100644 --- a/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/config/local-All-BugzillaRestCoreTests.launch +++ b/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/config/local-All-BugzillaRestCoreTests.launch @@ -15,24 +15,24 @@ - + - + - + - - + + - + diff --git a/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/BugzillaRestClientTest.java b/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/BugzillaRestClientTest.java index 4b1dbf0408..04ad92ea81 100644 --- a/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/BugzillaRestClientTest.java +++ b/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/BugzillaRestClientTest.java @@ -53,6 +53,7 @@ import org.eclipse.mylyn.commons.sdk.util.IFixtureJUnitClass; import org.eclipse.mylyn.commons.sdk.util.Junit4TestFixtureRunner; import org.eclipse.mylyn.commons.sdk.util.Junit4TestFixtureRunner.FixtureDefinition; +import org.eclipse.mylyn.commons.sdk.util.MustRunOnCIServerRule; import org.eclipse.mylyn.internal.bugzilla.rest.core.BugzillaRestAttachmentMapper; import org.eclipse.mylyn.internal.bugzilla.rest.core.BugzillaRestClient; import org.eclipse.mylyn.internal.bugzilla.rest.core.BugzillaRestConfiguration; @@ -83,7 +84,6 @@ import org.eclipse.mylyn.tasks.core.data.TaskDataCollector; import org.eclipse.mylyn.tasks.core.data.TaskMapper; import org.junit.Before; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; @@ -98,7 +98,7 @@ // the value in the fixture. // Note: When there is no fixture with this property no tests get executed //@RunOnlyWhenProperty(property = "default", value = "1") -@Ignore("No CI Server") + public class BugzillaRestClientTest implements IFixtureJUnitClass { private final BugzillaRestTestFixture actualFixture; @@ -128,12 +128,14 @@ public AbstractTestFixture getActualFixture() { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testConnectorClientCache() throws Exception { BugzillaRestClient client1 = connector.getClient(actualFixture.repository()); assertNotNull(client1); } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testGetVersion() throws Exception { BugzillaRestClient client = new BugzillaRestClient(actualFixture.location(), connector); assertNotNull(client.getClient()); @@ -143,6 +145,7 @@ public void testGetVersion() throws Exception { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testValidate() throws Exception { BugzillaRestClient client = new BugzillaRestClient(actualFixture.location(), connector); assertNotNull(client.getClient()); @@ -150,6 +153,7 @@ public void testValidate() throws Exception { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testInvalidUserValidate() throws BugzillaRestException { RepositoryLocation location = new RepositoryLocation(); location.setUrl(actualFixture.getRepositoryUrl()); @@ -165,6 +169,7 @@ public void testInvalidUserValidate() throws BugzillaRestException { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testNoUserValidate() throws BugzillaRestException { RepositoryLocation location = new RepositoryLocation(); location.setUrl(actualFixture.getRepositoryUrl()); @@ -179,6 +184,7 @@ public void testNoUserValidate() throws BugzillaRestException { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testInvalidPasswordValidate() throws BugzillaRestException { RepositoryLocation location = new RepositoryLocation(); location.setUrl(actualFixture.getRepositoryUrl()); @@ -228,6 +234,7 @@ public void testInvalidApikeyValidate() throws BugzillaRestException { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testGetConfiguration() throws Exception { TaskRepository repository = actualFixture.repository(); BugzillaRestClient client = connector.getClient(repository); @@ -251,17 +258,17 @@ public void testGetConfiguration() throws Exception { CommonTestUtil.getResource(this, actualFixture.getTestDataFolder() + "/parameters.json"), Charset.defaultCharset()), new Gson().toJson(parameter) - .replaceAll(repository.getRepositoryUrl(), "http://dummy.url") + .replaceAll(repository.getRepositoryUrl(), "http://dummy.url/") .replaceAll(repository.getRepositoryUrl().replaceFirst("https://", "http://"), - "http://dummy.url")); + "http://dummy.url/")); assertEquals( IOUtils.toString( CommonTestUtil.getResource(this, actualFixture.getTestDataFolder() + "/configuration.json"), Charset.defaultCharset()), new Gson().toJson(configuration) - .replaceAll(repository.getRepositoryUrl(), "http://dummy.url") + .replaceAll(repository.getRepositoryUrl(), "http://dummy.url/") .replaceAll(repository.getRepositoryUrl().replaceFirst("https://", "http://"), - "http://dummy.url")); + "http://dummy.url/")); } private void assertConfigurationFieldNames(Collection fields) throws IOException { @@ -278,6 +285,7 @@ private void assertConfigurationFieldNames(Collection fields) throws IOEx } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testinitializeTaskData() throws Exception { final TaskMapping taskMappingInit = new TaskMapping() { @Override @@ -323,6 +331,7 @@ public String getProduct() { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testPostTaskDataWithoutProduct() throws Exception { final TaskMapping taskMappingInit = new TaskMapping() { @Override @@ -347,12 +356,16 @@ public String getDescription() { fail("never reach this!"); } catch (BugzillaRestException e) { String url = actualFixture.getRepositoryUrl(); + if (url.endsWith("/")) { + url= url.substring(0, url.length()-1); + } assertEquals("You must select/enter a product. (status: Bad Request from " - + url.substring(url.lastIndexOf('/')) + "/rest.cgi/bug)", e.getMessage()); + + url.substring(url.lastIndexOf('/')) + "//rest.cgi/bug)", e.getMessage()); } } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testPostTaskDataWithoutMilestone() throws Exception { final TaskMapping taskMappingInit = new TaskMapping() { @Override @@ -391,12 +404,16 @@ public String getVersion() { fail("never reach this!"); } catch (BugzillaRestException e) { String url = actualFixture.getRepositoryUrl(); + if (url.endsWith("/")) { + url = url.substring(0, url.length() - 1); + } assertEquals("You must select/enter a milestone. (status: Bad Request from " - + url.substring(url.lastIndexOf('/')) + "/rest.cgi/bug)", e.getMessage()); + + url.substring(url.lastIndexOf('/')) + "//rest.cgi/bug)", e.getMessage()); } } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testPostTaskData() throws Exception { final TaskMapping taskMappingInit = new TaskMapping() { @Override @@ -439,6 +456,7 @@ public String getVersion() { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testPostTaskDataFromTaskdata() throws Exception { final TaskMapping taskMappingInit = new TaskMapping() { @Override @@ -488,6 +506,7 @@ public String getVersion() { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testGetTaskData() throws Exception { final TaskMapping taskMappingInit = new TaskMapping() { @Override @@ -589,6 +608,7 @@ public String getVersion() { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testUpdateTaskData() throws Exception { String taskId = harness.getNewTaksId4TestProduct(); TaskData taskDataGet = harness.getTaskFromServer(taskId); @@ -647,6 +667,7 @@ public void testUpdateTaskData() throws Exception { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testAddComment() throws Exception { String taskId = harness.getNewTaksId4TestProduct(); TaskData taskDataGet = harness.getTaskFromServer(taskId); @@ -681,6 +702,7 @@ public void testAddComment() throws Exception { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testGifAttachment() throws Exception { TaskAttribute attachmentAttribute = null; TaskRepository repository = actualFixture.repository(); @@ -750,6 +772,7 @@ public String getVersion() { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testTextAttachment() throws Exception { TaskAttribute attachmentAttribute = null; TaskRepository repository = actualFixture.repository(); @@ -838,6 +861,7 @@ public void accept(TaskData taskData) { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testCreateCCAttribute() throws Exception { final TaskMapping taskMappingInit = new TaskMapping() { @Override @@ -891,6 +915,7 @@ public String getVersion() { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testCreateBlocksAttribute() throws Exception { final TaskMapping taskMappingInit = new TaskMapping() { @Override @@ -945,6 +970,7 @@ public String getVersion() { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testCreateDependsOnAttribute() throws Exception { final TaskMapping taskMappingInit = new TaskMapping() { @Override @@ -999,6 +1025,7 @@ public String getVersion() { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testCCAttribute() throws Exception { String taskId = harness.getNewTaksId4TestProduct(); TaskData taskDataGet = harness.getTaskFromServer(taskId); @@ -1046,6 +1073,7 @@ public void testCCAttribute() throws Exception { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testBlocksAttributeV1() throws Exception { String taskId = harness.getNewTaksId4TestProduct(); String[] taskIdRel = harness.getRelationTasks(); @@ -1093,6 +1121,7 @@ public void testBlocksAttributeV1() throws Exception { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testBlocksAttributeV2() throws Exception { String taskId = harness.getNewTaksId4TestProduct(); String[] taskIdRel = harness.getRelationTasks(); @@ -1143,6 +1172,7 @@ public void testBlocksAttributeV2() throws Exception { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testDependsOnAttributeV1() throws Exception { String taskId = harness.getNewTaksId4TestProduct(); String[] taskIdRel = harness.getRelationTasks(); @@ -1191,6 +1221,7 @@ public void testDependsOnAttributeV1() throws Exception { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testDependsOnAttributeV2() throws Exception { String taskId = harness.getNewTaksId4TestProduct(); String[] taskIdRel = harness.getRelationTasks(); @@ -1242,6 +1273,7 @@ public void testDependsOnAttributeV2() throws Exception { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testFlagsSet() throws Exception { String taskId = harness.getNewTaksId4TestProduct(); @@ -1358,6 +1390,7 @@ public void testFlagsSet() throws Exception { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testFlagsReset() throws Exception { String taskId = harness.getNewTaksId4TestProduct(); @@ -1546,6 +1579,7 @@ public void testFlagsReset() throws Exception { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testFlagsChange() throws Exception { String taskId = harness.getNewTaksId4TestProduct(); @@ -1745,6 +1779,7 @@ public void testFlagsChange() throws Exception { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testTextAttachmentWithFlags() throws Exception { TaskAttribute attachmentAttribute = null; TaskRepository repository = actualFixture.repository(); diff --git a/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/BugzillaRestConfigurationTest.java b/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/BugzillaRestConfigurationTest.java index 4b2b0d154b..7993d7ea9c 100644 --- a/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/BugzillaRestConfigurationTest.java +++ b/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/BugzillaRestConfigurationTest.java @@ -23,16 +23,20 @@ import org.apache.commons.io.IOUtils; import org.eclipse.core.runtime.CoreException; import org.eclipse.mylyn.bugzilla.rest.test.support.BugzillaRestTestFixture; +import org.eclipse.mylyn.commons.sdk.util.AbstractTestFixture; import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil; +import org.eclipse.mylyn.commons.sdk.util.ConditionalIgnoreRule; +import org.eclipse.mylyn.commons.sdk.util.IFixtureJUnitClass; import org.eclipse.mylyn.commons.sdk.util.Junit4TestFixtureRunner; import org.eclipse.mylyn.commons.sdk.util.Junit4TestFixtureRunner.FixtureDefinition; +import org.eclipse.mylyn.commons.sdk.util.MustRunOnCIServerRule; import org.eclipse.mylyn.internal.bugzilla.rest.core.BugzillaRestConfiguration; import org.eclipse.mylyn.internal.bugzilla.rest.core.BugzillaRestConnector; import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager; import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; -import org.junit.Ignore; +import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -42,10 +46,12 @@ @RunWith(Junit4TestFixtureRunner.class) @FixtureDefinition(fixtureClass = BugzillaRestTestFixture.class, fixtureType = "bugzillaREST") //@RunOnlyWhenProperty(property = "default", value = "1") -@Ignore("No CI Server") -public class BugzillaRestConfigurationTest { +public class BugzillaRestConfigurationTest implements IFixtureJUnitClass { private final BugzillaRestTestFixture actualFixture; + @Rule + public ConditionalIgnoreRule rule = new ConditionalIgnoreRule(this); + private static TaskRepositoryManager manager; private BugzillaRestConnector connector; @@ -71,6 +77,7 @@ public void tearDown() throws Exception { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testConfigurationFromConnector() throws CoreException, IOException { BugzillaRestConfiguration configuration = connector.getRepositoryConfiguration(actualFixture.repository()); assertNotNull(configuration); @@ -79,10 +86,15 @@ public void testConfigurationFromConnector() throws CoreException, IOException { CommonTestUtil.getResource(this, actualFixture.getTestDataFolder() + "/configuration.json"), Charset.defaultCharset()), new Gson().toJson(configuration) - .replaceAll(actualFixture.getRepositoryUrl(), "http://dummy.url") + .replaceAll(actualFixture.getRepositoryUrl(), "http://dummy.url/") .replaceAll(actualFixture.getRepositoryUrl().replaceFirst("https://", "http://"), - "http://dummy.url")); + "http://dummy.url/")); + + } + @Override + public AbstractTestFixture getActualFixture() { + return actualFixture; } } diff --git a/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/BugzillaRestConnectorTest.java b/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/BugzillaRestConnectorTest.java index f6e7222503..4f642c3321 100644 --- a/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/BugzillaRestConnectorTest.java +++ b/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/BugzillaRestConnectorTest.java @@ -29,10 +29,14 @@ import org.eclipse.mylyn.commons.net.AuthenticationType; import org.eclipse.mylyn.commons.repositories.core.RepositoryLocation; import org.eclipse.mylyn.commons.repositories.core.auth.UserCredentials; +import org.eclipse.mylyn.commons.sdk.util.AbstractTestFixture; import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil; import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil.PrivilegeLevel; +import org.eclipse.mylyn.commons.sdk.util.ConditionalIgnoreRule; +import org.eclipse.mylyn.commons.sdk.util.IFixtureJUnitClass; import org.eclipse.mylyn.commons.sdk.util.Junit4TestFixtureRunner; import org.eclipse.mylyn.commons.sdk.util.Junit4TestFixtureRunner.FixtureDefinition; +import org.eclipse.mylyn.commons.sdk.util.MustRunOnCIServerRule; import org.eclipse.mylyn.internal.bugzilla.rest.core.BugzillaRestConfiguration; import org.eclipse.mylyn.internal.bugzilla.rest.core.BugzillaRestConnector; import org.eclipse.mylyn.internal.bugzilla.rest.core.Duration; @@ -43,7 +47,7 @@ import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper; import org.eclipse.mylyn.tasks.core.data.TaskData; import org.junit.Before; -import org.junit.Ignore; +import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -52,9 +56,11 @@ @RunWith(Junit4TestFixtureRunner.class) @FixtureDefinition(fixtureClass = BugzillaRestTestFixture.class, fixtureType = "bugzillaREST") @SuppressWarnings({ "nls", "restriction" }) -@Ignore("No CI Server") -public class BugzillaRestConnectorTest { +public class BugzillaRestConnectorTest implements IFixtureJUnitClass { private final BugzillaRestTestFixture actualFixture; + @Rule + public ConditionalIgnoreRule rule = new ConditionalIgnoreRule(this); + private BugzillaRestConnector connector; @@ -70,6 +76,7 @@ public void setUp() { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testReloadCache() throws Exception { connector = new BugzillaRestConnectorLocal(new Duration(5, TimeUnit.SECONDS)); assertNotNull(connector); @@ -96,6 +103,7 @@ private void waitForCacheRemoval() throws InterruptedException { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testLoadCache() throws Exception { BugzillaRestConfiguration configuration = connector.getRepositoryConfiguration(actualFixture.repository()); assertNotNull(configuration); @@ -106,6 +114,7 @@ public void testLoadCache() throws Exception { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testRepositoryCacheNotChanged() throws Exception { TaskRepository repository = new TaskRepository(actualFixture.repository().getConnectorKind(), actualFixture.repository().getRepositoryUrl()); @@ -159,6 +168,7 @@ public void testRepositoryCacheNotChanged() throws Exception { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testRepositoryCacheChanged() throws Exception { TaskRepository repository = new TaskRepository(actualFixture.repository().getConnectorKind(), actualFixture.repository().getRepositoryUrl()); @@ -192,6 +202,7 @@ public void testRepositoryCacheChanged() throws Exception { } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testLoadCacheWrongRepository() throws Exception { TaskRepository taskRepository = new TaskRepository(connector.getConnectorKind(), "http://mylyn.org/bugzilla-rest-trunk-wrong/"); @@ -229,6 +240,7 @@ protected Caffeine createCacheBuilder(Duration expireAfterWriteD } @Test + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testUpdateTaskFromTaskData() throws Exception { TaskData taskData = new TaskData(new TaskAttributeMapper(actualFixture.repository()), connector.getConnectorKind(), actualFixture.repository().getRepositoryUrl(), "123"); @@ -237,4 +249,9 @@ public void testUpdateTaskFromTaskData() throws Exception { assertThat(task.getUrl(), equalTo(actualFixture.repository().getRepositoryUrl() + "/rest.cgi/bug/123")); } + @Override + public AbstractTestFixture getActualFixture() { + return actualFixture; + } + } diff --git a/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/BugzillaRestFlagMapperTest.java b/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/BugzillaRestFlagMapperTest.java index 16bfe61f64..83ec228999 100644 --- a/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/BugzillaRestFlagMapperTest.java +++ b/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/BugzillaRestFlagMapperTest.java @@ -24,6 +24,8 @@ import org.apache.commons.io.IOUtils; import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil; +import org.eclipse.mylyn.commons.sdk.util.ConditionalIgnoreRule; +import org.eclipse.mylyn.commons.sdk.util.MustRunOnCIServerRule; import org.eclipse.mylyn.internal.bugzilla.rest.core.BugzillaRestFlagMapper; import org.eclipse.mylyn.internal.bugzilla.rest.core.IBugzillaRestConstants; import org.eclipse.mylyn.tasks.core.TaskRepository; @@ -31,7 +33,6 @@ import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper; import org.eclipse.mylyn.tasks.core.data.TaskData; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import com.google.gson.Gson; @@ -116,7 +117,7 @@ public void testWrite2Json1() throws IOException { } @Test - @Ignore("No CI Server") + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testApplyToTaskAttribute() throws IOException { String jsonElement = IOUtils.toString(CommonTestUtil.getResource(this, "testdata/flag.json"), Charset.defaultCharset()); @@ -126,8 +127,7 @@ public void testApplyToTaskAttribute() throws IOException { .createAttribute(IBugzillaRestConstants.KIND_FLAG_TYPE + "11"); flagMapper.applyTo(taskAttribute); assertEquals(IOUtils.toString(CommonTestUtil.getResource(this, "testdata/flag.txt"), Charset.defaultCharset()), - taskAttribute.toString(), - Charset.defaultCharset()); + taskAttribute.toString()); } @Test @@ -144,7 +144,7 @@ public void testApplyToTaskAttribute1() throws IOException { } @Test - @Ignore("No CI Server") + @ConditionalIgnoreRule.ConditionalIgnore(condition = MustRunOnCIServerRule.class) public void testCreateFromTaskAttribute() throws IOException { String jsonElement = IOUtils.toString(CommonTestUtil.getResource(this, "testdata/flag.json"), Charset.defaultCharset()); @@ -154,8 +154,7 @@ public void testCreateFromTaskAttribute() throws IOException { .createAttribute(IBugzillaRestConstants.KIND_FLAG_TYPE + "11"); flagMapper.applyTo(taskAttribute); assertEquals(IOUtils.toString(CommonTestUtil.getResource(this, "testdata/flag.txt"), - Charset.defaultCharset()), taskAttribute.toString(), - Charset.defaultCharset()); + Charset.defaultCharset()), taskAttribute.toString()); flagMapper = BugzillaRestFlagMapper.createFrom(taskAttribute); assertEquals(IOUtils.toString(CommonTestUtil.getResource(this, "testdata/flag.json"), Charset.defaultCharset()), diff --git a/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/MustRunOnApikeyRule.java b/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/MustRunOnApikeyRule.java index 0035057b75..40d5dc12bb 100644 --- a/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/MustRunOnApikeyRule.java +++ b/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/src/org/eclipse/mylyn/bugzilla/rest/core/tests/MustRunOnApikeyRule.java @@ -15,6 +15,7 @@ import org.eclipse.mylyn.bugzilla.rest.test.support.BugzillaRestTestFixture; import org.eclipse.mylyn.commons.sdk.util.AbstractTestFixture; +import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil; import org.eclipse.mylyn.commons.sdk.util.ConditionalIgnoreRule; @SuppressWarnings("restriction") @@ -23,7 +24,7 @@ public class MustRunOnApikeyRule implements ConditionalIgnoreRule.IgnoreConditio @Override public boolean isSatisfied(AbstractTestFixture fixture) { if (fixture instanceof BugzillaRestTestFixture) { - return !((BugzillaRestTestFixture) fixture).isApiKeyEnabled(); + return !(CommonTestUtil.runOnCIServerTestsOnly() && ((BugzillaRestTestFixture) fixture).isApiKeyEnabled()); } else { return false; } diff --git a/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/testdata/Version1/configuration.json b/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/testdata/Version1/configuration.json index 638ed22d45..a87e8a3cf1 100644 --- a/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/testdata/Version1/configuration.json +++ b/mylyn.tasks/connectors/bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core.tests/testdata/Version1/configuration.json @@ -1 +1 @@ -{"repositoryId":"http://dummy.url","fields":{"alias":{"id":38,"type":0,"is_custom":false,"name":"alias","display_name":"Alias","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"assigned_to":{"id":16,"type":0,"is_custom":false,"name":"assigned_to","display_name":"AssignedTo","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"assigned_to_realname":{"id":19,"type":0,"is_custom":false,"name":"assigned_to_realname","display_name":"AssignedToName","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"attach_data.thedata":{"id":53,"type":0,"is_custom":false,"name":"attach_data.thedata","display_name":"Attachment data","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"attachments.description":{"id":25,"type":0,"is_custom":false,"name":"attachments.description","display_name":"Attachment description","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"attachments.filename":{"id":26,"type":0,"is_custom":false,"name":"attachments.filename","display_name":"Attachment filename","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"attachments.isobsolete":{"id":29,"type":0,"is_custom":false,"name":"attachments.isobsolete","display_name":"Attachment is obsolete","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"attachments.ispatch":{"id":28,"type":0,"is_custom":false,"name":"attachments.ispatch","display_name":"Attachment is patch","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"attachments.isprivate":{"id":30,"type":0,"is_custom":false,"name":"attachments.isprivate","display_name":"Attachment is private","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"attachments.mimetype":{"id":27,"type":0,"is_custom":false,"name":"attachments.mimetype","display_name":"Attachment mime type","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"attachments.submitter":{"id":31,"type":0,"is_custom":false,"name":"attachments.submitter","display_name":"Attachment creator","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"blocked":{"id":24,"type":0,"is_custom":false,"name":"blocked","display_name":"Blocks","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"bug_file_loc":{"id":7,"type":0,"is_custom":false,"name":"bug_file_loc","display_name":"URL","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"bug_group":{"id":42,"type":0,"is_custom":false,"name":"bug_group","display_name":"Group","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"bug_id":{"id":1,"type":0,"is_custom":false,"name":"bug_id","display_name":"Bug #","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"bug_severity":{"id":13,"type":2,"is_custom":false,"name":"bug_severity","display_name":"Severity","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"values":[{"name":"blocker","sort_key":100,"visibility_values":[],"is_active":false,"is_open":false},{"name":"critical","sort_key":200,"visibility_values":[],"is_active":false,"is_open":false},{"name":"major","sort_key":300,"visibility_values":[],"is_active":false,"is_open":false},{"name":"normal","sort_key":400,"visibility_values":[],"is_active":false,"is_open":false},{"name":"minor","sort_key":500,"visibility_values":[],"is_active":false,"is_open":false},{"name":"trivial","sort_key":600,"visibility_values":[],"is_active":false,"is_open":false},{"name":"enhancement","sort_key":700,"visibility_values":[],"is_active":false,"is_open":false}]},"bug_status":{"id":9,"type":2,"is_custom":false,"name":"bug_status","display_name":"Status","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"values":[{"sort_key":0,"visibility_values":[],"is_active":false,"is_open":true,"can_change_to":[{"name":"UNCONFIRMED","comment_required":false},{"name":"CONFIRMED","comment_required":false},{"name":"IN_PROGRESS","comment_required":false}]},{"name":"UNCONFIRMED","sort_key":100,"visibility_values":[],"is_active":false,"is_open":true,"can_change_to":[{"name":"CONFIRMED","comment_required":false},{"name":"IN_PROGRESS","comment_required":false},{"name":"RESOLVED","comment_required":false}]},{"name":"CONFIRMED","sort_key":200,"visibility_values":[],"is_active":false,"is_open":true,"can_change_to":[{"name":"IN_PROGRESS","comment_required":false},{"name":"RESOLVED","comment_required":false}]},{"name":"IN_PROGRESS","sort_key":300,"visibility_values":[],"is_active":false,"is_open":true,"can_change_to":[{"name":"CONFIRMED","comment_required":false},{"name":"RESOLVED","comment_required":false}]},{"name":"RESOLVED","sort_key":400,"visibility_values":[],"is_active":false,"is_open":false,"can_change_to":[{"name":"UNCONFIRMED","comment_required":false},{"name":"CONFIRMED","comment_required":false},{"name":"VERIFIED","comment_required":false}]},{"name":"VERIFIED","sort_key":500,"visibility_values":[],"is_active":false,"is_open":false,"can_change_to":[{"name":"UNCONFIRMED","comment_required":false},{"name":"CONFIRMED","comment_required":false}]}]},"cc":{"id":22,"type":0,"is_custom":false,"name":"cc","display_name":"CC","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"cclist_accessible":{"id":41,"type":0,"is_custom":false,"name":"cclist_accessible","display_name":"CC Accessible","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"cf_bugid":{"id":65,"type":6,"is_custom":true,"name":"cf_bugid","display_name":"bug id custom field","is_mandatory":false,"is_on_bug_entry":true,"visibility_values":[]},"cf_datetime":{"id":64,"type":5,"is_custom":true,"name":"cf_datetime","display_name":"date time custom field","is_mandatory":false,"is_on_bug_entry":true,"visibility_values":[]},"cf_dropdown":{"id":61,"type":2,"is_custom":true,"name":"cf_dropdown","display_name":"drop down custom field","is_mandatory":false,"is_on_bug_entry":true,"visibility_values":[],"values":[{"name":"---","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false},{"name":"one","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false},{"name":"three","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false},{"name":"two","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false}]},"cf_freetext":{"id":60,"type":1,"is_custom":true,"name":"cf_freetext","display_name":"free text custom field","is_mandatory":false,"is_on_bug_entry":true,"visibility_values":[]},"cf_largetextbox":{"id":62,"type":4,"is_custom":true,"name":"cf_largetextbox","display_name":"large text box custom field","is_mandatory":false,"is_on_bug_entry":true,"visibility_values":[]},"cf_multiselect":{"id":63,"type":3,"is_custom":true,"name":"cf_multiselect","display_name":"multi selection box custom field","is_mandatory":false,"is_on_bug_entry":true,"visibility_values":[],"values":[{"name":"Blue","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Green","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Red","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Yellow","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false}]},"classification":{"id":3,"type":2,"is_custom":false,"name":"classification","display_name":"Classification","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"values":[{"name":"Unclassified","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false}]},"comment_tag":{"id":58,"type":0,"is_custom":false,"name":"comment_tag","display_name":"Comment Tag","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"commenter":{"id":46,"type":0,"is_custom":false,"name":"commenter","display_name":"Commenter","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"component":{"id":15,"type":2,"is_custom":false,"name":"component","display_name":"Component","is_mandatory":true,"is_on_bug_entry":false,"visibility_values":[],"value_field":"product","values":[{"name":"TestComponent","sort_key":0,"visibility_values":["TestProduct"],"is_active":true,"is_open":false},{"name":"Component 1","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"Component 2","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"ManualC1","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false},{"name":"ManualC2","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false}]},"content":{"id":52,"type":0,"is_custom":false,"name":"content","display_name":"Content","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"creation_ts":{"id":33,"type":0,"is_custom":false,"name":"creation_ts","display_name":"Creation date","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"days_elapsed":{"id":59,"type":0,"is_custom":false,"name":"days_elapsed","display_name":"Days since bug changed","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"deadline":{"id":45,"type":5,"is_custom":false,"name":"deadline","display_name":"Deadline","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"delta_ts":{"id":34,"type":0,"is_custom":false,"name":"delta_ts","display_name":"Last changed date","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"dependson":{"id":23,"type":0,"is_custom":false,"name":"dependson","display_name":"Depends on","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"estimated_time":{"id":43,"type":0,"is_custom":false,"name":"estimated_time","display_name":"Estimated Hours","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"everconfirmed":{"id":39,"type":0,"is_custom":false,"name":"everconfirmed","display_name":"Ever Confirmed","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"flagtypes.name":{"id":47,"type":0,"is_custom":false,"name":"flagtypes.name","display_name":"Flags","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"keywords":{"id":11,"type":8,"is_custom":false,"name":"keywords","display_name":"Keywords","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"values":[{"name":"Keyword1","sort_key":0,"is_active":false,"description":"1","is_open":false},{"name":"Keyword2","sort_key":0,"is_active":false,"description":"2","is_open":false}]},"last_visit_ts":{"id":57,"type":5,"is_custom":false,"name":"last_visit_ts","display_name":"Last Visit","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"longdesc":{"id":35,"type":0,"is_custom":false,"name":"longdesc","display_name":"Comment","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"longdescs.count":{"id":37,"type":0,"is_custom":false,"name":"longdescs.count","display_name":"Number of Comments","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"longdescs.isprivate":{"id":36,"type":0,"is_custom":false,"name":"longdescs.isprivate","display_name":"Comment is private","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"op_sys":{"id":8,"type":2,"is_custom":false,"name":"op_sys","display_name":"OS/Version","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"values":[{"name":"All","sort_key":100,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Windows","sort_key":200,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Mac OS","sort_key":300,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Linux","sort_key":400,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Other","sort_key":500,"visibility_values":[],"is_active":false,"is_open":false}]},"owner_idle_time":{"id":54,"type":0,"is_custom":false,"name":"owner_idle_time","display_name":"Time Since Assignee Touched","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"percentage_complete":{"id":51,"type":0,"is_custom":false,"name":"percentage_complete","display_name":"Percentage Complete","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"priority":{"id":14,"type":2,"is_custom":false,"name":"priority","display_name":"Priority","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"values":[{"name":"Highest","sort_key":100,"visibility_values":[],"is_active":false,"is_open":false},{"name":"High","sort_key":200,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Normal","sort_key":300,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Low","sort_key":400,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Lowest","sort_key":500,"visibility_values":[],"is_active":false,"is_open":false},{"name":"---","sort_key":600,"visibility_values":[],"is_active":false,"is_open":false}]},"product":{"id":4,"type":2,"is_custom":false,"name":"product","display_name":"Product","is_mandatory":true,"is_on_bug_entry":false,"visibility_values":[]},"qa_contact":{"id":18,"type":0,"is_custom":false,"name":"qa_contact","display_name":"QAContact","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"qa_contact_realname":{"id":21,"type":0,"is_custom":false,"name":"qa_contact_realname","display_name":"QAContactName","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"remaining_time":{"id":44,"type":0,"is_custom":false,"name":"remaining_time","display_name":"Remaining Hours","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"rep_platform":{"id":6,"type":2,"is_custom":false,"name":"rep_platform","display_name":"Platform","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"values":[{"name":"All","sort_key":100,"visibility_values":[],"is_active":false,"is_open":false},{"name":"PC","sort_key":200,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Macintosh","sort_key":300,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Other","sort_key":400,"visibility_values":[],"is_active":false,"is_open":false}]},"reporter":{"id":17,"type":0,"is_custom":false,"name":"reporter","display_name":"ReportedBy","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"reporter_accessible":{"id":40,"type":0,"is_custom":false,"name":"reporter_accessible","display_name":"Reporter Accessible","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"reporter_realname":{"id":20,"type":0,"is_custom":false,"name":"reporter_realname","display_name":"ReportedByName","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"requestees.login_name":{"id":48,"type":0,"is_custom":false,"name":"requestees.login_name","display_name":"Flag Requestee","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"resolution":{"id":12,"type":2,"is_custom":false,"name":"resolution","display_name":"Resolution","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"values":[{"name":"","sort_key":100,"visibility_values":[],"is_active":false,"is_open":false},{"name":"FIXED","sort_key":200,"visibility_values":[],"is_active":false,"is_open":false},{"name":"INVALID","sort_key":300,"visibility_values":[],"is_active":false,"is_open":false},{"name":"WONTFIX","sort_key":400,"visibility_values":[],"is_active":false,"is_open":false},{"name":"DUPLICATE","sort_key":500,"visibility_values":[],"is_active":false,"is_open":false},{"name":"WORKSFORME","sort_key":600,"visibility_values":[],"is_active":false,"is_open":false}]},"see_also":{"id":55,"type":7,"is_custom":false,"name":"see_also","display_name":"See Also","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"setters.login_name":{"id":49,"type":0,"is_custom":false,"name":"setters.login_name","display_name":"Flag Setter","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"short_desc":{"id":2,"type":0,"is_custom":false,"name":"short_desc","display_name":"Summary","is_mandatory":true,"is_on_bug_entry":false,"visibility_values":[]},"status_whiteboard":{"id":10,"type":0,"is_custom":false,"name":"status_whiteboard","display_name":"Status Whiteboard","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"tag":{"id":56,"type":8,"is_custom":false,"name":"tag","display_name":"Personal Tags","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"target_milestone":{"id":32,"type":0,"is_custom":false,"name":"target_milestone","display_name":"Target Milestone","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"value_field":"product","values":[{"name":"---","sort_key":0,"visibility_values":["TestProduct"],"is_active":true,"is_open":false},{"name":"---","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"---","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false},{"name":"M1","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false},{"name":"M1.0","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"M2","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false},{"name":"M2.0","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"M3","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false},{"name":"M3.0","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false}]},"version":{"id":5,"type":0,"is_custom":false,"name":"version","display_name":"Version","is_mandatory":true,"is_on_bug_entry":false,"visibility_values":[],"value_field":"product","values":[{"name":"unspecified","sort_key":0,"visibility_values":["TestProduct"],"is_active":true,"is_open":false},{"name":"unspecified","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"a","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"b","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"c","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"unspecified","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false},{"name":"R1","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false},{"name":"R1.1","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false},{"name":"R2.0","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false}]},"work_time":{"id":50,"type":0,"is_custom":false,"name":"work_time","display_name":"Hours Worked","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]}},"products":{"ManualTest":{"id":3,"name":"ManualTest","is_active":true,"description":"Product for manual testing","default_milestone":"---","has_unconfirmed":false,"classification":"Unclassified","components":[{"id":4,"description":"1","default_assigned_to":"tests@mylyn.eclipse.org","default_qa_contact":"","flag_types":{"bug":[{"id":1,"name":"BugFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":false,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":2,"name":"BugFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":5,"name":"BugFlag3","description":"3","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":6,"name":"BugFlag4","description":"4","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}],"attachment":[{"id":3,"name":"AttachmentFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":4,"name":"AttachmentFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}]},"name":"ManualC1","sort_key":0,"is_active":true},{"id":5,"description":"2","default_assigned_to":"tests@mylyn.eclipse.org","default_qa_contact":"","flag_types":{"bug":[{"id":1,"name":"BugFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":false,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":2,"name":"BugFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":5,"name":"BugFlag3","description":"3","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":6,"name":"BugFlag4","description":"4","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}],"attachment":[{"id":3,"name":"AttachmentFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":4,"name":"AttachmentFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}]},"name":"ManualC2","sort_key":0,"is_active":true}],"versions":[{"name":"R1","sort_key":0,"is_active":true},{"name":"R1.1","sort_key":0,"is_active":true},{"name":"R2.0","sort_key":0,"is_active":true},{"name":"unspecified","sort_key":0,"is_active":true}],"milestones":[{"name":"---","sort_key":0,"is_active":true},{"name":"M1","sort_key":0,"is_active":true},{"name":"M2","sort_key":0,"is_active":true},{"name":"M3","sort_key":0,"is_active":true}]},"Product with Spaces":{"id":2,"name":"Product with Spaces","is_active":true,"description":"Product with Spaces is the renamed Scratch Product.","default_milestone":"---","has_unconfirmed":true,"classification":"Unclassified","components":[{"id":2,"description":"1","default_assigned_to":"tests@mylyn.eclipse.org","default_qa_contact":"","flag_types":{"bug":[{"id":1,"name":"BugFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":false,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":2,"name":"BugFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":5,"name":"BugFlag3","description":"3","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":6,"name":"BugFlag4","description":"4","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}],"attachment":[{"id":3,"name":"AttachmentFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":4,"name":"AttachmentFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}]},"name":"Component 1","sort_key":0,"is_active":true},{"id":3,"description":"2","default_assigned_to":"tests@mylyn.eclipse.org","default_qa_contact":"","flag_types":{"bug":[{"id":1,"name":"BugFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":false,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":2,"name":"BugFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":5,"name":"BugFlag3","description":"3","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":6,"name":"BugFlag4","description":"4","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}],"attachment":[{"id":3,"name":"AttachmentFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":4,"name":"AttachmentFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}]},"name":"Component 2","sort_key":0,"is_active":true}],"versions":[{"name":"a","sort_key":0,"is_active":true},{"name":"b","sort_key":0,"is_active":true},{"name":"c","sort_key":0,"is_active":true},{"name":"unspecified","sort_key":0,"is_active":true}],"milestones":[{"name":"---","sort_key":0,"is_active":true},{"name":"M1.0","sort_key":0,"is_active":true},{"name":"M2.0","sort_key":0,"is_active":true},{"name":"M3.0","sort_key":0,"is_active":true}]},"TestProduct":{"id":1,"name":"TestProduct","is_active":true,"description":"This is a test product. This ought to be blown away and replaced with real stuff in a finished installation of bugzilla.","default_milestone":"---","has_unconfirmed":true,"classification":"Unclassified","components":[{"id":1,"description":"This is a test component in the test product database. This ought to be blown away and replaced with real stuff in a finished installation of Bugzilla.","default_assigned_to":"admin@mylyn.eclipse.org","default_qa_contact":"","flag_types":{"bug":[{"id":1,"name":"BugFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":false,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":2,"name":"BugFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":5,"name":"BugFlag3","description":"3","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":6,"name":"BugFlag4","description":"4","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}],"attachment":[{"id":3,"name":"AttachmentFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":4,"name":"AttachmentFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}]},"name":"TestComponent","sort_key":0,"is_active":true}],"versions":[{"name":"unspecified","sort_key":0,"is_active":true}],"milestones":[{"name":"---","sort_key":0,"is_active":true}]}},"parameters":{"allowemailchange":"1","attachment_base":"","commentonchange_resolution":"0","commentonduplicate":"0","cookiepath":"/","defaultopsys":"","defaultplatform":"","defaultpriority":"---","defaultseverity":"enhancement","duplicate_or_move_bug_status":"RESOLVED","emailregexpdesc":"A legal address must contain exactly one \u0027@\u0027, and at least one \u0027.\u0027 after the @.","emailsuffix":"","letsubmitterchoosemilestone":"1","letsubmitterchoosepriority":"1","mailfrom":"bugzilla-daemon","maintainer":"admin@mylyn.eclipse.org","maxattachmentsize":"1000","maxlocalattachment":"0","musthavemilestoneonaccept":"0","noresolveonopenblockers":"0","password_complexity":"no_constraints","rememberlogin":"on","requirelogin":"0","search_allow_no_criteria":"1","urlbase":"http://dummy.url/","use_see_also":"1","useclassification":"0","usemenuforusers":"0","useqacontact":"1","usestatuswhiteboard":"1","usetargetmilestone":"1"}} \ No newline at end of file +{"repositoryId":"http://dummy.url/","fields":{"alias":{"id":38,"type":0,"is_custom":false,"name":"alias","display_name":"Alias","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"assigned_to":{"id":16,"type":0,"is_custom":false,"name":"assigned_to","display_name":"AssignedTo","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"assigned_to_realname":{"id":19,"type":0,"is_custom":false,"name":"assigned_to_realname","display_name":"AssignedToName","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"attach_data.thedata":{"id":53,"type":0,"is_custom":false,"name":"attach_data.thedata","display_name":"Attachment data","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"attachments.description":{"id":25,"type":0,"is_custom":false,"name":"attachments.description","display_name":"Attachment description","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"attachments.filename":{"id":26,"type":0,"is_custom":false,"name":"attachments.filename","display_name":"Attachment filename","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"attachments.isobsolete":{"id":29,"type":0,"is_custom":false,"name":"attachments.isobsolete","display_name":"Attachment is obsolete","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"attachments.ispatch":{"id":28,"type":0,"is_custom":false,"name":"attachments.ispatch","display_name":"Attachment is patch","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"attachments.isprivate":{"id":30,"type":0,"is_custom":false,"name":"attachments.isprivate","display_name":"Attachment is private","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"attachments.mimetype":{"id":27,"type":0,"is_custom":false,"name":"attachments.mimetype","display_name":"Attachment mime type","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"attachments.submitter":{"id":31,"type":0,"is_custom":false,"name":"attachments.submitter","display_name":"Attachment creator","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"blocked":{"id":24,"type":0,"is_custom":false,"name":"blocked","display_name":"Blocks","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"bug_file_loc":{"id":7,"type":0,"is_custom":false,"name":"bug_file_loc","display_name":"URL","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"bug_group":{"id":42,"type":0,"is_custom":false,"name":"bug_group","display_name":"Group","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"bug_id":{"id":1,"type":0,"is_custom":false,"name":"bug_id","display_name":"Bug #","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"bug_severity":{"id":13,"type":2,"is_custom":false,"name":"bug_severity","display_name":"Severity","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"values":[{"name":"blocker","sort_key":100,"visibility_values":[],"is_active":false,"is_open":false},{"name":"critical","sort_key":200,"visibility_values":[],"is_active":false,"is_open":false},{"name":"major","sort_key":300,"visibility_values":[],"is_active":false,"is_open":false},{"name":"normal","sort_key":400,"visibility_values":[],"is_active":false,"is_open":false},{"name":"minor","sort_key":500,"visibility_values":[],"is_active":false,"is_open":false},{"name":"trivial","sort_key":600,"visibility_values":[],"is_active":false,"is_open":false},{"name":"enhancement","sort_key":700,"visibility_values":[],"is_active":false,"is_open":false}]},"bug_status":{"id":9,"type":2,"is_custom":false,"name":"bug_status","display_name":"Status","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"values":[{"sort_key":0,"visibility_values":[],"is_active":false,"is_open":true,"can_change_to":[{"name":"UNCONFIRMED","comment_required":false},{"name":"CONFIRMED","comment_required":false},{"name":"IN_PROGRESS","comment_required":false}]},{"name":"UNCONFIRMED","sort_key":100,"visibility_values":[],"is_active":false,"is_open":true,"can_change_to":[{"name":"CONFIRMED","comment_required":false},{"name":"IN_PROGRESS","comment_required":false},{"name":"RESOLVED","comment_required":false}]},{"name":"CONFIRMED","sort_key":200,"visibility_values":[],"is_active":false,"is_open":true,"can_change_to":[{"name":"IN_PROGRESS","comment_required":false},{"name":"RESOLVED","comment_required":false}]},{"name":"IN_PROGRESS","sort_key":300,"visibility_values":[],"is_active":false,"is_open":true,"can_change_to":[{"name":"CONFIRMED","comment_required":false},{"name":"RESOLVED","comment_required":false}]},{"name":"RESOLVED","sort_key":400,"visibility_values":[],"is_active":false,"is_open":false,"can_change_to":[{"name":"UNCONFIRMED","comment_required":false},{"name":"CONFIRMED","comment_required":false},{"name":"VERIFIED","comment_required":false}]},{"name":"VERIFIED","sort_key":500,"visibility_values":[],"is_active":false,"is_open":false,"can_change_to":[{"name":"UNCONFIRMED","comment_required":false},{"name":"CONFIRMED","comment_required":false}]}]},"cc":{"id":22,"type":0,"is_custom":false,"name":"cc","display_name":"CC","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"cclist_accessible":{"id":41,"type":0,"is_custom":false,"name":"cclist_accessible","display_name":"CC Accessible","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"cf_bugid":{"id":65,"type":6,"is_custom":true,"name":"cf_bugid","display_name":"bug id custom field","is_mandatory":false,"is_on_bug_entry":true,"visibility_values":[]},"cf_datetime":{"id":64,"type":5,"is_custom":true,"name":"cf_datetime","display_name":"date time custom field","is_mandatory":false,"is_on_bug_entry":true,"visibility_values":[]},"cf_dropdown":{"id":61,"type":2,"is_custom":true,"name":"cf_dropdown","display_name":"drop down custom field","is_mandatory":false,"is_on_bug_entry":true,"visibility_values":[],"values":[{"name":"---","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false},{"name":"one","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false},{"name":"three","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false},{"name":"two","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false}]},"cf_freetext":{"id":60,"type":1,"is_custom":true,"name":"cf_freetext","display_name":"free text custom field","is_mandatory":false,"is_on_bug_entry":true,"visibility_values":[]},"cf_largetextbox":{"id":62,"type":4,"is_custom":true,"name":"cf_largetextbox","display_name":"large text box custom field","is_mandatory":false,"is_on_bug_entry":true,"visibility_values":[]},"cf_multiselect":{"id":63,"type":3,"is_custom":true,"name":"cf_multiselect","display_name":"multi selection box custom field","is_mandatory":false,"is_on_bug_entry":true,"visibility_values":[],"values":[{"name":"Blue","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Green","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Red","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Yellow","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false}]},"classification":{"id":3,"type":2,"is_custom":false,"name":"classification","display_name":"Classification","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"values":[{"name":"Unclassified","sort_key":0,"visibility_values":[],"is_active":false,"is_open":false}]},"comment_tag":{"id":58,"type":0,"is_custom":false,"name":"comment_tag","display_name":"Comment Tag","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"commenter":{"id":46,"type":0,"is_custom":false,"name":"commenter","display_name":"Commenter","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"component":{"id":15,"type":2,"is_custom":false,"name":"component","display_name":"Component","is_mandatory":true,"is_on_bug_entry":false,"visibility_values":[],"value_field":"product","values":[{"name":"TestComponent","sort_key":0,"visibility_values":["TestProduct"],"is_active":true,"is_open":false},{"name":"Component 1","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"Component 2","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"ManualC1","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false},{"name":"ManualC2","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false}]},"content":{"id":52,"type":0,"is_custom":false,"name":"content","display_name":"Content","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"creation_ts":{"id":33,"type":0,"is_custom":false,"name":"creation_ts","display_name":"Creation date","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"days_elapsed":{"id":59,"type":0,"is_custom":false,"name":"days_elapsed","display_name":"Days since bug changed","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"deadline":{"id":45,"type":5,"is_custom":false,"name":"deadline","display_name":"Deadline","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"delta_ts":{"id":34,"type":0,"is_custom":false,"name":"delta_ts","display_name":"Last changed date","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"dependson":{"id":23,"type":0,"is_custom":false,"name":"dependson","display_name":"Depends on","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"estimated_time":{"id":43,"type":0,"is_custom":false,"name":"estimated_time","display_name":"Estimated Hours","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"everconfirmed":{"id":39,"type":0,"is_custom":false,"name":"everconfirmed","display_name":"Ever Confirmed","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"flagtypes.name":{"id":47,"type":0,"is_custom":false,"name":"flagtypes.name","display_name":"Flags","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"keywords":{"id":11,"type":8,"is_custom":false,"name":"keywords","display_name":"Keywords","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"values":[{"name":"Keyword1","sort_key":0,"is_active":false,"description":"1","is_open":false},{"name":"Keyword2","sort_key":0,"is_active":false,"description":"2","is_open":false}]},"last_visit_ts":{"id":57,"type":5,"is_custom":false,"name":"last_visit_ts","display_name":"Last Visit","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"longdesc":{"id":35,"type":0,"is_custom":false,"name":"longdesc","display_name":"Comment","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"longdescs.count":{"id":37,"type":0,"is_custom":false,"name":"longdescs.count","display_name":"Number of Comments","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"longdescs.isprivate":{"id":36,"type":0,"is_custom":false,"name":"longdescs.isprivate","display_name":"Comment is private","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"op_sys":{"id":8,"type":2,"is_custom":false,"name":"op_sys","display_name":"OS/Version","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"values":[{"name":"All","sort_key":100,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Windows","sort_key":200,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Mac OS","sort_key":300,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Linux","sort_key":400,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Other","sort_key":500,"visibility_values":[],"is_active":false,"is_open":false}]},"owner_idle_time":{"id":54,"type":0,"is_custom":false,"name":"owner_idle_time","display_name":"Time Since Assignee Touched","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"percentage_complete":{"id":51,"type":0,"is_custom":false,"name":"percentage_complete","display_name":"Percentage Complete","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"priority":{"id":14,"type":2,"is_custom":false,"name":"priority","display_name":"Priority","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"values":[{"name":"Highest","sort_key":100,"visibility_values":[],"is_active":false,"is_open":false},{"name":"High","sort_key":200,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Normal","sort_key":300,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Low","sort_key":400,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Lowest","sort_key":500,"visibility_values":[],"is_active":false,"is_open":false},{"name":"---","sort_key":600,"visibility_values":[],"is_active":false,"is_open":false}]},"product":{"id":4,"type":2,"is_custom":false,"name":"product","display_name":"Product","is_mandatory":true,"is_on_bug_entry":false,"visibility_values":[]},"qa_contact":{"id":18,"type":0,"is_custom":false,"name":"qa_contact","display_name":"QAContact","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"qa_contact_realname":{"id":21,"type":0,"is_custom":false,"name":"qa_contact_realname","display_name":"QAContactName","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"remaining_time":{"id":44,"type":0,"is_custom":false,"name":"remaining_time","display_name":"Remaining Hours","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"rep_platform":{"id":6,"type":2,"is_custom":false,"name":"rep_platform","display_name":"Platform","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"values":[{"name":"All","sort_key":100,"visibility_values":[],"is_active":false,"is_open":false},{"name":"PC","sort_key":200,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Macintosh","sort_key":300,"visibility_values":[],"is_active":false,"is_open":false},{"name":"Other","sort_key":400,"visibility_values":[],"is_active":false,"is_open":false}]},"reporter":{"id":17,"type":0,"is_custom":false,"name":"reporter","display_name":"ReportedBy","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"reporter_accessible":{"id":40,"type":0,"is_custom":false,"name":"reporter_accessible","display_name":"Reporter Accessible","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"reporter_realname":{"id":20,"type":0,"is_custom":false,"name":"reporter_realname","display_name":"ReportedByName","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"requestees.login_name":{"id":48,"type":0,"is_custom":false,"name":"requestees.login_name","display_name":"Flag Requestee","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"resolution":{"id":12,"type":2,"is_custom":false,"name":"resolution","display_name":"Resolution","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"values":[{"name":"","sort_key":100,"visibility_values":[],"is_active":false,"is_open":false},{"name":"FIXED","sort_key":200,"visibility_values":[],"is_active":false,"is_open":false},{"name":"INVALID","sort_key":300,"visibility_values":[],"is_active":false,"is_open":false},{"name":"WONTFIX","sort_key":400,"visibility_values":[],"is_active":false,"is_open":false},{"name":"DUPLICATE","sort_key":500,"visibility_values":[],"is_active":false,"is_open":false},{"name":"WORKSFORME","sort_key":600,"visibility_values":[],"is_active":false,"is_open":false}]},"see_also":{"id":55,"type":7,"is_custom":false,"name":"see_also","display_name":"See Also","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"setters.login_name":{"id":49,"type":0,"is_custom":false,"name":"setters.login_name","display_name":"Flag Setter","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"short_desc":{"id":2,"type":0,"is_custom":false,"name":"short_desc","display_name":"Summary","is_mandatory":true,"is_on_bug_entry":false,"visibility_values":[]},"status_whiteboard":{"id":10,"type":0,"is_custom":false,"name":"status_whiteboard","display_name":"Status Whiteboard","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"tag":{"id":56,"type":8,"is_custom":false,"name":"tag","display_name":"Personal Tags","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]},"target_milestone":{"id":32,"type":0,"is_custom":false,"name":"target_milestone","display_name":"Target Milestone","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[],"value_field":"product","values":[{"name":"---","sort_key":0,"visibility_values":["TestProduct"],"is_active":true,"is_open":false},{"name":"---","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"---","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false},{"name":"M1","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false},{"name":"M1.0","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"M2","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false},{"name":"M2.0","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"M3","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false},{"name":"M3.0","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false}]},"version":{"id":5,"type":0,"is_custom":false,"name":"version","display_name":"Version","is_mandatory":true,"is_on_bug_entry":false,"visibility_values":[],"value_field":"product","values":[{"name":"unspecified","sort_key":0,"visibility_values":["TestProduct"],"is_active":true,"is_open":false},{"name":"unspecified","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"a","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"b","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"c","sort_key":0,"visibility_values":["Product with Spaces"],"is_active":true,"is_open":false},{"name":"unspecified","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false},{"name":"R1","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false},{"name":"R1.1","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false},{"name":"R2.0","sort_key":0,"visibility_values":["ManualTest"],"is_active":true,"is_open":false}]},"work_time":{"id":50,"type":0,"is_custom":false,"name":"work_time","display_name":"Hours Worked","is_mandatory":false,"is_on_bug_entry":false,"visibility_values":[]}},"products":{"ManualTest":{"id":3,"name":"ManualTest","is_active":true,"description":"Product for manual testing","default_milestone":"---","has_unconfirmed":false,"classification":"Unclassified","components":[{"id":4,"description":"1","default_assigned_to":"tests@mylyn.eclipse.org","default_qa_contact":"","flag_types":{"bug":[{"id":1,"name":"BugFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":false,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":2,"name":"BugFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":5,"name":"BugFlag3","description":"3","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":6,"name":"BugFlag4","description":"4","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}],"attachment":[{"id":3,"name":"AttachmentFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":4,"name":"AttachmentFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}]},"name":"ManualC1","sort_key":0,"is_active":true},{"id":5,"description":"2","default_assigned_to":"tests@mylyn.eclipse.org","default_qa_contact":"","flag_types":{"bug":[{"id":1,"name":"BugFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":false,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":2,"name":"BugFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":5,"name":"BugFlag3","description":"3","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":6,"name":"BugFlag4","description":"4","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}],"attachment":[{"id":3,"name":"AttachmentFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":4,"name":"AttachmentFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}]},"name":"ManualC2","sort_key":0,"is_active":true}],"versions":[{"name":"R1","sort_key":0,"is_active":true},{"name":"R1.1","sort_key":0,"is_active":true},{"name":"R2.0","sort_key":0,"is_active":true},{"name":"unspecified","sort_key":0,"is_active":true}],"milestones":[{"name":"---","sort_key":0,"is_active":true},{"name":"M1","sort_key":0,"is_active":true},{"name":"M2","sort_key":0,"is_active":true},{"name":"M3","sort_key":0,"is_active":true}]},"Product with Spaces":{"id":2,"name":"Product with Spaces","is_active":true,"description":"Product with Spaces is the renamed Scratch Product.","default_milestone":"---","has_unconfirmed":true,"classification":"Unclassified","components":[{"id":2,"description":"1","default_assigned_to":"tests@mylyn.eclipse.org","default_qa_contact":"","flag_types":{"bug":[{"id":1,"name":"BugFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":false,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":2,"name":"BugFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":5,"name":"BugFlag3","description":"3","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":6,"name":"BugFlag4","description":"4","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}],"attachment":[{"id":3,"name":"AttachmentFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":4,"name":"AttachmentFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}]},"name":"Component 1","sort_key":0,"is_active":true},{"id":3,"description":"2","default_assigned_to":"tests@mylyn.eclipse.org","default_qa_contact":"","flag_types":{"bug":[{"id":1,"name":"BugFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":false,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":2,"name":"BugFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":5,"name":"BugFlag3","description":"3","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":6,"name":"BugFlag4","description":"4","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}],"attachment":[{"id":3,"name":"AttachmentFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":4,"name":"AttachmentFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}]},"name":"Component 2","sort_key":0,"is_active":true}],"versions":[{"name":"a","sort_key":0,"is_active":true},{"name":"b","sort_key":0,"is_active":true},{"name":"c","sort_key":0,"is_active":true},{"name":"unspecified","sort_key":0,"is_active":true}],"milestones":[{"name":"---","sort_key":0,"is_active":true},{"name":"M1.0","sort_key":0,"is_active":true},{"name":"M2.0","sort_key":0,"is_active":true},{"name":"M3.0","sort_key":0,"is_active":true}]},"TestProduct":{"id":1,"name":"TestProduct","is_active":true,"description":"This is a test product. This ought to be blown away and replaced with real stuff in a finished installation of bugzilla.","default_milestone":"---","has_unconfirmed":true,"classification":"Unclassified","components":[{"id":1,"description":"This is a test component in the test product database. This ought to be blown away and replaced with real stuff in a finished installation of Bugzilla.","default_assigned_to":"admin@mylyn.eclipse.org","default_qa_contact":"","flag_types":{"bug":[{"id":1,"name":"BugFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":false,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":2,"name":"BugFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":false,"grant_group":0,"request_group":0},{"id":5,"name":"BugFlag3","description":"3","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":false,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":6,"name":"BugFlag4","description":"4","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}],"attachment":[{"id":3,"name":"AttachmentFlag1","description":"1","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0},{"id":4,"name":"AttachmentFlag2","description":"2","cc_list":"","sort_key":1,"is_active":true,"is_requestable":true,"is_requesteeble":true,"is_multiplicable":true,"grant_group":0,"request_group":0}]},"name":"TestComponent","sort_key":0,"is_active":true}],"versions":[{"name":"unspecified","sort_key":0,"is_active":true}],"milestones":[{"name":"---","sort_key":0,"is_active":true}]}},"parameters":{"allowemailchange":"1","attachment_base":"","commentonchange_resolution":"0","commentonduplicate":"0","cookiepath":"/","defaultopsys":"","defaultplatform":"","defaultpriority":"---","defaultseverity":"enhancement","duplicate_or_move_bug_status":"RESOLVED","emailregexpdesc":"A legal address must contain exactly one \u0027@\u0027, and at least one \u0027.\u0027 after the @.","emailsuffix":"","letsubmitterchoosemilestone":"1","letsubmitterchoosepriority":"1","mailfrom":"bugzilla-daemon","maintainer":"admin@mylyn.eclipse.org","maxattachmentsize":"1000","maxlocalattachment":"0","musthavemilestoneonaccept":"0","noresolveonopenblockers":"0","password_complexity":"no_constraints","rememberlogin":"on","requirelogin":"0","search_allow_no_criteria":"1","urlbase":"http://dummy.url/","use_see_also":"1","useclassification":"0","usemenuforusers":"0","useqacontact":"1","usestatuswhiteboard":"1","usetargetmilestone":"1"}} \ No newline at end of file diff --git a/org.eclipse.mylyn.releng/multipass/inventory.yml b/org.eclipse.mylyn.releng/multipass/inventory.yml index de01a8c20b..1b80016000 100644 --- a/org.eclipse.mylyn.releng/multipass/inventory.yml +++ b/org.eclipse.mylyn.releng/multipass/inventory.yml @@ -1,6 +1,6 @@ all: vars: - multipass_disk: 5G + multipass_disk: 10G multipass_memory: 1G multipass_cpus: 1 additional_launch_parms: '' From ef63dcf2bd38d6a88af5a76eb31c756abc4349d2 Mon Sep 17 00:00:00 2001 From: Frank Becker Date: Thu, 8 Aug 2024 21:39:10 +0200 Subject: [PATCH 5/5] fix: none CI Server and no fixtures --- .../org/eclipse/mylyn/commons/sdk/util/TestConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/TestConfiguration.java b/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/TestConfiguration.java index 6e6eebf7e4..7fe5a4978a 100644 --- a/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/TestConfiguration.java +++ b/mylyn.commons/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/TestConfiguration.java @@ -130,7 +130,7 @@ public List discover(Class clazz, String fixtureType, boolean defaultO defaultOnly, exception); } - if (fixtures.isEmpty()) { + if (fixtures.isEmpty() && CommonTestUtil.runOnCIServerTestsOnly()) { throw new RuntimeException( NLS.bind("Failed to discover any fixtures for kind {0} with defaultOnly={1} ({2} and {3})", new Object[] { fixtureType, Boolean.toString(defaultOnly), URL_SERVICES_LOCALHOST,