@@ -15,7 +15,7 @@ stages:
15
15
- stage : build
16
16
pool :
17
17
name : pool-ubuntu-2004
18
- displayName : " Build aztfy "
18
+ displayName : " Build"
19
19
jobs :
20
20
- job : build
21
21
displayName : " Build Binaries"
@@ -54,9 +54,9 @@ stages:
54
54
set -e
55
55
REVISION=`git rev-parse --short HEAD`
56
56
mkdir build
57
- name=aztfy
57
+ name=aztfexport
58
58
if [[ $OS = windows ]]; then
59
- name=aztfy .exe
59
+ name=aztfexport .exe
60
60
fi
61
61
GOOS="${OS}" GOARCH="${ARCH}" CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X 'main.version=${VERSION}' -X 'main.revision=${REVISION}'" -o build/$name
62
62
displayName: "Go Build"
@@ -123,7 +123,7 @@ stages:
123
123
ARCH : amd64
124
124
steps :
125
125
- task : DownloadPipelineArtifact@2
126
- displayName : " Download aztfy binary"
126
+ displayName : " Download binary"
127
127
inputs :
128
128
artifact : windows-$(ARCH)
129
129
path : $(system.defaultWorkingDirectory)/dist/bin
@@ -147,10 +147,10 @@ stages:
147
147
cd $workdir/scripts/package/windows/build
148
148
declare -A map=( [386]=x86 [amd64]=x64 )
149
149
export VERSION=${VERSION:1}
150
- cp $workdir/dist/bin/aztfy .exe .
150
+ cp $workdir/dist/bin/aztfexport .exe .
151
151
candle.exe -arch ${map[$ARCH]} -o setup.wxobj ./setup.wxs
152
152
mkdir $workdir/dist/output
153
- light.exe -out $workdir/dist/output/aztfy .msi ./setup.wxobj
153
+ light.exe -out $workdir/dist/output/aztfexport .msi ./setup.wxobj
154
154
env:
155
155
workdir: $(system.defaultWorkingDirectory)
156
156
VERSION: ${{ parameters.version }}
@@ -230,52 +230,52 @@ stages:
230
230
- script : |
231
231
set -e
232
232
233
- chmod +x $WORKDIR/dist/source/aztfy
233
+ chmod +x $WORKDIR/dist/source/aztfexport
234
234
235
235
declare -A deb_arch_map=( [386]=i386 [amd64]=amd64 [arm]=armhf [arm64]=arm64 )
236
236
declare -A rpm_arch_map=( [386]=i686 [amd64]=x86_64 [arm]=armv7hl [arm64]=aarch64 )
237
237
version=${VERSION:1}
238
238
239
239
# Build the image
240
240
cd $WORKDIR/scripts/package/linux/build
241
- docker build -t aztfybuild .
241
+ docker build -t aztfexportbuild .
242
242
243
243
# Build deb package
244
244
docker run -t --rm \
245
245
-v $WORKDIR/dist/source:/build/source \
246
246
-v $WORKDIR/dist/output:/build/output \
247
- aztfybuild \
247
+ aztfexportbuild \
248
248
fpm \
249
- --name aztfy \
249
+ --name aztfexport \
250
250
--license MPL-2.0 \
251
251
--version $version \
252
252
--description "A tool to bring existing Azure resources under Terraform's management" \
253
- --url "https://github.com/Azure/aztfy " \
253
+ --url "https://github.com/Azure/aztfexport " \
254
254
--maintainer "magodo <[email protected] >" \
255
255
--input-type dir \
256
256
--output-type deb \
257
257
--architecture ${deb_arch_map[$ARCH]} \
258
- --package /build/output/aztfy -$version-1-${deb_arch_map[$ARCH]}.deb \
259
- /build/source/aztfy =/usr/bin/aztfy
258
+ --package /build/output/aztfexport -$version-1-${deb_arch_map[$ARCH]}.deb \
259
+ /build/source/aztfexport =/usr/bin/aztfexport
260
260
261
261
# Build rpm package
262
262
echo $version
263
263
docker run -t --rm \
264
264
-v $WORKDIR/dist/source:/build/source \
265
265
-v $WORKDIR/dist/output:/build/output \
266
- aztfybuild \
266
+ aztfexportbuild \
267
267
fpm \
268
- --name aztfy \
268
+ --name aztfexport \
269
269
--license MPL-2.0 \
270
270
--version ${version} \
271
271
--description "A tool to bring existing Azure resources under Terraform's management" \
272
- --url "https://github.com/Azure/aztfy " \
272
+ --url "https://github.com/Azure/aztfexport " \
273
273
--maintainer "magodo <[email protected] >" \
274
274
--input-type dir \
275
275
--output-type rpm \
276
276
--architecture ${rpm_arch_map[$ARCH]} \
277
- --package /build/output/aztfy -$version-1-${rpm_arch_map[$ARCH]}.rpm \
278
- /build/source/aztfy =/usr/bin/aztfy
277
+ --package /build/output/aztfexport -$version-1-${rpm_arch_map[$ARCH]}.rpm \
278
+ /build/source/aztfexport =/usr/bin/aztfexport
279
279
displayName: "Build Packages"
280
280
env:
281
281
VERSION: ${{ parameters.version }}
@@ -334,7 +334,7 @@ stages:
334
334
runId : ${{ parameters.artifactBuildId }}
335
335
- script : |
336
336
set -e
337
- NAME="aztfy "
337
+ NAME="aztfexport "
338
338
OS_ARCH=(
339
339
"windows:amd64"
340
340
"windows:386"
@@ -349,17 +349,17 @@ stages:
349
349
for os_arch in "${OS_ARCH[@]}" ; do
350
350
OS=${os_arch%%:*}
351
351
ARCH=${os_arch#*:}
352
- name=aztfy
352
+ name=aztfexport
353
353
if [[ $OS = windows ]]; then
354
- name=aztfy .exe
354
+ name=aztfexport .exe
355
355
fi
356
356
chmod +x dist/${OS}-${ARCH}/${name}
357
357
zip -j release/${NAME}_${VERSION}_${OS}_${ARCH}.zip dist/${OS}-${ARCH}/${name}
358
358
done
359
359
360
360
# Copy MSI
361
- cp dist/windows-386-msi/aztfy .msi release/${NAME}_${VERSION}_x86.msi
362
- cp dist/windows-amd64-msi/aztfy .msi release/${NAME}_${VERSION}_x64.msi
361
+ cp dist/windows-386-msi/aztfexport .msi release/${NAME}_${VERSION}_x86.msi
362
+ cp dist/windows-amd64-msi/aztfexport .msi release/${NAME}_${VERSION}_x64.msi
363
363
364
364
cd release
365
365
shasum -a 256 *.zip *.msi > ${NAME}_SHA256SUMS
@@ -397,7 +397,7 @@ stages:
397
397
git config user.name "azure-terraform-bot"
398
398
git config user.email "[email protected] "
399
399
git tag -a "${VERSION}" -m "${VERSION}"
400
- git push https://${PAT}@github.com/Azure/aztfy .git --tags
400
+ git push https://${PAT}@github.com/Azure/aztfexport .git --tags
401
401
displayName: "Create and Push a Git Release"
402
402
env:
403
403
VERSION: ${{ parameters.version }}
@@ -665,7 +665,7 @@ stages:
665
665
iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
666
666
git clone https://github.com/microsoft/winget-pkgs.git
667
667
cd winget-pkgs
668
- ..\wingetcreate.exe update --urls https://github.com/Azure/aztfy /releases/download/$env:VERSION/aztfy_ $($env:VERSION)_x64.msi https://github.com/Azure/aztfy /releases/download/$env:VERSION/aztfy_ $($env:VERSION)_x86.msi --version $env:VERSION.Substring(1) --submit --token $env:PAT Microsoft.Azure.Aztfy
668
+ ..\wingetcreate.exe update --urls https://github.com/Azure/aztfexport /releases/download/$env:VERSION/aztfexport_ $($env:VERSION)_x64.msi https://github.com/Azure/aztfexport /releases/download/$env:VERSION/aztfexport_ $($env:VERSION)_x86.msi --version $env:VERSION.Substring(1) --submit --token $env:PAT Microsoft.Azure.AztfExport
669
669
displayName: "Create PR"
670
670
env:
671
671
VERSION: ${{ parameters.version }}
@@ -692,7 +692,7 @@ stages:
692
692
cd "$(brew --repository homebrew/core)"
693
693
git config user.name "azure-terraform-bot"
694
694
git config user.email "[email protected] "
695
- HOMEBREW_GITHUB_API_TOKEN=${PAT} brew bump-formula-pr --version=${VERSION:1} --no-browse --force aztfy
695
+ HOMEBREW_GITHUB_API_TOKEN=${PAT} brew bump-formula-pr --version=${VERSION:1} --no-browse --force aztfexport
696
696
displayName: "Create PR"
697
697
env:
698
698
VERSION: ${{ parameters.version }}
0 commit comments