Skip to content

Instantly share code, notes, and snippets.

@zdravko-il
Created March 20, 2023 15:33
Show Gist options
  • Save zdravko-il/098e6a9ef0083722ea5433fd014c5faf to your computer and use it in GitHub Desktop.
Save zdravko-il/098e6a9ef0083722ea5433fd014c5faf to your computer and use it in GitHub Desktop.
deploy-job:
stage: deploy
image: zyanakiev/snowpark-devops:latest
environment:
name: $CI_COMMIT_REF_SLUG
on_stop: delete-schema-job
only:
- branches
script:
- |
echo "Upload artifact to SnowSQL"
~/bin/snowsql -s $SF_SCHEMA -q "create stage if not exists deploy" -o friendly=false -o exit_on_error=true
~/bin/snowsql -s $SF_SCHEMA -q "put file://$(pwd)/app.zip @deploy overwrite=true auto_compress=false" -o friendly=false -o exit_on_error=true
- |
echo "Create resources and seed schema"
~/bin/snowsql -s $SF_SCHEMA -f ./setup/00_init_schema.sql -o friendly=false -o exit_on_error=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment