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

Configurable tf file path #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Configurable tf file path #3

wants to merge 2 commits into from

Conversation

lajoie
Copy link

@lajoie lajoie commented Jan 14, 2017

This allows configuring the directory into which the TF files are stored. See JENKINS-40867

Copy link
Member

@dpires dpires left a comment

Choose a reason for hiding this comment

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

Overriding the default working directory is fine, I would just like to leave the default to terraform-plugin if you don't set an ENV for it.

private FilePath stateFile;
private FilePath configFile;
private FilePath variablesFile;
private FilePath workspacePath;
private FilePath workingDirectory;

private static final String WORK_DIR_NAME = "terraform-plugin";
//private static final String WORK_DIR_NAME = "terraform-plugin";
Copy link
Member

Choose a reason for hiding this comment

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

this should be left as a default, as without setting an explicit directory for workDir, files are written to your workspace


workingDirectory = new FilePath(workDirHandle);
} else {
workingDirectory = new FilePath(build.getWorkspace(), interpretedWorkDir);
Copy link
Member

Choose a reason for hiding this comment

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

without workDir set, the default should be WORK_DIR_NAME

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