forked from Sage-Bionetworks/data_curator
-
Notifications
You must be signed in to change notification settings - Fork 1
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 #159 from nf-osi/develop
Update schematic to v23.1.1 which defaults to service token auth
- Loading branch information
Showing
1 changed file
with
23 additions
and
11 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 |
---|---|---|
|
@@ -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 | ||
|
||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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} | ||
|