-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from phpcfdi/revision-3.0.1-1
Mejoras en la integración contínua y pruebas (versión 3.0.1)
- Loading branch information
Showing
22 changed files
with
302 additions
and
72 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phive xmlns="https://phar.io/phive"> | ||
<phar name="php-cs-fixer" version="^3.51.0" installed="3.51.0" location="./tools/php-cs-fixer" copy="false"/> | ||
<phar name="phpcs" version="^3.9.0" installed="3.9.0" location="./tools/phpcs" copy="false"/> | ||
<phar name="phpcbf" version="^3.9.0" installed="3.9.0" location="./tools/phpcbf" copy="false"/> | ||
<phar name="phpstan" version="^1.10.60" installed="1.10.60" location="./tools/phpstan" copy="false"/> | ||
<phar name="composer-normalize" version="^2.42.0" installed="2.42.0" location="./tools/composer-normalize" copy="false"/> | ||
<phar name="php-cs-fixer" version="^3.64.0" installed="3.64.0" location="./tools/php-cs-fixer" copy="false"/> | ||
<phar name="phpcs" version="^3.10.2" installed="3.10.2" location="./tools/phpcs" copy="false"/> | ||
<phar name="phpcbf" version="^3.10.2" installed="3.10.2" location="./tools/phpcbf" copy="false"/> | ||
<phar name="phpstan" version="^1.12.3" installed="1.12.3" location="./tools/phpstan" copy="false"/> | ||
<phar name="composer-normalize" version="^2.43.0" installed="2.43.0" location="./tools/composer-normalize" copy="false"/> | ||
</phive> |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,25 @@ | ||
FROM debian:bookworm | ||
FROM php:8.3-cli-alpine | ||
|
||
COPY . /opt/sat-pys-scraper/ | ||
COPY . /opt/sat-pys-scraper | ||
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer | ||
|
||
# install dependencies for php modules | ||
RUN set -e \ | ||
&& export DEBIAN_FRONTEND=noninteractive \ | ||
# Update debian base system | ||
&& apt-get update -y \ | ||
&& apt-get dist-upgrade -y \ | ||
# Install repository PHP from Ondřej Surý | ||
&& apt-get install -y lsb-release ca-certificates curl \ | ||
&& curl --no-progress-meter https://packages.sury.org/php/apt.gpg --output /etc/apt/trusted.gpg.d/php.gpg \ | ||
&& echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list \ | ||
&& apt-get update -y \ | ||
&& apt-get dist-upgrade -y \ | ||
# Install required packages | ||
&& apt-get install -y \ | ||
unzip git \ | ||
php-cli php-curl php-zip php-xml \ | ||
# Clean APT | ||
&& rm -rf /var/lib/apt/lists/* | ||
&& apk add git libzip-dev \ | ||
&& docker-php-ext-install zip | ||
|
||
# set up php | ||
RUN set -e \ | ||
# Set up PHP | ||
&& find /etc/php/ -type f -name "*.ini" -exec sed -i 's/^variables_order.*/variables_order=EGPCS/' "{}" \; \ | ||
&& mv /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini \ | ||
&& sed -i 's/^variables_order.*/variables_order=EGPCS/' /usr/local/etc/php/php.ini \ | ||
&& php -i | ||
|
||
# build project | ||
RUN set -e \ | ||
# Install composer | ||
&& curl --progress-bar https://getcomposer.org/download/latest-stable/composer.phar --output /usr/local/bin/composer \ | ||
&& chmod +x /usr/local/bin/composer \ | ||
&& export COMPOSER_ALLOW_SUPERUSER=1 \ | ||
&& (composer diagnose --no-interaction || true) | ||
|
||
RUN set -e \ | ||
&& rm -r -f /opt/sat-pys-scraper/composer.lock /opt/sat-pys-scraper/vendor \ | ||
&& composer update --working-dir=/opt/sat-pys-scraper --no-dev --prefer-dist --optimize-autoloader --no-interaction \ | ||
&& rm -rf "$(composer config cache-dir --global)" "$(composer config data-dir --global)" "$(composer config home --global)" | ||
|
||
ENV TZ="America/Mexico_City" | ||
|
||
ENTRYPOINT ["/usr/bin/php", "/opt/sat-pys-scraper/bin/sat-pys-scraper"] | ||
ENTRYPOINT ["/usr/local/bin/php", "/opt/sat-pys-scraper/bin/sat-pys-scraper"] |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace PhpCfdi\SatPysScraper\Exceptions; | ||
|
||
use RuntimeException; | ||
|
||
class HttpException extends RuntimeException implements PysException | ||
{ | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace PhpCfdi\SatPysScraper\Exceptions; | ||
|
||
class HttpServerException extends HttpException | ||
{ | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace PhpCfdi\SatPysScraper\Exceptions; | ||
|
||
interface PysException | ||
{ | ||
} |
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
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
Oops, something went wrong.