зеркало из https://github.com/nextcloud/cookbook.git
Merge pull request #1285 from nextcloud/maintenance/prepare-nc25
Update action scripts to prepare the NC 25 release
This commit is contained in:
Коммит
08e7930690
|
@ -9,6 +9,8 @@
|
||||||
<version>%%VERSION%%</version>
|
<version>%%VERSION%%</version>
|
||||||
<licence>agpl</licence>
|
<licence>agpl</licence>
|
||||||
<author mail="github@christian-wolf.click">Christian Wolf</author>
|
<author mail="github@christian-wolf.click">Christian Wolf</author>
|
||||||
|
<author mail="info@sebastianfey.de">Sebastian Fey</author>
|
||||||
|
<author mail="mail@marcelrobitaille.me">Marcel Robitaille</author>
|
||||||
<author mail="mrzapp@users.noreply.github.com">Jeppe Zapp</author>
|
<author mail="mrzapp@users.noreply.github.com">Jeppe Zapp</author>
|
||||||
<namespace>Cookbook</namespace>
|
<namespace>Cookbook</namespace>
|
||||||
<category>organization</category>
|
<category>organization</category>
|
||||||
|
|
|
@ -9,7 +9,7 @@ fi
|
||||||
|
|
||||||
deploy_path='.github/actions/deploy'
|
deploy_path='.github/actions/deploy'
|
||||||
|
|
||||||
stable_branch=stable
|
stable_branch=$(cat "$deploy_path/stable_name")
|
||||||
master_branch=master
|
master_branch=master
|
||||||
|
|
||||||
major=$(cat "$deploy_path/major")
|
major=$(cat "$deploy_path/major")
|
||||||
|
@ -79,8 +79,7 @@ git merge --no-ff $stable_branch
|
||||||
|
|
||||||
git remote add tokenized "https://nextcloud-cookbook-bot:$BOT_TOKEN@github.com/nextcloud/cookbook.git"
|
git remote add tokenized "https://nextcloud-cookbook-bot:$BOT_TOKEN@github.com/nextcloud/cookbook.git"
|
||||||
|
|
||||||
git -c "http.https://github.com/.extraheader=" push tokenized $stable_branch
|
git -c "http.https://github.com/.extraheader=" push tokenized $stable_branch $master_branch
|
||||||
git -c "http.https://github.com/.extraheader=" push tokenized $master_branch
|
|
||||||
git push origin "v$version"
|
git push origin "v$version"
|
||||||
|
|
||||||
echo "::set-output name=version::$version"
|
echo "::set-output name=version::$version"
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
stable
|
|
@ -37,4 +37,4 @@ if [ -n "$suffix" ]; then
|
||||||
version_arr="$version_arr, '-$suffix'"
|
version_arr="$version_arr, '-$suffix'"
|
||||||
fi
|
fi
|
||||||
sed "/VERSION_TAG/s@[[].*[]]@[$version_arr]@" -i lib/Controller/UtilApiController.php
|
sed "/VERSION_TAG/s@[[].*[]]@[$version_arr]@" -i lib/Controller/UtilApiController.php
|
||||||
git add lib/Controller/MainController.php
|
git add lib/Controller/UtilApiController.php
|
||||||
|
|
|
@ -41,6 +41,7 @@ runs:
|
||||||
if [ "${{ inputs.installUntested }}" = 'true' ]; then PARAM="$PARAM --install-untested"; fi &&
|
if [ "${{ inputs.installUntested }}" = 'true' ]; then PARAM="$PARAM --install-untested"; fi &&
|
||||||
if [ "${{ inputs.runCodeChecker }}" = 'true' ]; then PARAM="$PARAM --run-code-checker"; fi &&
|
if [ "${{ inputs.runCodeChecker }}" = 'true' ]; then PARAM="$PARAM --run-code-checker"; fi &&
|
||||||
cd .github/actions/run-tests &&
|
cd .github/actions/run-tests &&
|
||||||
|
sudo pip install -r requirements.txt &&
|
||||||
./run-locally.py
|
./run-locally.py
|
||||||
$PARAM
|
$PARAM
|
||||||
--pull
|
--pull
|
||||||
|
|
|
@ -23,12 +23,12 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
id: check
|
id: check
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=skip::false"
|
echo "skip=false" >> $GITHUB_OUTPUT
|
||||||
if [ -z "${{ secrets.DOCKER_HUB_TOKEN }}" ]; then
|
if [ -z "${{ secrets.DOCKER_HUB_TOKEN }}" ]; then
|
||||||
echo "::set-output name=skip::true"
|
echo "skip=true" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
if [ -z "${{ secrets.DOCKER_HUB_USERNAME }}" ]; then
|
if [ -z "${{ secrets.DOCKER_HUB_USERNAME }}" ]; then
|
||||||
echo "::set-output name=skip::true"
|
echo "skip=true" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Checkout the app
|
- name: Checkout the app
|
||||||
|
|
|
@ -4,7 +4,7 @@ name: Deploy to Appstore
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- stable
|
- stable*
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ jobs:
|
||||||
|
|
||||||
- name: Get the date
|
- name: Get the date
|
||||||
id: date
|
id: date
|
||||||
run: echo "::set-output name=date::$(date +%Y-%m-%d)"
|
run: echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
|
||||||
- name: Use cache for NPM
|
- name: Use cache for NPM
|
||||||
uses: actions/cache@v3.0.11
|
uses: actions/cache@v3.0.11
|
||||||
with:
|
with:
|
||||||
|
@ -120,7 +120,7 @@ jobs:
|
||||||
ret=$? &&
|
ret=$? &&
|
||||||
code=$(echo "$curl_out" | tail -n 1) &&
|
code=$(echo "$curl_out" | tail -n 1) &&
|
||||||
msg=$(echo "$curl_out" | head -n -1) &&
|
msg=$(echo "$curl_out" | head -n -1) &&
|
||||||
echo "::set-output name=code::$code" &&
|
echo "code=$code" >> $GITHUB_OUTPUT &&
|
||||||
echo "::set-output name=msg::$msg" &&
|
echo "msg=$msg" >> $GITHUB_OUTPUT &&
|
||||||
echo "Result ($code): $msg" &&
|
echo "Result ($code): $msg" &&
|
||||||
echo "$code" | grep '^\([^45][0-9][0-9]\)$'
|
echo "$code" | grep '^\([^45][0-9][0-9]\)$'
|
||||||
|
|
|
@ -41,7 +41,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
count=$(find docs/ -name \*.puml | wc -l)
|
count=$(find docs/ -name \*.puml | wc -l)
|
||||||
echo "There are $count plantuml files"
|
echo "There are $count plantuml files"
|
||||||
echo "::set-output name=num::$count"
|
echo "num=$count" >> $GITHUB_OUTPUT
|
||||||
- name: Install PlantUML on demand
|
- name: Install PlantUML on demand
|
||||||
if: steps.count-plantuml.outputs.num > 0
|
if: steps.count-plantuml.outputs.num > 0
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -21,7 +21,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
git diff HEAD~1 -- CHANGELOG.md
|
git diff HEAD~1 -- CHANGELOG.md
|
||||||
lines=$(git diff HEAD~1 -- CHANGELOG.md | wc -l)
|
lines=$(git diff HEAD~1 -- CHANGELOG.md | wc -l)
|
||||||
echo "::set-output name=lines::$lines"
|
echo "lines=$lines" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Get all changed file names
|
- name: Get all changed file names
|
||||||
id: file-names
|
id: file-names
|
||||||
|
@ -31,7 +31,7 @@ jobs:
|
||||||
echo "$lines"
|
echo "$lines"
|
||||||
cnt="$(echo "$lines" | grep -v '^package-lock.json$' | wc -l)"
|
cnt="$(echo "$lines" | grep -v '^package-lock.json$' | wc -l)"
|
||||||
echo "That are $cnt changed files."
|
echo "That are $cnt changed files."
|
||||||
echo "::set-output name=num::$cnt"
|
echo "num=$cnt" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Error if the number of diff lines is zero
|
- name: Error if the number of diff lines is zero
|
||||||
run: |
|
run: |
|
||||||
|
@ -118,7 +118,7 @@ jobs:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
- name: Get the date
|
- name: Get the date
|
||||||
id: date
|
id: date
|
||||||
run: echo "::set-output name=date::$(date +%Y-%m-%d)"
|
run: echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
|
||||||
- name: Cache NPM cache
|
- name: Cache NPM cache
|
||||||
uses: actions/cache@v3.0.11
|
uses: actions/cache@v3.0.11
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -26,7 +26,7 @@ jobs:
|
||||||
|
|
||||||
- name: Get the date
|
- name: Get the date
|
||||||
id: date
|
id: date
|
||||||
run: echo "::set-output name=date::$(date +%Y-%m-%d)"
|
run: echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
|
||||||
- name: Cache NPM cache
|
- name: Cache NPM cache
|
||||||
uses: actions/cache@v3.0.11
|
uses: actions/cache@v3.0.11
|
||||||
with:
|
with:
|
||||||
|
@ -62,7 +62,7 @@ jobs:
|
||||||
|
|
||||||
- name: Install Node packages
|
- name: Install Node packages
|
||||||
shell: bash
|
shell: bash
|
||||||
run: npm -q install || { cat ~/.npm/eresolve-report.txt ; exit 1; }
|
run: npm -q ci || { cat ~/.npm/eresolve-report.txt ; exit 1; }
|
||||||
|
|
||||||
- name: Run PHP linter
|
- name: Run PHP linter
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -111,10 +111,11 @@ jobs:
|
||||||
database:
|
database:
|
||||||
- mysql
|
- mysql
|
||||||
coreVersion:
|
coreVersion:
|
||||||
- stable21
|
- 21
|
||||||
- stable22
|
- 22
|
||||||
- stable23
|
- 23
|
||||||
- stable24
|
- 24
|
||||||
|
- 25
|
||||||
phpVersion:
|
phpVersion:
|
||||||
- "8.0"
|
- "8.0"
|
||||||
httpServer:
|
httpServer:
|
||||||
|
@ -122,23 +123,23 @@ jobs:
|
||||||
include:
|
include:
|
||||||
# Test different databses
|
# Test different databses
|
||||||
- database: sqlite
|
- database: sqlite
|
||||||
coreVersion: stable24
|
coreVersion: 25
|
||||||
phpVersion: "8.1"
|
phpVersion: "8.1"
|
||||||
httpServer: "apache"
|
httpServer: "apache"
|
||||||
- database: pgsql
|
- database: pgsql
|
||||||
coreVersion: stable24
|
coreVersion: 25
|
||||||
phpVersion: "8.1"
|
phpVersion: "8.1"
|
||||||
httpServer: "apache"
|
httpServer: "apache"
|
||||||
|
|
||||||
# Test different PHP versions additionally
|
# Test different PHP versions additionally
|
||||||
- database: mysql
|
- database: mysql
|
||||||
coreVersion: stable24
|
coreVersion: 25
|
||||||
phpVersion: "8.1"
|
phpVersion: "8.1"
|
||||||
httpServer: "apache"
|
httpServer: "apache"
|
||||||
|
|
||||||
# Test different HTTP server
|
# Test different HTTP server
|
||||||
- database: mysql
|
- database: mysql
|
||||||
coreVersion: stable24
|
coreVersion: 25
|
||||||
phpVersion: "8.1"
|
phpVersion: "8.1"
|
||||||
httpServer: "nginx"
|
httpServer: "nginx"
|
||||||
|
|
||||||
|
@ -154,46 +155,73 @@ jobs:
|
||||||
|
|
||||||
#- name: Docker Layer Caching
|
#- name: Docker Layer Caching
|
||||||
#uses: satackey/action-docker-layer-caching@v0.0.8
|
#uses: satackey/action-docker-layer-caching@v0.0.8
|
||||||
|
|
||||||
|
- name: Install helper program
|
||||||
|
shell: bash
|
||||||
|
run: |-
|
||||||
|
pip install yq
|
||||||
|
|
||||||
|
- name: Get the min and max compatible server versions from manifest XML file
|
||||||
|
shell: bash
|
||||||
|
id: ncVersionRequirements
|
||||||
|
run: |-
|
||||||
|
minVersion="$(cat appinfo/info.xml | xq '.info.dependencies.nextcloud."@min-version"' -r)"
|
||||||
|
maxVersion="$(cat appinfo/info.xml | xq '.info.dependencies.nextcloud."@max-version"' -r)"
|
||||||
|
echo "minVersion=$minVersion" >> $GITHUB_OUTPUT
|
||||||
|
echo "maxVersion=$maxVersion" >> $GITHUB_OUTPUT
|
||||||
|
echo "Compatible NC server versions: [$minVersion, $maxVersion]"
|
||||||
|
if [ "${{ matrix.coreVersion }}" -ge "$minVersion" -a "${{ matrix.coreVersion }}" -le "$maxVersion" ]; then
|
||||||
|
mv="true"
|
||||||
|
else
|
||||||
|
mv="false"
|
||||||
|
echo "Skipping the main tests as this version is marked incompatible with the installed NC version." >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
|
echo "matchingVersion=$mv" >> $GITHUB_OUTPUT
|
||||||
|
echo "The app is compatible with the current NV core v${{ matrix.coreVersion }}: $mv"
|
||||||
|
|
||||||
|
|
||||||
- name: Run the tests in docker container
|
- name: Run the tests in docker container
|
||||||
|
if: steps.ncVersionRequirements.outputs.matchingVersion == 'true'
|
||||||
uses: ./.github/actions/run-tests
|
uses: ./.github/actions/run-tests
|
||||||
with:
|
with:
|
||||||
db: ${{ matrix.database }}
|
db: ${{ matrix.database }}
|
||||||
phpVersion: ${{ matrix.phpVersion }}
|
phpVersion: ${{ matrix.phpVersion }}
|
||||||
server: ${{ matrix.httpServer }}
|
server: ${{ matrix.httpServer }}
|
||||||
coreVersion: ${{ matrix.coreVersion }}
|
coreVersion: stable${{ matrix.coreVersion }}
|
||||||
|
|
||||||
- name: Upload the log file as artifact
|
- name: Upload the log file as artifact
|
||||||
|
if: steps.ncVersionRequirements.outputs.matchingVersion == 'true' && always()
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
if: always()
|
|
||||||
with:
|
with:
|
||||||
name: Nextcloud-logs (${{matrix.database}}, ${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
|
name: Nextcloud-logs (${{matrix.database}}, stable${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
|
||||||
path: .github/actions/run-tests/volumes/data/nextcloud.log
|
path: .github/actions/run-tests/volumes/data/nextcloud.log
|
||||||
|
|
||||||
- name: Copy coverage-reports into non-link folder
|
- name: Copy coverage-reports into non-link folder
|
||||||
|
if: steps.ncVersionRequirements.outputs.matchingVersion == 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: >-
|
run: >-
|
||||||
mkdir /tmp/coverage &&
|
mkdir /tmp/coverage &&
|
||||||
rsync -a .github/actions/run-tests/volumes/coverage/latest/ /tmp/coverage
|
rsync -a .github/actions/run-tests/volumes/coverage/latest/ /tmp/coverage
|
||||||
|
|
||||||
- name: Upload the code coverage report for codecov as artifacts
|
- name: Upload the code coverage report for codecov as artifacts
|
||||||
|
if: steps.ncVersionRequirements.outputs.matchingVersion == 'true'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Code coverage (XML) (${{matrix.database}}, ${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
|
name: Code coverage (XML) (${{matrix.database}}, stable${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
|
||||||
path: "/tmp/coverage/coverage.*.xml"
|
path: "/tmp/coverage/coverage.*.xml"
|
||||||
|
|
||||||
# - name: Upload the code coverage report (unit tests) as artifacts
|
# - name: Upload the code coverage report (unit tests) as artifacts
|
||||||
# uses: actions/upload-artifact@v3
|
# uses: actions/upload-artifact@v3
|
||||||
# with:
|
# with:
|
||||||
# name: Code coverage (HTML) (${{matrix.database}}, ${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
|
# name: Code coverage (HTML) (${{matrix.database}}, stable${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
|
||||||
# path: "/tmp/coverage"
|
# path: "/tmp/coverage"
|
||||||
|
|
||||||
- name: Upload the junit log file artifact as artifact
|
- name: Upload the junit log file artifact as artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Junit test log files (${{matrix.database}}, ${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
|
name: Junit test log files (${{matrix.database}}, stable${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
|
||||||
path: .github/actions/run-tests/volumes/coverage/junit*.xml
|
path: .github/actions/run-tests/volumes/coverage/junit*.xml
|
||||||
if: always()
|
if: steps.ncVersionRequirements.outputs.matchingVersion == 'true' && always()
|
||||||
|
|
||||||
unit-tests-master:
|
unit-tests-master:
|
||||||
name: Run the tests against the master branch of the NC server
|
name: Run the tests against the master branch of the NC server
|
||||||
|
@ -357,7 +385,7 @@ jobs:
|
||||||
|
|
||||||
- name: Get the date
|
- name: Get the date
|
||||||
id: date
|
id: date
|
||||||
run: echo "::set-output name=date::$(date +%Y-%m-%d)"
|
run: echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
|
||||||
- name: Use cache for NPM
|
- name: Use cache for NPM
|
||||||
uses: actions/cache@v3.0.11
|
uses: actions/cache@v3.0.11
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
stable
|
|
@ -48,6 +48,8 @@
|
||||||
[1273](https://github.com/nextcloud/cookbook/pull/1273)
|
[1273](https://github.com/nextcloud/cookbook/pull/1273)
|
||||||
[1274](https://github.com/nextcloud/cookbook/pull/1274)
|
[1274](https://github.com/nextcloud/cookbook/pull/1274)
|
||||||
[1277](https://github.com/nextcloud/cookbook/pull/1277)
|
[1277](https://github.com/nextcloud/cookbook/pull/1277)
|
||||||
|
- Prepare the GitHub action scripts to be compatible with the upcoming version split in version 0.10.0
|
||||||
|
[#1285](https://github.com/nextcloud/cookbook/pull/1285) @christianlupus
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
- Fix bad writing
|
- Fix bad writing
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
<version>0.9.15</version>
|
<version>0.9.15</version>
|
||||||
<licence>agpl</licence>
|
<licence>agpl</licence>
|
||||||
<author mail="github@christian-wolf.click">Christian Wolf</author>
|
<author mail="github@christian-wolf.click">Christian Wolf</author>
|
||||||
|
<author mail="info@sebastianfey.de">Sebastian Fey</author>
|
||||||
|
<author mail="mail@marcelrobitaille.me">Marcel Robitaille</author>
|
||||||
<author mail="mrzapp@users.noreply.github.com">Jeppe Zapp</author>
|
<author mail="mrzapp@users.noreply.github.com">Jeppe Zapp</author>
|
||||||
<namespace>Cookbook</namespace>
|
<namespace>Cookbook</namespace>
|
||||||
<category>organization</category>
|
<category>organization</category>
|
||||||
|
|
|
@ -19,7 +19,7 @@ class UtilApiController extends ApiController {
|
||||||
*/
|
*/
|
||||||
public function getApiVersion(): JSONResponse {
|
public function getApiVersion(): JSONResponse {
|
||||||
$response = [
|
$response = [
|
||||||
'cookbook_version' => [0, 9, 14], /* VERSION_TAG do not change this line manually */
|
'cookbook_version' => [0, 9, 15], /* VERSION_TAG do not change this line manually */
|
||||||
'api_version' => [
|
'api_version' => [
|
||||||
'epoch' => 0,
|
'epoch' => 0,
|
||||||
'major' => 1,
|
'major' => 1,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче