Skip to content

Instantly share code, notes, and snippets.

@sleepless-se
Created May 20, 2022 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sleepless-se/31cbee5a449b1b17d0e5659264d56cd9 to your computer and use it in GitHub Desktop.
Save sleepless-se/31cbee5a449b1b17d0e5659264d56cd9 to your computer and use it in GitHub Desktop.
How to set python test on cloudbuild.yaml
steps:
# Install modules
- name: 'python'
entrypoint: pip
args: [ "install", "-r", "requirements.txt", "--user" ]
# Run unit tests
- name: python
args: ["python","-m","unittest"]
id: unittest
# build docker image
- name: 'gcr.io/kaniko-project/executor:latest'
args:
- --destination=gcr.io/${PROJECT_ID}/build-test
- --cache=true
- --cache-ttl=24h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment