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

fix(1839): Pass timeout value from build config to container #36

Merged
merged 1 commit into from
Jan 16, 2020

Conversation

pritamstyz4ever
Copy link
Contributor

Context

The timeout annotations set by user for a job is not being passed to the container currently and it uses the default timeout.

Objective

This PR will parse the annotations for timeout value or use default timeout and pass to the container for timeout to work correctly

License

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@@ -129,6 +129,9 @@ class DockerExecutor extends Executor {
const piecesParts = imageParser(config.container);
let buildTag = piecesParts.tag;
let buildImage = piecesParts.name;
const buildTimeout = hoek.reach(config, 'annotations>screwdriver.cd/timeout',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use this function to grab the value from annotations https://github.com/screwdriver-cd/executor-base/blob/master/index.js#L198

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use this function to grab the value from annotations https://github.com/screwdriver-cd/executor-base/blob/master/index.js#L198

doesn't seem generic, the function parses all annotations. Will probably need to write another helper function which can take a key

@tkyi tkyi changed the title Pass timeout value from build config to container fix(1839): Pass timeout value from build config to container Jan 16, 2020
@pritamstyz4ever pritamstyz4ever merged commit 8317a17 into master Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants