add refresh_api to jenkinsfile
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
###############################################
|
||||
|
||||
- name: set up python venv
|
||||
when: not refresh_api | bool
|
||||
include_tasks: python_venv.yaml
|
||||
|
||||
- name: build python exe
|
||||
@ -14,6 +15,7 @@
|
||||
include_tasks: nssm.yaml
|
||||
|
||||
- name: set up scheduled task
|
||||
when: false
|
||||
include_tasks: update_task.yaml
|
||||
|
||||
...
|
||||
@ -1,19 +1,21 @@
|
||||
---
|
||||
- name: skip when refresh
|
||||
when: not refresh_api | bool
|
||||
block:
|
||||
- name: Copy CrystalDiskInfo archive
|
||||
ansible.windows.win_copy:
|
||||
src: /var/jenkins_home/ansible-files/programs/CrystalDiskInfo.zip
|
||||
dest: "{{ storage_api_root }}\\CrystalDiskInfo.zip"
|
||||
|
||||
- name: Copy CrystalDiskInfo archive
|
||||
ansible.windows.win_copy:
|
||||
src: /var/jenkins_home/ansible-files/programs/CrystalDiskInfo.zip
|
||||
dest: "{{ storage_api_root }}\\CrystalDiskInfo.zip"
|
||||
- name: Extract CrystalDiskInfo archive
|
||||
community.windows.win_unzip:
|
||||
src: "{{ storage_api_root }}\\CrystalDiskInfo.zip"
|
||||
dest: "{{ storage_api_root }}\\dist\\"
|
||||
|
||||
- name: Extract CrystalDiskInfo archive
|
||||
community.windows.win_unzip:
|
||||
src: "{{ storage_api_root }}\\CrystalDiskInfo.zip"
|
||||
dest: "{{ storage_api_root }}\\dist\\"
|
||||
|
||||
- name: Install nssm
|
||||
win_chocolatey:
|
||||
name: nssm
|
||||
state: present
|
||||
- name: Install nssm
|
||||
win_chocolatey:
|
||||
name: nssm
|
||||
state: present
|
||||
|
||||
- name: Install disk_api service
|
||||
community.windows.win_nssm:
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Create service working folder
|
||||
when: not refresh_api | bool
|
||||
ansible.windows.win_file:
|
||||
path: "{{ storage_api_root }}"
|
||||
state: directory
|
||||
@ -25,6 +26,7 @@
|
||||
dest: "{{ storage_api_root }}\\disk_service.py"
|
||||
|
||||
- name: install pyinstaller
|
||||
when: not refresh_api | bool
|
||||
win_shell: "{{ python_venv_bin }} -m pip install pyinstaller"
|
||||
|
||||
- name: compile binary
|
||||
@ -34,6 +36,7 @@
|
||||
chdir: "{{ storage_api_root }}"
|
||||
|
||||
- name: Open up port 5000
|
||||
when: not refresh_api | bool
|
||||
community.windows.win_firewall_rule:
|
||||
name: _ansible_python_disk_service
|
||||
description: "Firewall rule to allow traffic for Disk info API"
|
||||
|
||||
Reference in New Issue
Block a user