diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c27d270..7719d371 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,14 @@ All notable changes to Pipelines will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [unreleased] +## [0.0.5] - 2018-01-29 ### Added - Docker environment variables options: `-e`, `--env` for variables and `--env-file` for files - Composer "ci" script to integrate continuously - `--no-keep` option to never keep containers, even on error +### Changed +- Default `--deploy` mode is now `copy`, was `mount` previously ### Fixed - Image name validation - Image as a section diff --git a/README.md b/README.md index bbb555cb..b0821998 100644 --- a/README.md +++ b/README.md @@ -53,17 +53,21 @@ or `--file ` option and/or set the working directory `--working-dir ` in which the file is looked for unless an absolute path is set by `--file `. -By default it operates on the current working tree which is mounted -directly into the container (implicit `--deploy mount`). +By default it operates on the current working tree which is +copied into the container to isolate running the pipeline from +the working directory by default (implicit `--deploy copy`). -Isolate files by copying them into the container instead of the -mount by using `--deploy copy`. This requires `docker copy` with -the `-a` / `--archive` option (since docker 17.06). +This requires `docker copy` with the `-a` / `--archive` option +(since docker 17.06). + +Alternatively the working directory can be mounted into the +pipelines container by using `--deploy mount`. Use `--keep` flag to keep containers after the pipeline has finished for further inspection. By default all containers are destroyed on successful pipeline step execution and kept in -case of error. +case of error. The `--no-keep` flag prevents keeping of +containers even in case of error. Manage leftover containers with `--docker-list` showing all pipeline containers, `--docker-kill` to kill running containers diff --git a/src/Utility/App.php b/src/Utility/App.php index 40e9c629..1789afdf 100644 --- a/src/Utility/App.php +++ b/src/Utility/App.php @@ -95,14 +95,14 @@ private function showHelp() default is 'bitbucket-pipelines.yml' --deploy mount|copy how files from the working directory are placed into the pipeline container: - mount (default) the working dir is - mounted. fastest, no isolation - copy working directory is copied - into the container. slower, + copy (default) working dir is + copied into the container. stronger isolation as the pipeline scripts can change all files without side-effects in the working directory + mount the working directory is + mounted. fastest, no isolation -e, --env pass or set an environment variables for the docker container --env-file pass variables from environment file @@ -310,7 +310,7 @@ public function run() $noRun = $args->hasOption('no-run'); - $deployMode = $args->getOptionArgument('deploy', 'mount'); + $deployMode = $args->getOptionArgument('deploy', 'copy'); if (!in_array($deployMode, array('mount', 'copy'))) { $this->error(sprintf("pipelines: unknown deploy mode '%s'\n", $deployMode)); return 1;