Skip to content
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
6 changes: 0 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,5 @@ indent_size = 2
[*.php]
indent_size = 4

[DOCKER_REPOSITORY]
insert_final_newline = false

[DOCKER_TAG_LATEST]
insert_final_newline = false

[BLACKLIST]
insert_final_newline = false
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ jobs:
name: 'run structure-test'
run: |-
cd tests/structure-test
/usr/local/bin/container-structure-test test --image ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}-alpine --config base-app/test.yaml --config base-app/alpine/test.yaml
/usr/local/bin/container-structure-test test --image ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}-alpine --config base-app/test.yaml
-
if: "${{github.ref == 'refs/heads/master'}}"
name: 'Login to ghcr.io'
Expand Down Expand Up @@ -475,7 +475,7 @@ jobs:
name: 'run structure-test'
run: |-
cd tests/structure-test
/usr/local/bin/container-structure-test test --image ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-alpine --config base/test.yaml --config base/alpine/test.yaml
/usr/local/bin/container-structure-test test --image ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-alpine --config base/test.yaml
-
if: "${{github.ref == 'refs/heads/master'}}"
name: 'Login to ghcr.io'
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
*.log
*.pyc
.doit.db
/graph
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| `docker/<image>/<tag>/Dockerfile.jinja2` | Per-image template (source) |
| `provisioning/` | Scripts and configuration files copied into the images (source); `conf/provision.yml` says which go where |
| `docker/<image>/<tag>/Dockerfile`, `docker/<image>/<tag>/conf/` | Generated by `make provision`, never edited by hand |
| `bin/` | Old Python 2 tools behind `make provision` and the other Makefile targets |
| `bin/` | Old Python 2 tools behind `make provision` |
| `ci/` | PHP generator for `.github/workflows/build.yaml` (`ci/console github:generate-ci`) |
| `tests/` | serverspec (Ruby) and container-structure-test definitions run by the CI |
| `docs/` | User documentation |
Expand All @@ -23,7 +23,7 @@ Only these commands are known to work:
- `docker build -t webdevops/<image>:<tag> docker/<image>/<tag>` builds one image; its parent and `webdevops/toolbox` come from local images or Docker Hub.
- `./build-local.sh [version]` builds all PHP images of one version.

The other Makefile targets need Python 2. Apart from `provision` and `graph` inside `webdevops/dockerfile-build-env`, they do not work; `make test` fails there too (see `docs/known-issues.md`). The CI runs serverspec and container-structure-test for every image; to check a change by hand, start the image and try it as described below.
Besides `provision`, the Makefile has `structure-test` and `setup`, which the `webdevops/dockerfile-build-env` image runs while it is built. `make structure-test` runs container-structure-test against your local images of `bootstrap`, `base`, `base-app`, `php`, `php-dev` and `php-nginx`, the images that have a suite in `tests/structure-test`. It tests only the tags in `.github/workflows/build.yaml` and fails if a test fails, if `docker` fails or if no such image exists locally; run it inside `webdevops/dockerfile-build-env` with the Docker socket mounted. The CI runs serverspec for every image except `toolbox` and `dockerfile-build-env`, and container-structure-test for the six images above; to check a change by hand, start the image and try it as described below.

## Keep the documentation up to date

Expand Down
41 changes: 2 additions & 39 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,59 +1,22 @@
ARGS = $(filter-out $@,$(MAKECMDGOALS))
MAKEFLAGS += --silent
.PHONY: test provision

DOCKER_REPOSITORY=`cat DOCKER_REPOSITORY`
DOCKER_TAG_LATEST=`cat DOCKER_TAG_LATEST`
.PHONY: list setup requirements structure-test provision

list:
sh -c "echo; $(MAKE) -p no_targets__ |\
sh -c "echo; $(MAKE) -p no_targets__ 2>/dev/null |\
awk -F':' '/^[a-zA-Z0-9][^\$$#\\t=]*:([^=]|$$)/ {split(\$$1,A,/ /);\
for(i in A)print A[i]}' | \
grep -v '__\$$\|Makefile\|%' | \
sort"

full: provision build

all: build

build:
python2 ./bin/console docker:build --threads=auto

bootstrap: webdevops/bootstrap webdevops/ansible
base: webdevops/base webdevops/base-app

php: webdevops/php webdevops/php-apache webdevops/php-nginx
php-dev: webdevops/php-dev webdevops/php-apache-dev webdevops/php-nginx-dev
hhvm: webdevops/hhvm webdevops/hhvm-apache webdevops/hhvm-nginx

web: webdevops/apache webdevops/apache-dev webdevops/nginx webdevops/nginx-dev webdevops/varnish webdevops/certbot

applications: webdevops/typo3 webdevops/piwik

misc: webdevops/mail-sandbox webdevops/sphinx webdevops/liquibase

setup: requirements

requirements:
pip install --upgrade -I -r ./bin/requirements.txt
cd tests/serverspec && bundle install --path=vendor

test:
python2 bin/console test:serverspec --threads=auto -v

structure-test:
cd tests/structure-test && ./run.sh

provision:
python2 bin/console generate:dockerfile
python2 bin/console generate:provision

push:
python2 ./bin/console docker:push --threads=auto

graph:
python2 ./bin/console generate:graph

graph-full:
python2 ./bin/console generate:graph --all\
--filename docker-image-full-layout.gv
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ Build all PHP images of one version (default `8.5`), in the order they depend on
./build-local.sh 8.4
```

Then try an image with the quick start above. `make test` and the other Makefile targets that call `bin/console` need Python 2;
only `make provision` and `make graph` still work, inside `webdevops/dockerfile-build-env`. See [Known issues](docs/known-issues.md#build-tools).
Then try an image with the quick start above. `make provision` calls `bin/console`, which needs Python 2;
run it inside `webdevops/dockerfile-build-env`. See [Known issues](docs/known-issues.md#build-tools).

### PHP extension builds

Expand Down
248 changes: 0 additions & 248 deletions bin/command/generate_graph_command.py

This file was deleted.

3 changes: 0 additions & 3 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ from command.docker_exec_command import DockerExecCommand
from command.test_testinfra_command import TestTestinfraCommand
from command.test_serverspec_command import TestServerspecCommand
from command.generate_dockerfile_command import GenerateDockerfileCommand
from command.generate_graph_command import GenerateGraphCommand
from command.generate_provision_command import GenerateProvisionCommand

if __name__ == '__main__':
Expand Down Expand Up @@ -63,7 +62,6 @@ if __name__ == '__main__':
'dockerPath',
'templatePath',
'provisionPath',
'imagePath',
'baselayoutPath',
'testinfraPath',
'serverspecPath',
Expand Down Expand Up @@ -98,7 +96,6 @@ if __name__ == '__main__':
application.add(TestTestinfraCommand(configuration=configuration))
application.add(TestServerspecCommand(configuration=configuration))
application.add(GenerateDockerfileCommand(configuration=configuration))
application.add(GenerateGraphCommand(configuration=configuration))
application.add(GenerateProvisionCommand(configuration=configuration))

application.run()
Loading
Loading