dendrite/azure-pipelines.yml
2021-09-13 17:29:31 +10:00

49 lines
1.2 KiB
YAML

# Go
# Build your Go project.
# Add steps that test, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/go
trigger:
- develop
pool:
vmImage: ubuntu-latest
steps:
- task: Bash@3
displayName: 'Manually install golang environment v1.17.1'
inputs:
targetType: 'inline'
script: |
echo 'Download v.1.14'
wget https://dl.google.com/go/go1.17.1.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.17.1.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
go version
- task: Bash@3
displayName: 'Build the executables'
inputs:
targetType: 'inline'
script: './build.sh'
workingDirectory: '$(Build.SourcesDirectory)'
- task: DockerInstaller@0
inputs:
dockerVersion: '17.09.0-ce'
- task: Bash@3
displayName: 'Build the docker container'
inputs:
targetType: 'inline'
script: |
echo 'Building docker container'
./build/docker/images-build.sh
- task: Docker@2
displayName: 'Push the container to the dockerhub registry'
inputs:
containerRegistry: 'service-connection-docker_jaredjacobson'
repository: 'jaredjacobson/dendrite-monolith'
command: 'push'