-
-
Notifications
You must be signed in to change notification settings - Fork 34
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 a Makefile
to automate common command-line tasks
#436
base: dev
Are you sure you want to change the base?
Conversation
## Files added: - add new file `Makefile` - add new file `Makefile.assets.mk` - add new file `Makefile.server.mk` - add remote file [`Makefile.semver.mk`](https://github.com/g3w-suite/makefiles/Makefile.semver.mk) - add remote file [`Makefile.venv.mk`](https://github.com/g3w-suite/makefiles/Makefile.venv.mk) ## Deprecated files - `ci_scripts/build_suite.sh` (ref: `make g3w-admin/core/static/bower_components`) - `ci_scripts/run_env_development.sh` (ref: `make run-docker`) - `ci_scripts/setup_suite.sh` (ref: `make setup-suite`) - `pavement.py` (ref. `make install` and `make runserver`) - `run_docker_tests.sh` (ref: `make tests`) ## TODO: - find out how to remove `gulpfile.js` dependency (ref: `make build-assets`) - figure out what happened to the following file: `ci_scripts/Dockerfile.local-develpment-ubuntu-2004.dockerfile` (ref: `make build-docker` and `make run-docker`) - update / remove `ci_scripts/README.md` - add / update contributing section within `README.md` - do some additional in-depth testing on all the docker related scripts (eg. `make tests`)
make tests \ | ||
q=${{ matrix.qgis_version }} \ | ||
mode=test \ | ||
DOCKER_COMPOSE="docker-compose -f docker-compose.${{ matrix.qgis_version }}.yml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently the automated tests are run on the Ubuntu 20.04 runner image:
g3w-admin/.github/workflows/test_runner.yml
Lines 7 to 9 in 10f48f8
ci_tests: | |
runs-on: ubuntu-20.04 |
As per actions/runner-images/images/linux/Ubuntu2004-Readme.md, the docker compose
(v2) is installed, so why we can't just use that instead of docker-compose
(v1)?
Docker Amazon ECR Credential Helper 0.6.0
Docker Compose v1 1.29.2
Docker Compose v2 2.14.0+azure-1
Docker-Buildx 0.9.1
Docker-Moby Client 20.10.21+azure-2
Docker-Moby Server 20.10.21+azure-2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docker Compose v1 1.29.2
Docker Compose v2 2.14.0+azure-1
This happens because some of these packets are available for GitHub Actions or Azure DevOps (that's why Docker Compose v2 2.14.0+azure-1
is only available for Azure V1 pipelines)
Ref: runner-images#faqs
runner-images/images/linux/scripts/installers/docker-compose.sh
#!/bin/bash -e
################################################################################
## File: docker-compose.sh
## Desc: Installs Docker Compose
################################################################################
# Install docker-compose v1 from releases
URL="https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64"
curl -L $URL -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
invoke_tests "Tools" "Docker-compose v1"
runner-images/images/win/scripts/Installers/Install-Docker.ps1
Write-Host "Install-Package Docker-Compose v1"
Choco-Install -PackageName docker-compose
Write-Host "Install-Package Docker-Compose v2"
$dockerComposev2Url = "https://github.com/docker/compose/releases/latest/download/docker-compose-windows-x86_64.exe"
$cliPluginsDir = "C:\ProgramData\docker\cli-plugins"
New-Item -Path $cliPluginsDir -ItemType Directory
Start-DownloadWithRetry -Url $dockerComposev2Url -Name docker-compose.exe -DownloadPath $cliPluginsDir
List of changes:
Added files:
Makefile
*Makefile.assets.mk
Makefile.tasks.mk
Makefile.semver.mk
(not included in VCS, remotely downloaded) *Makefile.venv.mk
(not included in VCS, remotely downloaded) ** additional implementation notes: g3w-suite/makefiles
Deprecated files:
ci_scripts/build_suite.sh
replaced by:make g3w-admin/core/static/bower_components
ci_scripts/run_env_development.sh
replaced by:make run-docker
ci_scripts/setup_suite.sh
replaced by:make setup-suite
pavement.py
replaced by:make install
andmake runserver
run_docker_tests.sh
replaced by:make tests
Refer to the
Makefile.assets.mk
andMakefile.tasks.mk
files for more information about these deprecated filesTODO:
gulpfile.js
dependency (ref:make build-assets
)ci_scripts/Dockerfile.local-develpment-ubuntu-2004.dockerfile
(ref:make build-docker
andmake run-docker
)ci_scripts/README.md
README.md
make tests
).github/workflows/test_runner.yml
file in order to use make tasksmake killserver
task in order to replace thepaver kill
task (frompavement.py
) or deprecate the background parameter inside themake runserver [ foreground = "set any value to disable background" ]
Makefile.venv.mk
)Makefile.tasks.mk
(eg. addingexport PATH := $(VENV_BIN):$(PATH)
before declaringPYTHON
andPIP
variables ? ref: httpie/Makefile#L13-L22)Closes: #431
Related to: #419, #434, #380, #373