-
Notifications
You must be signed in to change notification settings - Fork 8
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 #197 from FlowFuse/move-npm-org
Move npm org
- Loading branch information
Showing
9 changed files
with
156 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,18 +16,10 @@ jobs: | |
- uses: JS-DevTools/[email protected] | ||
with: | ||
token: ${{ secrets.NPM_PUBLISH_TOKEN }} | ||
|
||
build_container: | ||
needs: [publish] | ||
runs-on: ubuntu-latest | ||
steps: | ||
# - name: wait for npm | ||
# uses: gr2m/await-npm-package-version-action@v1 | ||
# with: | ||
# package: "@flowforge/flowforge-device-agent" | ||
# version: ${{ github.event.release.tag_name }} | ||
# timeout: 300 | ||
# registry: https://registry.npmjs.org | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: Docker Meta Data | ||
|
@@ -47,20 +39,73 @@ jobs: | |
- name: docker login | ||
uses: docker/[email protected] | ||
with: | ||
username: flowforge | ||
username: flowfuse | ||
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
- name: Build and push FlowForge Device Agent container | ||
- name: Build and push FlowFuse Device Agent container | ||
uses: docker/[email protected] | ||
with: | ||
context: docker | ||
file: docker/Dockerfile | ||
tags: ${{ steps.meta.outputs.tags }} | ||
push: true | ||
platforms: linux/amd64, linux/arm64, linux/arm/v7 | ||
- name: Publish README.md to Docker hub | ||
uses: peter-evans/dockerhub-description@v3 | ||
with: | ||
repository: flowfuse/device-agent | ||
username: flowfuse | ||
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
readme-filepath: ./docker/README.md | ||
publish_legacy: | ||
needs: [publish] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: "Install jq" | ||
run: sudo apt-get install -y jq | ||
- name: "Patch module name" | ||
working-directory: helm | ||
run: | | ||
cat package.json | jq '.name = "@flowforge/flowforge-device-agent"' > package.json-patched | ||
mv package.json-patched package.json | ||
- run: npm install | ||
- uses: JS-DevTools/[email protected] | ||
with: | ||
token: ${{ secrets.NPM_PUBLISH_TOKEN_FLOWFORGE }} | ||
- name: Docker Meta Data | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
tags: | | ||
type=semver,event=tag,pattern={{version}} | ||
flavor: | | ||
latest=true | ||
images: | | ||
flowforge/device-agent | ||
- name: Setup QEMU | ||
uses: docker/[email protected] | ||
- name: Setup Docker buildx | ||
uses: docker/[email protected] | ||
- name: docker login | ||
uses: docker/[email protected] | ||
with: | ||
username: flowforge | ||
password: ${{ secrets.DOCKER_HUB_PASSWORD_FLOWFORGE }} | ||
- name: Build and push FlowFuse Device Agent container | ||
uses: docker/[email protected] | ||
with: | ||
context: docker | ||
file: docker/Dockerfile_flowforge | ||
tags: ${{ steps.meta.outputs.tags }} | ||
push: true | ||
platforms: linux/amd64, linux/arm64, linux/arm/v7 | ||
- name: Publish README.md to Docker hub | ||
uses: peter-evans/dockerhub-description@v3 | ||
with: | ||
repository: flowforge/device-agent | ||
username: flowforge | ||
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
password: ${{ secrets.DOCKER_HUB_PASSWORD_FLOWFORGE }} | ||
readme-filepath: ./docker/README.md |
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,26 +1,21 @@ | ||
FROM node:16-alpine | ||
|
||
ARG REGISTRY | ||
ARG REGISTRY_TOKEN | ||
ARG VERSION=latest | ||
|
||
RUN if [[ ! -z "$REGISTRY_TOKEN" ]]; then echo "//$REGISTRY/:_authToken=$REGISTRY_TOKEN" >> ~/.npmrc ; fi | ||
RUN if [[ ! -z "$REGISTRY" ]] ; then npm config set @flowforge:registry "https://$REGISTRY"; fi | ||
|
||
RUN apk add --no-cache --virtual buildtools build-base linux-headers udev python3 | ||
|
||
RUN mkdir /opt/flowforge-device | ||
RUN npm install -g @flowforge/flowforge-device-agent@${VERSION} | ||
RUN mkdir /opt/flowfuse-device | ||
RUN npm install -g @flowfuse/device-agent@${VERSION} | ||
|
||
EXPOSE 1880 | ||
|
||
LABEL org.label-schema.name="Flowforge Device Agent" \ | ||
org.label-schema.url="https://flowforge.com" \ | ||
LABEL org.label-schema.name="FlowFuse Device Agent" \ | ||
org.label-schema.url="https://flowfuse.com" \ | ||
org.label-schema.vcs-type="Git" \ | ||
org.label-schema.vcs-url="https://github.com/flowforge/flowforge-device-agent" \ | ||
org.label-schema.vcs-url="https://github.com/FlowFuse/device-agent" \ | ||
org.label-schema.docker.dockerfile="docker/Dockerfile" \ | ||
org.schema-label.description="Collaborative, low code integration and automation environment" \ | ||
authors="Flowforge Inc." | ||
authors="FlowFuse Inc." | ||
|
||
|
||
CMD ["flowforge-device-agent"] | ||
CMD ["flowfuse-device-agent"] |
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,21 @@ | ||
FROM node:16-alpine | ||
|
||
ARG VERSION=latest | ||
|
||
RUN apk add --no-cache --virtual buildtools build-base linux-headers udev python3 | ||
|
||
RUN mkdir /opt/flowforge-device | ||
RUN npm install -g @flowfuse/device-agent@${VERSION} | ||
|
||
EXPOSE 1880 | ||
|
||
LABEL org.label-schema.name="FlowFuse Device Agent" \ | ||
org.label-schema.url="https://flowfuse.com" \ | ||
org.label-schema.vcs-type="Git" \ | ||
org.label-schema.vcs-url="https://github.com/FlowFuse/device-agent" \ | ||
org.label-schema.docker.dockerfile="docker/Dockerfile" \ | ||
org.schema-label.description="Collaborative, low code integration and automation environment" \ | ||
authors="FlowFuse Inc." | ||
|
||
|
||
CMD ["flowfuse-device-agent"] |
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,16 +1,16 @@ | ||
# FlowForge Device Agent | ||
# FlowFuse Device Agent | ||
|
||
This container can be used to start a FlowForge device. The device needs to | ||
be [registered on your FlowForge instance](https://flowforge.com/docs/user/devices/#register-the-device). | ||
This container can be used to start a FlowFuse device. The device needs to | ||
be [registered on your FlowFuse instance](https://flowfuse.com/docs/device-agent/register/). | ||
|
||
The YAML with configuration needs to be mounted inside the container. | ||
|
||
``` | ||
docker run -v /path/to/device.yml:/opt/flowforge-device/device.yml -p 1880:1880 flowforge/device-agent:latest | ||
docker run -v /path/to/device.yml:/opt/flowfuse-device/device.yml -p 1880:1880 flowfuse/device-agent:latest | ||
``` | ||
|
||
To run with verbose logging run as follows: | ||
|
||
``` | ||
docker run -v /path/to/device.yml:/opt/flowforge-device/device.yml -p 1880:1880 flowforge/device-agent:latest flowforge-device-agent -v | ||
docker run -v /path/to/device.yml:/opt/flowfuse-device/device.yml -p 1880:1880 flowfuse/device-agent:latest flowfuse-device-agent -v | ||
``` |
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.