-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ba8892
commit 0a229e3
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: build | ||
|
||
trigger: | ||
tags: | ||
include: ["v*"] | ||
|
||
pool: | ||
vmImage: 'ubuntu-18.04' | ||
|
||
stages: | ||
- stage: deploy | ||
jobs: | ||
- job: deploy | ||
displayName: Deploy containers to dockerhub | ||
variables: | ||
- group: deployment-information | ||
steps: | ||
- task: Docker@2 | ||
displayName: Login to docker hub | ||
inputs: | ||
command: login | ||
containerRegistry: dockerhub | ||
- script: | | ||
set -xv # Echo commands before they are run | ||
export TAG=${BUILD_SOURCEBRANCH#"refs/tags/v"} | ||
docker build --build-arg version=$TAG -t cccs/assemblyline-service-metadefender:$TAG -t cccs/assemblyline-service-metadefender:latest . | ||
docker push cccs/assemblyline-service-metadefender | ||
displayName: Deploy to Docker Hub |