-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathforTestDocker.fish
executable file
·71 lines (64 loc) · 2.02 KB
/
forTestDocker.fish
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
66
67
68
69
70
71
#!/usr/bin/env fish
source jenkins/helper/jenkins.fish
if test -z "$DOCKER_TAG"
echo "DOCKER_TAG required"
exit 1
else
set -xg DOCKER_TAG_JENKINS "$DOCKER_TAG"
end
set archSuffix ""
function setArchSuffix
if test "$USE_ARM" = "On"
switch "$ARCH"
case "x86_64"
set archSuffix "-amd64"
case '*'
if string match --quiet --regex '^arm64$|^aarch64$' $ARCH >/dev/null
set archSuffix "-arm64v8"
else
echo "fatal, unknown architecture $ARCH for docker"
exit 1
end
end
end
end
cleanPrepareLockUpdateClear
and set -xg NOSTRIP 1
and packageStripNone
and rm -rf $WORKSPACE/imagenames.log
and community
and switchBranches $ARANGODB_BRANCH $ENTERPRISE_BRANCH true
and findArangoDBVersion
and buildStaticArangoDB
and downloadStarter
and setArchSuffix
and set -xg HUB_COMMUNITY "arangodb/arangodb-test:$DOCKER_TAG_JENKINS$archSuffix"
and buildDockerImage $HUB_COMMUNITY
and "$DOCKER" push $HUB_COMMUNITY
and "$DOCKER" tag $HUB_COMMUNITY $GCR_REG_PREFIX$HUB_COMMUNITY
and "$DOCKER" push $GCR_REG_PREFIX$HUB_COMMUNITY
and echo $HUB_COMMUNITY >> $WORKSPACE/imagenames.log
and echo $GCR_REG_PREFIX$HUB_COMMUNITY >> $WORKSPACE/imagenames.log
if test $status -ne 0
echo Production of community image failed, giving up...
cd "$HOME/$NODE_NAME/$OSKAR" ; moveResultsToWorkspace ; unlockDirectory
exit 1
end
enterprise
and switchBranches $ARANGODB_BRANCH $ENTERPRISE_BRANCH true
and findArangoDBVersion
and buildStaticArangoDB
and downloadStarter
and downloadSyncer
and copyRclone "linux"
and setArchSuffix
and set -xg HUB_ENTERPRISE "arangodb/enterprise-test:$DOCKER_TAG_JENKINS$archSuffix"
and buildDockerImage $HUB_ENTERPRISE
and "$DOCKER" push $HUB_ENTERPRISE
and "$DOCKER" tag $HUB_ENTERPRISE $GCR_REG_PREFIX$HUB_ENTERPRISE
and "$DOCKER" push $GCR_REG_PREFIX$HUB_ENTERPRISE
and echo $HUB_ENTERPRISE >> $WORKSPACE/imagenames.log
and echo $GCR_REG_PREFIX$HUB_ENTERPRISE >> $WORKSPACE/imagenames.log
set -l s $status
cd "$HOME/$NODE_NAME/$OSKAR" ; moveResultsToWorkspace ; unlockDirectory
exit $s