-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added all content and removed old dockerfiles for now
- Loading branch information
Showing
12 changed files
with
4,964 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: App SDK upload | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
push: | ||
branches: [ master, launch ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
|
||
- id: 'auth' | ||
name: 'Authenticate to Google Cloud' | ||
uses: 'google-github-actions/auth@v0' | ||
with: | ||
credentials_json: '${{ secrets.SANDBOX_CREDENTIALS }}' | ||
|
||
- id: 'upload_sdk' | ||
name: Cloud Storage Uploader | ||
uses: google-github-actions/[email protected] | ||
with: | ||
path: 'backend/app_sdk/app_base.py' | ||
destination: 'shuffle-sandbox-337810.appspot.com/generated_apps/baseline' | ||
|
||
- id: 'upload_requirement' | ||
name: Cloud Storage Uploader | ||
uses: google-github-actions/[email protected] | ||
with: | ||
path: 'backend/app_sdk/requirements.txt' | ||
destination: 'shuffle-sandbox-337810.appspot.com/generated_apps/baseline' | ||
|
||
- id: 'upload_Dockerfile' | ||
name: Cloud Storage Uploader | ||
uses: google-github-actions/[email protected] | ||
with: | ||
path: 'backend/app_sdk/Dockerfile' | ||
destination: 'shuffle-sandbox-337810.appspot.com/generated_apps/baseline' |
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,55 @@ | ||
name: Upload App SDK to PiPy | ||
|
||
on: | ||
workflow_dispatch: # Allows the workflow to be run manually from GitHub | ||
inputs: | ||
version: | ||
description: 'Version of the package to publish' | ||
required: true | ||
release: | ||
types: [published] | ||
push: | ||
tags: | ||
- 'v*' # Triggers when a version tag is pushed (e.g., v1.0.0) | ||
|
||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
run: | | ||
cd ./backend/app_sdk | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: | | ||
cd ./backend/app_sdk | ||
python -m build | ||
- name: Move build artifacts | ||
run: | | ||
ls -alh | ||
ls -alh ./backend/app_sdk | ||
mv ./backend/app_sdk/dist ./dist | ||
- name: Publish package | ||
uses: pypa/[email protected] | ||
with: | ||
verify-metadata: false | ||
repository-url: https://upload.pypi.org/legacy/ | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
env: | ||
ACTIONS_STEP_DEBUG: true # Enables debug mode for this step | ||
|
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 python:3.9.1-alpine as base | ||
FROM python:3.10.0-alpine as base | ||
#FROM python:3.11.3-alpine as base | ||
|
||
FROM base as builder | ||
RUN apk --no-cache add --update alpine-sdk libffi libffi-dev musl-dev openssl-dev tzdata coreutils | ||
|
||
RUN mkdir /install | ||
WORKDIR /install | ||
|
||
FROM base | ||
|
||
#--no-cache | ||
RUN apk update && apk add --update tzdata libmagic alpine-sdk libffi libffi-dev musl-dev openssl-dev coreutils | ||
|
||
COPY --from=builder /install /usr/local | ||
COPY requirements.txt /requirements.txt | ||
RUN pip3 install -r /requirements.txt | ||
|
||
COPY __init__.py /app/walkoff_app_sdk/__init__.py | ||
COPY app_base.py /app/walkoff_app_sdk/app_base.py |
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,2 +1,22 @@ | ||
# app_sdk | ||
App SDK for Shuffle. Previously in the /shuffle/shuffle/backend/app_sdk location. | ||
# app_sdk.py | ||
This is the SDK used for apps to behave like they should. | ||
|
||
## If you want to update apps.. PS: downloads from docker hub do overrides.. :) | ||
1. Write your code & check if runtime works | ||
2. Build app_base image | ||
3. docker rm $(docker ps -aq) # Remove all stopped containers | ||
4. Delete the specific app's Docker image (docker rmi frikky/shuffle:...) | ||
5. Rebuild the Docker image (click load in GUI?) | ||
|
||
## Cloud updates | ||
1. Go to shuffle cloud on GCP | ||
2. Go to Cloud Storage | ||
3. Find shuffler.appspot.com | ||
4. Navigate to generated_apps/baseline | ||
5. Update SDK there. This will make all new apps run with the new SDK | ||
|
||
## Cloud app force-updates | ||
1. Run the "stitcher.go" program in the public shuffle-shared repository. | ||
|
||
# LICENSE | ||
Everything in here is MIT, not AGPLv3 as indicated by the license. |
Empty file.
Oops, something went wrong.