-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpublish.ps1
65 lines (53 loc) · 1.51 KB
/
publish.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#------------------------------------------------------------------------------
# FILE: publish.ps1
# CONTRIBUTOR: Marcus Bowyer
# COPYRIGHT: Copyright (c) 2017-2018 by Loopie, LLC. All rights reserved.
#
# Builds the [loopie/couchbase] images and and pushes it to Docker Hub.
#
# NOTE: You must be logged into Docker Hub.
#
# Usage: powershell -file ./publish.ps1 [-all]
param
(
[switch]$all = $False,
[switch]$nopush = $False
)
#----------------------------------------------------------
# Global Includes
$image_root = "$env:LOOPIE_ROOT\\Images"
. $image_root/includes.ps1
#----------------------------------------------------------
function Build
{
param
(
[parameter(Mandatory=$True, Position=1)][string] $version,
[switch]$latest = $False
)
$registry = "harbor.loopie.io/loopie/marketingwebsite"
$date = UtcDate
$tag = "$version"
# Build and push the images.
. ./build.ps1 -registry $registry -version $version -tag $tag
PushImage "${registry}:$tag"
if (($latest))
{
Exec { docker tag "${registry}:$tag" "${registry}:latest" }
PushImage "${registry}:latest"
}
}
$noImagePush = $nopush
if ($all)
{
# I'm not sure if these older .NET Core 2.0.x builds will work anymore
# after we upgraded to 2.1. There probably isn't a reason to rebuild
# these again though, because neonHIVE was never released to the public
# on .NET Core 2.1.
#
# Build 2.0.3-runtime
# Build 2.0.4-runtime
# Build 2.0.5-runtime -latest
# Build enterprise-6.0.1
}
Build 1.0.2 -latest