Skip to content

Commit

Permalink
Merge pull request #159 from nf-osi/develop
Browse files Browse the repository at this point in the history
Update schematic to v23.1.1 which defaults to service token auth
  • Loading branch information
allaway authored Feb 3, 2023
2 parents 35ba073 + b8a77a2 commit 4706363
Showing 1 changed file with 23 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# Pushes to edge
# \__#3 deploy w/ schematic `develop` on GH --> NF_data_curator-edge
# Edge deploys are for checking new schematic development features
# Edge deploys for testing schematic development branch or simply the *next* version of schematic

name: custom-shiny-deploy

Expand All @@ -16,16 +16,17 @@ on:
branches:
- production
- develop
- edge
- edge-*
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- '**/*.md'
- '**/.gitignore'

env:
# Known stable and tested version of schematic used with prod and staging DCA
SCHEMATIC_PIN: 22.11.3

# PIN=known stable and tested version of schematic used with prod and staging DCA
SCHEMATIC_PIN: 23.1.1
SCHEMATIC_NEXT: 23.1.1

jobs:
shiny-deploy:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -58,32 +59,41 @@ jobs:
run: |
# has to activate each bash step
source .venv/bin/activate
# use 'poetry' to install schematic dev schematic
# If commit is tagged for release or in main branch, install schematic from pypi
if [[ $GITHUB_REF_NAME == production ]] || [[ $GITHUB_REF_NAME == develop ]]; then
echo Deploying with pypi version of schematic==${{ env.SCHEMATIC_PIN }}
git clone --single-branch --branch main https://github.com/Sage-Bionetworks/schematic.git
cp schematic_config.yml schematic/config.yml
cd schematic
pip3 install schematicpy==${{ env.SCHEMATIC_PIN }}
else
elif [[ ${{ env.SCHEMATIC_NEXT }} == develop ]]; then
pip3 install poetry
echo Deploying with develop branch of schematic from github
echo Deploying bleeding edge with latest on develop branch of schematic
git clone --single-branch --branch develop https://github.com/Sage-Bionetworks/schematic.git
cp schematic_config.yml schematic/config.yml
cd schematic
poetry build
pip3 install dist/schematicpy-1.0.0-py3-none-any.whl
else
echo Deploying edge with pypi version of schematic==${{ env.SCHEMATIC_NEXT }}
git clone --single-branch --branch main https://github.com/Sage-Bionetworks/schematic.git
cp schematic_config.yml schematic/config.yml
cd schematic
pip3 install schematicpy==${{ env.SCHEMATIC_NEXT }}
fi
- name: Set Configurations for Schematic
shell: bash
run: |
# write out configuration files using github secrets
echo "${{ secrets.SCHEMATIC_SYNAPSE_CONFIG }}" > .synapseConfig
echo "${{ secrets.SCHEMATIC_SERVICE_ACCT_CREDS }}" > schematic_service_account_creds.json
echo "${{ secrets.SCHEMATIC_CREDS_PATH }}" > credentials.json
echo "${{ secrets.SCHEMATIC_TOKEN_PICKLE }}" | base64 -d > token.pickle
- name: Save service account credentials for Schematic
id: create-json
uses: jsdaniell/[email protected]
with:
name: 'schematic_service_account_creds.json'
json: ${{ secrets.SCHEMATIC_SERVICE_ACCT_CREDS }}

- name: Set Configurations for Data Model
shell: bash
Expand All @@ -102,6 +112,8 @@ jobs:
# unzip it in 'global.R'
run: |
zip -rm .venv.zip .venv
echo ---- List of files part of this app upload bundle ----
ls -a
- name: Authorize and deploy app
shell: Rscript {0}
Expand Down

0 comments on commit 4706363

Please sign in to comment.