Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch 1 #2

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
- fix precommit issues
- **client.py**: bump timeout to one hour

## v1.3.4 (2025-05-25)

### Fix

- **action.yml**: Add default value for _polling_interval_ so it won't take default value as String

## v1.3.3 (2023-05-15)

### Fix
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
action.yml: Add default value for polling_interval so it won't take default value as String
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
polling_interval:
description: 'Interval to poll for result'
required: false
default: 15

runs:
image: "Dockerfile"
Expand Down
4 changes: 2 additions & 2 deletions jenkins_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def list_jobs(self) -> list:
job_names_list = [item[0] for item in self._jenkins.items()]
return job_names_list

def start_job(self, job_name: str, params: dict = None, wait_for_result: bool = True, job_poll_interval: int = 20):
def start_job(self, job_name: str, params: dict = None, wait_for_result: bool = True, job_poll_interval = 20):
"""Start a job and poll it until it's over or timed out."""
if params is not None and type(params) is not dict:
print(type(params))
Expand Down Expand Up @@ -100,7 +100,7 @@ def _poll_build_for_status(self, build: Build, job_poll_interval):
sys.exit(1)
else:
logging.info(
f"{time.ctime()} | Job: {build.job.name} | Status: The job is still running. Polling again in {self.job_poll_interval} secs"
f"{time.ctime()} | Job: {build.job.name} | Status: The job is still running. Polling again in {job_poll_interval} secs"
)

cur_epoch = int(time.time())
Expand Down