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

Fixes jibExportDockerContext Input vs. OutputDirectory and changes CLI option to --targetDir. #499

Merged
merged 3 commits into from
Jul 3, 2018
Merged
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
2 changes: 2 additions & 0 deletions jib-gradle-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ All notable changes to this project will be documented in this file.

### Fixed

- Set `jibExportDockerContext` output directory with command line option `--targetDir` ([#499](https://github.com/GoogleContainerTools/jib/pull/499))

## 0.9.1

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,22 @@ public FileCollection getInputFiles() {
}

/**
* @return the output directory for the Docker context is by default {@code build/jib-docker-
* context}.
* The output directory to check for task up-to-date.
*
* @return the output directory
*/
@Input
@OutputDirectory
public String getOutputDirectory() {
return getTargetDir();
}

/**
* Returns the output directory for the Docker context. By default, it is {@code
* build/jib-docker-context}.
*
* @return the output directory
*/
@Input
public String getTargetDir() {
if (targetDir == null) {
return getProject().getBuildDir().toPath().resolve("jib-docker-context").toString();
Expand All @@ -85,11 +96,11 @@ public String getTargetDir() {
}

/**
* The output directory can be overriden with the {@code --jib.dockerDir} command line option.
* The output directory can be overriden with the {@code --targetDir} command line option.
*
* @param targetDir the output directory.
*/
@Option(option = "jib.dockerDir", description = "Directory to output the Docker context to")
@Option(option = "targetDir", description = "Directory to output the Docker context to")
public void setTargetDir(String targetDir) {
this.targetDir = targetDir;
}
Expand Down