mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-29 01:33:10 -06:00
54 lines
1.3 KiB
YAML
54 lines
1.3 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: Bash@3
|
|
displayName: 'Push the container to the registry'
|
|
inputs:
|
|
targetType: 'inline'
|
|
script: |
|
|
echo 'Uploading container'
|
|
export PAT=$(dockerhub_access_token)
|
|
echo $PAT | docker login -u $(dockerhub_username) --password-stdin
|
|
docker push $(dockerhub_username)/dendrite-monolith:latest
|
|
|