Created
March 20, 2023 15:33
-
-
Save zdravko-il/b2d3dfa0b8056310ebf80edeff6bc311 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
build-job: | |
stage: build | |
image: zyanakiev/snowpark-devops:latest | |
artifacts: | |
name: app | |
untracked: false | |
when: on_success | |
expire_in: "7 days" | |
paths: | |
- "app.zip" | |
script: | |
- | | |
echo "Installing Python packages" | |
pip install -r requirements.txt | |
- | | |
if [[ -z $CI_COMMIT_TAG ]] | |
then | |
echo "Create schema for branch if not exists" | |
~/bin/snowsql -q "create schema if not exists $SF_SCHEMA" -o friendly=false | |
fi | |
- | | |
echo "Running unit tests" | |
python -m pytest | |
- | | |
echo "Installing manually managed packages for deployment" | |
pip install -t .packages -r requirements.other.txt | |
- | | |
echo "Creating zip package..." | |
if [ -d "build" ] ; then | |
cd .packages | |
zip -r ../app.zip . | |
cd .. | |
fi | |
zip -g -x .\* -r app.zip . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment