Skip to content

Commit

Permalink
Update README & add CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
iainsmith committed Apr 24, 2020
1 parent f8a31ee commit 20a0768
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.3.0] - 2020-04-24

### Added

- `swift docker test --seed-build-foler` - Copy the current .build folder to the container volume
- `swift docker test --clean` - Delete and re create the .build folder in the container volume

### Changed
- swift docker test no longer builds an image to run the tests. Instead it:
- uses a bind mount to sync the source code between the host and the container
- create/re-uses a docker volume for the .build folder

### Removed
- Documentation for docker build
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,18 @@ git clone https://github.com/jpsim/Yams.git # Clone an example package
cd Yams && swift test # Run the tests on your machine
swift docker test # Run the tests in a container
swift docker test --swift 5.1 # Check if the tests pass on swift 5.1
swift docker cleanup # Delete the docker image you just created
swift docker write-dockerfile # Write a ./Dockerfile to the repo
```

## Features

* [x] Test swift packages in one command `swift docker test`
* [x] Use custom images - `swift docker test --image vapor/swift:latest`
* [x] Build a docker image for your project - `swift docker build`
* [x] Quickly free up space - `swift docker cleanup`
* [x] Create a dockerfile for your project
* [ ] Prevent duplicate builds
* [ ] Automatically create a .dockerignore file
* [x] Cached builds using docker volumes
* [x] Use a mix of docker volumes & bind mounts for fast, small builds.
* [ ] Create a .dockerignore file to avoid adding .git directory to the image
* [ ] Support multistage slim builds
* [ ] Log output to a file
* [ ] cmake build for running on Windows
Expand Down Expand Up @@ -77,7 +76,6 @@ examples:
swift docker test #test the package in the current directory
swift docker test --swift 5.1 # test your package against swift:5.1
swift docker test --path ~/code/my-package # test a package in a directory
swift docker build --swift 5.2.2 --tag username/package:1.0
swift docker write-dockerfile --swift 5.2.2-slim
swift docker cleanup # Remove all images created with swift docker test

Expand All @@ -88,7 +86,6 @@ OPTIONS:

SUBCOMMANDS:
test Test your swift package in a docker container.
build Build you swift package in a docker container.
cleanup Remove temporary docker images.
write-dockerfile Write a dockerfile to disk.
```
Expand All @@ -102,10 +99,7 @@ LABEL com.swiftdockercli.action="test/build"
LABEL com.swiftdockercli.folder="your-project-name"
```

Running `docker ps -a --filter label=com.swiftdockercli.action=test` will list all containers created by swift-docker test
Running `docker images --filter label=com.swiftdockercli.action=test` will list all images created by swift-docker test

This is how `swift docker cleanup` looks up images to delete.
Running `docker volume ls --filter label=com.swiftdockercli.action=test` will list volumes created by swift-docker test.

## Contributing

Expand Down

0 comments on commit 20a0768

Please sign in to comment.