-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add Makefile, use Docker for lint/test/CI #34
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also remove deprecated MAINTAINER instruction.
Since I plan to use this container also as the dev container, to run linters and tests inside it in the CI, having ENTRYPOINT is cumbersome when you want to execute any other command except clitest.
aureliojargas
force-pushed
the
makefile
branch
2 times, most recently
from
June 25, 2020 05:41
72042fd
to
b41713a
Compare
Instead of installing dependencies in both the local machine and in Travis runner, install everything inside the clitest Docker image: - Supported shells: bash, dash, mksh, zsh - Linter: checkbashisms The image size grew from ~40MB to ~60MB. Add a Makefile to isolate all the commands related to dev tasks such as running linters and tests. Note that by default all those tasks are run inside the clitest Docker container. To run them directly on the host, avoiding the container, unset the `docker_run` variable. Examples: make test-bash # test using container's bash make test-bash docker_run= # test using host's bash The CI configuration (Travis) was updated to avoid installing dependencies and to run make targets inside a freshly built Docker container. Also fixed the `COLUMNS` handling in the tests, so it is compatible with bash and mksh running inside the container.
aureliojargas
added a commit
that referenced
this pull request
Jun 29, 2020
In #34, development tools were added to the official clitest Docker image, making it both an end user image and a development environment. This was a bad idea. This commit separates them in two different images. - The official public clitest image was moved to a new repository: https://github.com/aureliojargas/clitest-docker. Now everything is automated and releasing a new clitest image to Docker Hub is just a matter of adding a git tag to that repository. Everything related to that image was removed from this repository. - The local development image remains here, named `clitest-dev` and described in the new `Dockerfile.dev` file. It does not have clitest inside it, it's just the development environment. When running the image, the current clitest code should be mounted inside it. In short, everything dev-related is here. After releasing a new clitest version (here), go to the other repository to make the official Docker image for it.
aureliojargas
added a commit
that referenced
this pull request
Jun 29, 2020
In #34, development tools were added to the clitest Docker image, making it both an end user image and a development environment. This was a bad idea. This commit separates them in two different images. - The public clitest image was moved to a new repository: https://github.com/aureliojargas/clitest-docker. Now everything is automated and releasing a new clitest image to Docker Hub is just a matter of adding a git tag to that repository. Everything related to that image was removed from this repository. - The local development image remains here, named `clitest-dev` and described in the new `Dockerfile.dev` file. It does not have clitest inside it, it's just the development environment. When running the image, the current clitest code should be mounted inside it. In short, everything dev-related is here. After releasing a new clitest version (here), go to the other repository to make the official Docker image for it.
aureliojargas
added a commit
that referenced
this pull request
Jun 30, 2020
In #34, development tools were added to the clitest Docker image, making it both an end user image and a development environment. This was a bad idea. This commit separates them in two different images. - The public clitest image was moved to a new repository: https://github.com/aureliojargas/clitest-docker. Now everything is automated and releasing a new clitest image to Docker Hub is just a matter of adding a git tag to that repository. Everything related to that image was removed from this repository. - The local development image remains here, named `clitest-dev` and described in the new `Dockerfile.dev` file. It does not have clitest inside it, it's just the development environment. When running the image, the current clitest code should be mounted inside it. In short, everything dev-related is here. After releasing a new clitest version (here), go to the other repository to make the official Docker image for it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead of installing dependencies in both the local machine and in
Travis runner, install everything inside the clitest Docker image:
Also updated Alpine version from 3.7 to 3.11.
The image size grew from ~40MB to ~60MB.
The Docker container is not using ENTRYPOINT anymore, to make it easier
to run arbitrary commands inside it. So now you have to explicitly run
the clitest command.
Add a Makefile to isolate all the commands related to dev tasks such as
running linters and tests. Note that by default all those tasks are run
inside the clitest Docker container. To run them directly on the host,
avoiding the container, unset the
docker_run
variable. Examples:The CI configuration (Travis) was updated to avoid installing
dependencies and to run make targets inside a freshly built Docker
container.
Also fixed the
COLUMNS
handling in the tests, so it is compatible withbash and mksh running inside the container.