diff --git a/.github/workflows/4testing-build.yml b/.github/workflows/4testing-build.yml index def1e2c..138cd30 100644 --- a/.github/workflows/4testing-build.yml +++ b/.github/workflows/4testing-build.yml @@ -1,5 +1,14 @@ ### This workflow setup instance then build and push images ### name: 4testing multiarch-build +run-name: >- + Build #${{ inputs.build }} [ + ${{ inputs.amd64 && 'AMD64' || '-' }} + ${{ inputs.arm64 && 'ARM64' || '-' }} + ] [ + ${{ inputs.community && 'CE' || '-' }} + ${{ inputs.developer && 'DE' || '-' }} + ${{ inputs.enterprise && 'EE' || '-' }} + ] on: workflow_dispatch: @@ -92,6 +101,7 @@ jobs: password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - name: Build 4testing + id: build-ds run: | set -eux @@ -136,4 +146,29 @@ jobs: docker buildx bake -f docker-bake.hcl ${{ matrix.image }} --push echo "DONE: Build success" + + ### Set output for Zap scanner + ### NOTE: Output will be used only in release/hotfix branches + + echo "version=${TAG}" >> "$GITHUB_OUTPUT" + echo "branch=${BRANCH_NAME}" >> "$GITHUB_OUTPUT" shell: bash + + # Run scanner only when edition is community + # and branch hit release/ or hotfix/ + - name: Trigger zap manualy + if: >- + matrix.edition == 'community' && + (startsWith(steps.build-ds.outputs.branch, 'release/') || + startsWith(steps.build-ds.outputs.branch, 'hotfix/')) + env: + VERSION: ${{ steps.build-ds.outputs.version }} + BRANCH: ${{ steps.build-ds.outputs.branch }} + GITHUB_TOKEN: ${{ secrets.TOKEN }} + run: | + gh workflow run zap-ds.yaml \ + --repo ${{ github.repository }} \ + -f branch=${BRANCH} \ + -f version=${VERSION} + shell: bash + diff --git a/.github/workflows/stable-build.yml b/.github/workflows/stable-build.yml index 9a19768..fd493f3 100644 --- a/.github/workflows/stable-build.yml +++ b/.github/workflows/stable-build.yml @@ -1,5 +1,6 @@ ### This workflow setup instance then build and push images ### name: Multi-arch build stable +run-name: ${{ inputs.tag }} (${{ inputs.release_number }}) on: workflow_dispatch: diff --git a/.travis.yml b/.travis.yml index 084cddc..2e37ca6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,23 +32,23 @@ env: SSL_KEY_PATH: /var/www/onlyoffice/Data/certs/mycert.key + # postgresql 16 + - config: postgres.yml + POSTGRES_VERSION: 16 + + # postgresql 15 + - config: postgres.yml + POSTGRES_VERSION: 15 + + # postgresql 14 + - config: postgres.yml + POSTGRES_VERSION: 14 + + # postgresql 13 + - config: postgres.yml + POSTGRES_VERSION: 13 + # postgresql 12 - - config: postgres.yml - POSTGRES_VERSION: 12 - - # postgresql 11 - - config: postgres.yml - POSTGRES_VERSION: 11 - - # postgresql 10 - - config: postgres.yml - POSTGRES_VERSION: 10 - - # postgresql 9 - - config: postgres.yml - POSTGRES_VERSION: 9 - - # postgresql 9.5 - config: postgres.yml # postgresql custom values diff --git a/Dockerfile b/Dockerfile index 5df4ece..499e72d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,7 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ apt-utils \ bomstrip \ certbot \ + cron \ curl \ htop \ libasound2 \ diff --git a/Makefile b/Makefile index 546e5cc..bb80cde 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,6 @@ BUILD_CHANNEL ?= nightly ONLYOFFICE_VALUE ?= onlyoffice COMPANY_NAME_LOW = $(shell echo $(COMPANY_NAME) | tr A-Z a-z) -COMPANY_NAME_ESC = $(subst -,,$(COMPANY_NAME_LOW)) PACKAGE_NAME := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME)$(PRODUCT_EDITION) PACKAGE_VERSION ?= $(PRODUCT_VERSION)-$(BUILD_NUMBER)~stretch @@ -20,7 +19,8 @@ else DOCKER_TAG := $(PRODUCT_VERSION).$(BUILD_NUMBER)-$(subst /,-,$(GIT_BRANCH)) endif -DOCKER_IMAGE := $(COMPANY_NAME_ESC)/4testing-$(PRODUCT_NAME)$(PRODUCT_EDITION) +DOCKER_ORG ?= $(COMPANY_NAME_LOW) +DOCKER_IMAGE := $(DOCKER_ORG)/4testing-$(PRODUCT_NAME)$(PRODUCT_EDITION) DOCKER_DUMMY := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME)$(PRODUCT_EDITION)__$(DOCKER_TAG).dummy DOCKER_ARCH := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME)_$(DOCKER_TAG).tar.gz diff --git a/docker-compose.yml b/docker-compose.yml index 51fafb2..6d92501 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,7 +41,7 @@ services: onlyoffice-postgresql: container_name: onlyoffice-postgresql - image: postgres:9.5 + image: postgres:12 environment: - POSTGRES_DB=onlyoffice - POSTGRES_USER=onlyoffice diff --git a/run-document-server.sh b/run-document-server.sh index 5883e27..99b580c 100644 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -3,7 +3,10 @@ umask 0022 function clean_exit { - /usr/bin/documentserver-prepare4shutdown.sh + if [ ${ONLYOFFICE_DATA_CONTAINER} == "false" ] && \ + [ ${ONLYOFFICE_DATA_CONTAINER_HOST} == "localhost" ]; then + /usr/bin/documentserver-prepare4shutdown.sh + fi } trap clean_exit SIGTERM diff --git a/tests/postgres.yml b/tests/postgres.yml index 8333b10..bb0b418 100644 --- a/tests/postgres.yml +++ b/tests/postgres.yml @@ -20,7 +20,7 @@ services: onlyoffice-postgresql: container_name: onlyoffice-postgresql - image: postgres:${POSTGRES_VERSION:-9.5} + image: postgres:${POSTGRES_VERSION:-12} environment: - POSTGRES_DB=${POSTGRES_DB:-onlyoffice} - POSTGRES_USER=${POSTGRES_USER:-onlyoffice}