diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index 69189a0e..5598e9f7 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -123,6 +123,34 @@ jobs: tags: spryker/php-sdk:sprykerci-8.1 labels: SprykerCI + docker-sprykerci-82: + name: Build and push docker image for SprykerCI PHP 8.2 + runs-on: ubuntu-22.04 + needs: docker + steps: + # https://github.com/actions/checkout + - name: Checkout codebase + uses: actions/checkout@v2 + + # https://github.com/docker/login-action + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + # https://github.com/docker/build-push-action + - name: Build and push + id: docker_build + uses: docker/build-push-action@v3 + with: + context: . + file: ./infrastructure/sdk.sprykerci82.Dockerfile + platforms: linux/amd64 + push: true + tags: spryker/php-sdk:sprykerci-8.2 + labels: SprykerCI + installer: name: Create and publish Spryker SDK installer runs-on: ubuntu-22.04 @@ -160,7 +188,7 @@ jobs: trigger-sprykerci: name: Triggers SprykerCI post-release pipeline runs-on: ubuntu-22.04 - needs: [ docker-sprykerci-74, docker-sprykerci-80, docker-sprykerci-81, installer ] + needs: [ docker-sprykerci-74, docker-sprykerci-80, docker-sprykerci-81, docker-sprykerci-82, installer ] steps: - name: Trigger CI pipeline shell: bash diff --git a/infrastructure/sdk.sprykerci82.Dockerfile b/infrastructure/sdk.sprykerci82.Dockerfile new file mode 100644 index 00000000..58903742 --- /dev/null +++ b/infrastructure/sdk.sprykerci82.Dockerfile @@ -0,0 +1,79 @@ +ARG SPRYKER_PARENT_IMAGE=spryker/php:8.2 + +FROM ${SPRYKER_PARENT_IMAGE} AS application-production-dependencies + +USER root + +RUN apk update \ + && apk add --no-cache \ + curl \ + git \ + graphviz \ + nodejs \ + npm \ + rsync \ + && npm install -g npm@8.4.1 + +RUN git config --add --system safe.directory /project + +######################################## +# New Relic Extension +# It's already in the core image. +######################################## + +COPY infrastructure/newrelic/newrelic.ini /usr/local/etc/php/conf.d/90-newrelic.ini + +ARG SPRYKER_COMPOSER_MODE + +FROM application-production-dependencies AS application-production-codebase + +RUN chown spryker:spryker ${srcRoot} + +USER spryker +# Authorize SSH Host +RUN mkdir -p /home/spryker/.ssh && \ + chmod 0700 /home/spryker/.ssh && \ + ssh-keyscan github.com > /home/spryker/.ssh/known_hosts + +COPY --chown=spryker:spryker phpstan-bootstrap.php ${srcRoot}/phpstan-bootstrap.php +COPY --chown=spryker:spryker assets ${srcRoot}/assets +COPY --chown=spryker:spryker src ${srcRoot}/src +COPY --chown=spryker:spryker app ${srcRoot}/app +COPY --chown=spryker:spryker db ${srcRoot}/db +COPY --chown=spryker:spryker extension ${srcRoot}/extension +COPY --chown=spryker:spryker config ${srcRoot}/config +COPY --chown=spryker:spryker frontend ${srcRoot}/frontend +COPY --chown=spryker:spryker bin ${srcRoot}/bin +COPY --chown=spryker:spryker .env ${srcRoot}/.env +COPY --chown=spryker:spryker .env.prod ${srcRoot}/.env.prod +COPY --chown=spryker:spryker .env.sprykerci ${srcRoot}/.env.sprykerci +COPY --chown=spryker:spryker composer.json composer.lock package.json package-lock.json bootstrap.php phpstan-bootstrap.php ${srcRoot}/ + +COPY --chown=spryker:spryker infrastructure/newrelic/entrypoint.sh ${srcRoot}/entrypoint.sh +RUN chmod +x ${srcRoot}/entrypoint.sh + +WORKDIR ${srcRoot} + +ENV APP_ENV=sprykerci +ENV NRIA_ENABLE_PROCESS_METRICS=true + +RUN npm install + +RUN composer update \ + spryker/architecture-sniffer \ + laminas/laminas-config \ + laminas/laminas-servicemanager \ + laminas/laminas-stdlib \ + laminas/laminas-filter \ + laminas/laminas-code \ + --no-scripts --no-interaction + +RUN composer install --no-scripts --no-interaction --optimize-autoloader -vvv --no-dev + +RUN composer dump-env sprykerci + +RUN bin/console sdk:init:sdk -n + +RUN bin/console cache:clear --no-debug + +ENTRYPOINT ["/data/entrypoint.sh"]