8000 Set up Docker build with Azure Pipelines · etherscan-io/Ravencoin@3b63649 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3b63649

Browse files
cfrogjumpblondfrogs
authored andcommitted
Set up Docker build with Azure Pipelines
[skip-ci]
1 parent df86011 commit 3b63649

File tree

1 file changed

+148
-0
lines changed

1 file changed

+148
-0
lines changed

azure-pipelines.yml

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# Docker
2+
# Build a Docker image
3+
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
4+
5+
trigger:
6+
- none
7+
8+
resources:
9+
- repo: self
10+
11+
variables:
12+
tag: '$(Build.BuildId)'
13+
14+
stages:
15+
- stage: Build
16+
displayName: Build Docker Images
17+
18+
jobs:
19+
- job: Build_amd64_image
20+
displayName: Build amd64 image
21+
pool:
22+
vmImage: 'ubuntu-latest'
23+
steps:
24+
- task: DownloadGitHubRelease@0
25+
inputs:
26+
connection: 'github.com_cfrogjump'
27+
userRepository: 'RavenProject/Ravencoin'
28+
defaultVersionType: 'latest'
29+
itemPattern: 'raven-*-*-linux*'
30+
downloadPath: '$(System.ArtifactsDirectory)'
31+
- task: Bash@3
32+
displayName: Figure out the environment
33+
inputs:
34+
targetType: 'inline'
35+
script: |
36+
env | sort
37+
38+
echo ""
39+
40+
echo "System.ArtifactsDirectory"
41+
ls $(System.ArtifactsDirectory)
42+
43+
echo ""
44+
echo "Where am I?"
45+
pwd
46+
echo ""
47+
48+
echo "Ravencoin"
49+
ls Ravencoin
50+
echo ""
51+
- task: Bash@3
52+
displayName: Setup Environment
53+
inputs:
54+
targetType: 'inline'
55+
script: |
56+
cd ${RELEASE_PRIMARYARTIFACTSOURCEALIAS}
57+
58+
mkdir linux64
59+
60+
echo "Installing build dependencies"
61+
bash -x .github/scripts/01-update-docker.sh
62+
echo ""
63+
- task: Bash@3
64+
displayName: Setup amd64 Build
65+
inputs:
66+
targetType: 'inline'
67+
script: |
68+
release_version=$(curl --silent https://api.github.com/repos/ravenproject/ravencoin/releases/latest | jq .tag_name | sed 's/\"//g' | tr -d "v").0
69+
70+
echo "Release Version: ${release_version}"
71+
echo ""
72+
echo "Checksum release"
73+
if [[ -e raven-${release_version}-x86_64-linux-gnu.tar.gz ]]; then
74+
sha256sum -c raven-${release_version}-x86_64-linux-gnu.tar.gz.sha256sum
75+
echo ""
76+
if [[ $? == 0 ]]; then
77+
echo "Extracting the release"
78+
tar zxvf raven-${release_version}-x86_64-linux-gnu.tar.gz
79+
mv raven-${release_version}/bin/* ${RELEASE_PRIMARYARTIFACTSOURCEALIAS}/linux64/
80+
fi
81+
else
82+
echo "Unable to find raven-${release_version}-x86_64-linux-gnu.tar.gz. $?"
83+
fi
84+
85+
echo ""
86+
echo "Hell yeah!"
87+
- task: Docker@2
88+
inputs:
89+
containerRegistry: 'dockerhub_cadecall'
90+
repository: 'ravenproject/ravend'
91+
command: 'buildAndPush'
92+
Dockerfile: '$(Build.SourcesDirectory)/Dockerfile.amd64'
93+
tags: 'amd64-$(Build.BuildNumber)'
94+
95+
- job: Build_arm32v7_image
96+
displayName: Build arm32v7 image
97+
pool:
98+
vmImage: 'ubuntu-latest'
99+
steps:
100+
- task: DownloadGitHubRelease@0
101+
inputs:
102+
connection: 'github.com_cfrogjump'
103+
userRepository: 'RavenProject/Ravencoin'
104+
defaultVersionType: 'latest'
105+
itemPattern: 'raven-*-*-linux*'
106+
downloadPath: '$(System.ArtifactsDirectory)'
107+
- task: Bash@3
108+
displayName: Setup Environment
109+
inputs:
110+
targetType: 'inline'
111+
script: |
112+
cd ${RELEASE_PRIMARYARTIFACTSOURCEALIAS}
113+
114+
mkdir linux64
115+
116+
echo "Installing build dependencies"
117+
bash -x .github/scripts/01-update-docker.sh
118+
echo ""
119+
- task: Bash@3
120+
inputs:
121+
targetType: 'inline'
122+
script: |
123+
release_version=$(curl --silent https://api.github.com/repos/ravenproject/ravencoin/releases/latest | jq .tag_name | sed 's/\"//g' | tr -d "v").0
124+
125+
echo "Release Version: ${release_version}"
126+
echo ""
127+
echo "Checksum release"
128+
if [[ -e raven-${release_version}-arm-linux-gnueabihf.tar.gz ]]; then
129+
sha256sum -c raven-${release_version}arm-linux-gnueabihf.tar.gz.sha256sum
130+
echo ""
131+
if [[ $? == 0 ]]; then
132+
echo "Extracting the release"
133+
tar zxvf raven-${release_version}-arm-linux-gnueabihf.tar.gz
134+
mv raven-${release_version}/bin/* ${RELEASE_PRIMARYARTIFACTSOURCEALIAS}/linux64/
135+
fi
136+
else
137+
echo "Unable to find raven-${release_version}-arm-linux-gnueabihf.tar.gz. $?"
138+
fi
139+
140+
echo ""
141+
echo "Hell yeah!"
142+
- task: Docker@2
143+
inputs:
144+
containerRegistry: 'dockerhub_cadecall'
145+
repository: 'ravenproject/ravend'
146+
command: 'buildAndPush'
147+
Dockerfile: '$(Build.SourcesDirectory)/Dockerfile.arm32v7'
148+
tags: 'arm32v7-$(Build.BuildNumber)'

0 commit comments

Comments
 (0)
0