Skip to content

Commit

Permalink
Azure pipeline: Add reference to deployment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-douglass committed Mar 27, 2020
1 parent 57d74f9 commit 5f16ec3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pipelines/azure-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ stages:
- stage: build
jobs:
- job: build_package
displayName: Build Package
steps:
- task: UsePythonVersion@0
displayName: Set python version
Expand All @@ -48,6 +49,7 @@ stages:
Python3_8:
python.version: '3.8'
timeoutInMinutes: 10
displayName: 'Test on python $(python.version)'
services:
elasticsearch: elasticsearch
redis: redis
Expand All @@ -64,7 +66,7 @@ stages:
- download: current
artifact: test
- script: |
set -x # Echo commands befor ethey are run
set -x # Echo commands before they are run
sudo apt-get update
sudo apt-get install -y build-essential libffi-dev libfuzzy-dev python3-dev
export VERSION=${BUILD_SOURCEBRANCH#"refs/tags/v"}
Expand All @@ -79,23 +81,29 @@ stages:
displayName: Test
- stage: deploy
jobs:
- job: run_test
- job: deploy
displayName: Deploy packages and containers
variables:
group: "DeploymentInformation"
steps:
- download: current
artifact: dist
- script: |
set -x # Echo commands before they are run
sudo env "PATH=$PATH" python -m pip install --no-cache-dir twine
ls dist
twine upload --skip-existing --repository-url $TEST_REPOSITORY_URL dist/*
workingDirectory: $(Pipeline.Workspace)
displayName: Deploy to Test PyPI
- script: |
set -x # Echo commands before they are run
sudo env "PATH=$PATH" python -m pip install --no-cache-dir twine
ls dist
twine upload --skip-existing dist/*
workingDirectory: $(Pipeline.Workspace)
displayName: Deploy to PyPI
- script: |
set -x # Echo commands before they are run
export TAG=${BUILD_SOURCEBRANCH#"refs/tags/v"}
until sudo python3 -m pip install --no-cache-dir assemblyline== 2>&1 | grep -q $TAG; do sleep 2; sudo python3 -m pip install --no-cache-dir assemblyline== 2>&1 || true; done
docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PASSWORD
Expand Down

0 comments on commit 5f16ec3

Please sign in to comment.