Skip to content

Commit

Permalink
Merge pull request #109 from CybercentreCanada/run-bash-with--e
Browse files Browse the repository at this point in the history
Update full-build.yaml
  • Loading branch information
cccs-douglass committed Sep 29, 2023
2 parents 97f4830 + 9fecdc2 commit 2fdd906
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions pipelines/full-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ stages:
inputs:
versionSpec: 3.9
- script: |
set -x # Echo commands before they are run
set -ex # Echo commands before they are run
# Figure out what the build kind is
export TAG=${BUILD_SOURCEBRANCH#"refs/tags/"}
Expand Down Expand Up @@ -131,7 +131,7 @@ stages:
command: login
containerRegistry: cccstemp
- script: |
set -xv # Echo commands before they are run
set -exv # Echo commands before they are run
export TAG=${BUILD_SOURCEBRANCH#"refs/tags/v"}
if [[ "$TAG" == *stable* ]]; then export BUILD_TYPE=stable; else export BUILD_TYPE=latest; fi
export VERSION=${TAG/stable}
Expand All @@ -157,7 +157,7 @@ stages:
command: login
containerRegistry: cccstemp
- script: |
set -xv # Echo commands before they are run
set -exv # Echo commands before they are run
export TAG=${BUILD_SOURCEBRANCH#"refs/tags/v"}
if [[ "$TAG" == *stable* ]]; then export BUILD_TYPE=stable; else export BUILD_TYPE=latest; fi
export VERSION=${TAG/stable}
Expand Down Expand Up @@ -197,7 +197,7 @@ stages:
command: login
containerRegistry: cccstemp
- script: |
set -xv # Echo commands before they are run
set -exv # Echo commands before they are run
export TAG=${BUILD_SOURCEBRANCH#"refs/tags/v"}
if [[ "$TAG" == *stable* ]]; then export BUILD_TYPE=stable; else export BUILD_TYPE=latest; fi
export VERSION=${TAG/stable}
Expand Down Expand Up @@ -230,7 +230,7 @@ stages:
command: login
containerRegistry: cccstemp
- script: |
set -xv # Echo commands before they are run
set -exv # Echo commands before they are run
export TAG=${BUILD_SOURCEBRANCH#"refs/tags/v"}
if [[ "$TAG" == *stable* ]]; then export BUILD_TYPE=stable; else export BUILD_TYPE=latest; fi
export VERSION=${TAG/stable}
Expand Down Expand Up @@ -263,7 +263,7 @@ stages:
command: login
containerRegistry: cccstemp
- script: |
set -xv # Echo commands before they are run
set -exv # Echo commands before they are run
export TAG=${BUILD_SOURCEBRANCH#"refs/tags/v"}
if [[ "$TAG" == *stable* ]]; then export BUILD_TYPE=stable; else export BUILD_TYPE=latest; fi
export VERSION=${TAG/stable}
Expand Down Expand Up @@ -305,7 +305,7 @@ stages:
command: login
containerRegistry: cccstemp
- script: |
set -xv # Echo commands before they are run
set -exv # Echo commands before they are run
export TAG=${BUILD_SOURCEBRANCH#"refs/tags/v"}
if [[ "$TAG" == *stable* ]]; then export BUILD_TYPE=stable; else export BUILD_TYPE=latest; fi
export VERSION=${TAG/stable}
Expand Down Expand Up @@ -359,7 +359,7 @@ stages:
command: login
containerRegistry: cccstemp
- script: |
set -xv # Echo commands before they are run
set -exv # Echo commands before they are run
export TAG=${BUILD_SOURCEBRANCH#"refs/tags/v"}
cd assemblyline-base
Expand Down Expand Up @@ -390,7 +390,7 @@ stages:
command: login
containerRegistry: cccstemp
- script: |
set -xv # Echo commands before they are run
set -exv # Echo commands before they are run
export TAG=${BUILD_SOURCEBRANCH#"refs/tags/v"}
cd assemblyline-core
Expand Down Expand Up @@ -421,6 +421,7 @@ stages:
command: login
containerRegistry: cccstemp
- script: |
set -e
export TAG=${BUILD_SOURCEBRANCH#"refs/tags/v"}
docker run -d --name ui --network host -v $(Pipeline.Workspace)/working/pipelines/ui-config.yaml:/etc/assemblyline/config.yml -v $(Pipeline.Workspace)/working/pipelines/classification.yaml:/etc/assemblyline/classification.yml --restart on-failure cccstemp.azurecr.io/assemblyline-ui:$TAG &
Expand Down Expand Up @@ -473,6 +474,7 @@ stages:
command: login
containerRegistry: cccstemp
- script: |
set -e
export TAG=${BUILD_SOURCEBRANCH#"refs/tags/v"}
docker run -d --name server --network host --restart on-failure cccstemp.azurecr.io/assemblyline-service-server:$TAG
Expand Down Expand Up @@ -504,6 +506,7 @@ stages:
command: login
containerRegistry: cccstemp
- script: |
set -e
export TAG=${BUILD_SOURCEBRANCH#"refs/tags/v"}
docker run -v `pwd`/test:/test \
Expand All @@ -527,7 +530,7 @@ stages:
- download: current
artifact: working
- script: |
set -xv # Echo commands before they are run
set -exv # Echo commands before they are run
sudo env "PATH=$PATH" python -m pip install --no-cache-dir -U 'urllib3<2' twine
ls dist
twine upload --skip-existing dist/*
Expand Down Expand Up @@ -586,7 +589,7 @@ stages:
command: login
containerRegistry: CHIMERA-U-ACR
- script: |
set -xv # Echo commands before they are run
set -exv # Echo commands before they are run
export TAG=${BUILD_SOURCEBRANCH#"refs/tags/v"}
if [[ "$TAG" == *stable* ]]; then export BUILD_TYPE=stable; else export BUILD_TYPE=latest; fi
export VERSION=${TAG/stable}
Expand Down Expand Up @@ -618,7 +621,7 @@ stages:
command: login
containerRegistry: cccstemp
- script: |
set -xv # Echo commands before they are run
set -exv # Echo commands before they are run
export TAG=${BUILD_SOURCEBRANCH#"refs/tags/v"}
# Prepare output directory
Expand Down

0 comments on commit 2fdd906

Please sign in to comment.