Skip to content

Commit

Permalink
Merge pull request #15 from nextcloud/fix/renaming-to-nc-org
Browse files Browse the repository at this point in the history
renamed `cloud-py-api` to `nextcloud` + polished Makefile
  • Loading branch information
bigcat88 authored Oct 17, 2024
2 parents 826b5b2 + e709131 commit 9b5bb97
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/appstore-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
jobs:
build_and_publish:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'cloud-py-api' }}
if: ${{ github.repository_owner == 'nextcloud' }}
steps:
- name: Check actor permission
uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2.1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
jobs:
push_to_registry:
name: Build image
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'cloud-py-api' }}
runs-on: ubuntu-22.04
if: ${{ github.repository_owner == 'nextcloud' }}
permissions:
packages: write
contents: read
Expand Down Expand Up @@ -88,6 +88,6 @@ jobs:
push: true
context: ./${{ env.APP_NAME }}
platforms: linux/amd64,linux/arm64
tags: ghcr.io/cloud-py-api/${{ env.APP_NAME }}:${{ env.VERSION }}
tags: ghcr.io/nextcloud/${{ env.APP_NAME }}:${{ env.VERSION }}
build-args: |
BUILD_TYPE=cpu
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Added

- More logging for faster problem diagnosis. [commit](https://github.com/cloud-py-api/flow/commit/e52c501144761e73b81b156423af034c191797aa)
- More logging for faster problem diagnosis. [commit](https://github.com/nextcloud/flow/commit/e52c501144761e73b81b156423af034c191797aa)

### Fixed

- Warning "sudo: unable to resolve host" during container startup. #11
- Incorrect handling Windmill scripts with no modules in it. [commit](https://github.com/cloud-py-api/flow/commit/c8bf8309e85b14c2b36913469a38291f2c480b53)
- Incorrect handling Windmill scripts with no modules in it. [commit](https://github.com/nextcloud/flow/commit/c8bf8309e85b14c2b36913469a38291f2c480b53)
- Unregister webhooks from the Nextcloud instance during ExApp disabling. #10
- Error when username(userid) contained a space. #13
- Updated NPM packages. #12
Expand Down
63 changes: 35 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
.DEFAULT_GOAL := help

APP_ID := flow
APP_NAME := Flow
APP_VERSION := $$(xmlstarlet sel -t -v "//version" appinfo/info.xml)
JSON_INFO := "{\"id\":\"$(APP_ID)\",\"name\":\"$(APP_NAME)\",\"daemon_config_name\":\"manual_install\",\"version\":\"$(APP_VERSION)\",\"secret\":\"12345\",\"port\":24000, \"routes\": [{\"url\":\"^api\\\/w\\\/nextcloud\\\/jobs\\\/.*\", \"verb\":\"GET, POST, PUT, DELETE\", \"access_level\":0, \"headers_to_exclude\":[], \"bruteforce_protection\":[401]}, {\"url\":\"^api\\\/w\\\/nextcloud\\\/jobs_u\\\/.*\", \"verb\":\"GET, POST, PUT, DELETE\", \"access_level\":0, \"headers_to_exclude\":[], \"bruteforce_protection\":[401]}, {\"url\":\".*\", \"verb\":\"GET, POST, PUT, DELETE\", \"access_level\":2, \"headers_to_exclude\":[]}]}"


.PHONY: help
help:
@echo "Welcome to WorkflowEngine project. Please use \`make <target>\` where <target> is one of"
@echo " Welcome to $(APP_NAME) $(APP_VERSION)!"
@echo " "
@echo " Please use \`make <target>\` where <target> is one of"
@echo " "
@echo " init clones Windmill repo to 'windmill_src' folder and copy ExApp inside it"
@echo " static_frontend builds Windmill's 'static_frontend' folder for 'manual_install'"
@echo " build-push builds app docker image and uploads it to ghcr.io"
@echo " "
@echo " Next commands are only for dev environment with nextcloud-docker-dev!"
@echo " They should run from the host you are developing on(with activated venv) and not in the container with Nextcloud!"
@echo " "
@echo " init clone Windmill repository to the 'windmill_src' folder and copy ExApp files inside it"
@echo " build-push build image and upload to ghcr.io"
@echo " "
@echo " run30 install Flow App for Nextcloud 30"
@echo " run install Flow App for Nextcloud Last"
@echo " "
@echo " static_frontend build Windmill static frontend for Manual Installation"
@echo " register30 register manually running Flow App into Nextcloud"
@echo " > Next commands are only for the dev environment with nextcloud-docker-dev!"
@echo " > They should run from the host you are developing on(with activated venv) and not in the container with Nextcloud!"
@echo " "
@echo " run30 installs $(APP_NAME) for Nextcloud 30"
@echo " run installs $(APP_NAME) for Nextcloud Latest"
@echo " "
@echo " > Commands for manual registration of ExApp($(APP_NAME) should be running!):"
@echo " "
@echo " register30 performs registration of running $(APP_NAME) into the 'manual_install' deploy daemon."
@echo " register performs registration of running $(APP_NAME) into the 'manual_install' deploy daemon."


.PHONY: init
init:
Expand All @@ -39,33 +51,28 @@ static_frontend:
.PHONY: build-push
build-push:
docker login ghcr.io
VERSION=$$(xmlstarlet sel -t -v "//image-tag" appinfo/info.xml) && \
pushd windmill_src && \
docker buildx build --push --build-arg VITE_BASE_URL=/index.php/apps/app_api/proxy/flow --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/cloud-py-api/flow:$$VERSION . && \
docker buildx build --push --build-arg VITE_BASE_URL=/index.php/apps/app_api/proxy/flow --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/nextcloud/$(APP_ID):$(VISIONATRIX_VERSION) . && \
popd

.PHONY: run30
run30:
docker exec master-stable30-1 sudo -u www-data php occ app_api:app:unregister flow --silent --force || true
docker exec master-stable30-1 sudo -u www-data php occ app_api:app:register flow \
--info-xml https://raw.githubusercontent.com/cloud-py-api/flow/main/appinfo/info.xml
docker exec master-stable30-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
docker exec master-stable30-1 sudo -u www-data php occ app_api:app:register $(APP_ID) \
--info-xml https://raw.githubusercontent.com/nextcloud/$(APP_ID)/main/appinfo/info.xml

.PHONY: run
run:
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister flow --silent --force || true
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register flow \
--info-xml https://raw.githubusercontent.com/cloud-py-api/flow/main/appinfo/info.xml
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register $(APP_ID) \
--info-xml https://raw.githubusercontent.com/nextcloud/$(APP_ID)/main/appinfo/info.xml

.PHONY: register30
register30:
docker exec master-stable30-1 sudo -u www-data php occ app_api:app:unregister flow --silent --force || true
docker exec master-stable30-1 sudo -u www-data php occ app_api:app:register flow manual_install --json-info \
"{\"id\":\"flow\",\"name\":\"Flow\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":24000, \"routes\": [{\"url\":\"^api\\\/w\\\/nextcloud\\\/jobs\\\/.*\", \"verb\":\"GET, POST, PUT, DELETE\", \"access_level\":0, \"headers_to_exclude\":[], \"bruteforce_protection\":[401]}, {\"url\":\"^api\\\/w\\\/nextcloud\\\/jobs_u\\\/.*\", \"verb\":\"GET, POST, PUT, DELETE\", \"access_level\":0, \"headers_to_exclude\":[], \"bruteforce_protection\":[401]}, {\"url\":\".*\", \"verb\":\"GET, POST, PUT, DELETE\", \"access_level\":2, \"headers_to_exclude\":[]}]}" \
--wait-finish
docker exec master-stable30-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
docker exec master-stable30-1 sudo -u www-data php occ app_api:app:register $(APP_ID) manual_install --json-info $(JSON_INFO) --wait-finish

.PHONY: register
register:
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister flow --silent --force || true
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register flow manual_install --json-info \
"{\"id\":\"flow\",\"name\":\"Flow\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":24000, \"routes\": [{\"url\":\"^api\\\/w\\\/nextcloud\\\/jobs\\\/.*\", \"verb\":\"GET, POST, PUT, DELETE\", \"access_level\":0, \"headers_to_exclude\":[], \"bruteforce_protection\":[401]}, {\"url\":\"^api\\\/w\\\/nextcloud\\\/jobs_u\\\/.*\", \"verb\":\"GET, POST, PUT, DELETE\", \"access_level\":0, \"headers_to_exclude\":[], \"bruteforce_protection\":[401]}, {\"url\":\".*\", \"verb\":\"GET, POST, PUT, DELETE\", \"access_level\":2, \"headers_to_exclude\":[]}]}" \
--wait-finish
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register $(APP_ID) manual_install --json-info $(JSON_INFO) --wait-finish
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Follow these steps to manually deploy Flow without Docker:
Clone the Flow repository:

```bash
git clone https://github.com/cloud-py-api/flow.git
git clone https://github.com/nextcloud/flow.git
```

Navigate into the cloned directory, create a Python virtual environment, and install the required dependencies:
Expand Down
17 changes: 7 additions & 10 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,21 @@ Flow is the key to unlocking enhanced productivity in Nextcloud, designed to be
<author mail="[email protected]" homepage="https://github.com/bigcat88">Alexander Piskun</author>
<namespace>PyAppV2_flow</namespace>
<category>tools</category>
<website>https://github.com/cloud-py-api/flow</website>
<bugs>https://github.com/cloud-py-api/flow/issues</bugs>
<repository type="git">https://github.com/cloud-py-api/flow</repository>
<screenshot>https://raw.githubusercontent.com/cloud-py-api/flow/main/screenshots/flow_1.png</screenshot>
<screenshot>https://raw.githubusercontent.com/cloud-py-api/flow/main/screenshots/flow_2.png</screenshot>
<screenshot>https://raw.githubusercontent.com/cloud-py-api/flow/main/screenshots/flow_3.png</screenshot>
<website>https://github.com/nextcloud/flow</website>
<bugs>https://github.com/nextcloud/flow/issues</bugs>
<repository type="git">https://github.com/nextcloud/flow</repository>
<screenshot>https://raw.githubusercontent.com/nextcloud/flow/main/screenshots/flow_1.png</screenshot>
<screenshot>https://raw.githubusercontent.com/nextcloud/flow/main/screenshots/flow_2.png</screenshot>
<screenshot>https://raw.githubusercontent.com/nextcloud/flow/main/screenshots/flow_3.png</screenshot>
<dependencies>
<nextcloud min-version="30" max-version="31"/>
</dependencies>
<external-app>
<docker-install>
<registry>ghcr.io</registry>
<image>cloud-py-api/flow</image>
<image>nextcloud/flow</image>
<image-tag>1.0.1</image-tag>
</docker-install>
<scopes>
<value>ALL</value>
</scopes>
<routes>
<route>
<url>^api\/w\/nextcloud\/jobs\/.*</url>
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"name": "flow",
"description": "Workflow Engine in your Nextcloud",
"version": "1.0.0",
"homepage": "https://github.com/cloud-py-api/flow",
"homepage": "https://github.com/nextcloud/flow",
"bugs": {
"url": "https://github.com/cloud-py-api/flow/issues"
"url": "https://github.com/nextcloud/flow/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/cloud-py-api/flow"
"url": "https://github.com/nextcloud/flow"
},
"license": "mit",
"private": true,
Expand Down

0 comments on commit 9b5bb97

Please sign in to comment.