Skip to content

Instantly share code, notes, and snippets.

View sh0rtcircuit's full-sized avatar

Andre Gensler sh0rtcircuit

View GitHub Profile
git commit -m "fix: example fix commit"
cz bump
git push --tags
- script: |
git config --global user.email "<my_email>" && git config --global user.name "<my_name>"
cz bump
git push --tags origin HEAD:master
condition: eq(variables['build.sourceBranch'], 'refs/heads/master')
displayName: 'Bump package version number'
- checkout: self
persistCredentials: true
@sh0rtcircuit
sh0rtcircuit / azure_devops_commitizen_pyproject.toml
Last active May 10, 2022 15:36
Azure DevOps Commitizen pyproject.toml
[build-system]
requires = ["setuptools>=42"]
build-backend = "setuptools.build_meta"
[tool.commitizen]
version="1.0.0"
version_files = [
"setup.py:version"
]
bump_message = "release $current_version -> $new_version [skip ci]"
@sh0rtcircuit
sh0rtcircuit / azure_devops_commitizen_full_example.yaml
Created May 10, 2022 15:21
Azure DevOps Commitizen Full Example
trigger:
- master
- feature/*
variables:
isMaster: $[eq(variables['build.sourceBranch'], 'refs/heads/master')]
CI_USERNAME: "CI Pipeline"
CI_EMAIL: [email protected]
jobs:
@sh0rtcircuit
sh0rtcircuit / azure_pipelines_skip_caching_example.yaml
Last active October 13, 2021 08:37
Azure Pipelines Skip Caching example
steps:
- script: |
if [[ "$(Build.SourceVersionMessage)" =~ "no-cache" ]]; then
echo "Setting SKIP_CACHE to true"
echo "##vso[task.setvariable variable=SKIP_CACHE]true"
else
echo "Setting SKIP_CACHE to false"
echo "##vso[task.setvariable variable=SKIP_CACHE]false"
fi
name: SkipCache
@sh0rtcircuit
sh0rtcircuit / azure_pipelines_caching_example_conda.yaml
Created October 13, 2021 08:02
Example pipeline for python CI pipeline caching in Azure DevOps
variables:
CONDA_ENV_NAME: "unit_test"
# set $(CONDA) environment variable to your conda path (pre-populated on 'ubuntu-latest' VMs)
CONDA_ENV_DIR: $(CONDA)/envs/$(CONDA_ENV_NAME)
steps:
- script: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
steps:
- task: Cache@2
displayName: Use cached Anaconda environment
inputs:
key: 'conda | "$(Agent.OS)" | requirements.txt'
path: $(CONDA_ENV_DIR)
cacheHitVar: CONDA_CACHE_RESTORED
@sh0rtcircuit
sh0rtcircuit / myfile.py
Created July 17, 2020 11:52
Sample Gist
import numpy
np.array([1, 2, 3])