Skip to content

Commit 489bad1

Browse files
authored
JAIL-15 Post-push build for containerized masking (#222)
1 parent 9b74332 commit 489bad1

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright 2021 Delphix
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# shellcheck disable=SC2034
18+
19+
#
20+
# This package has the same Git URL as the 'masking' package. In general we
21+
# probably don't want to have multiple packages with the same URL, since tools
22+
# like git-ab-pre-push expect that there is a 1:1 correspondence between
23+
# packages and URLs. However, this is OK in this case because git-ab-pre-push
24+
# only works with packages that are included in the appliance, which this one
25+
# isn't.
26+
#
27+
DEFAULT_PACKAGE_GIT_URL="https://gitlab.delphix.com/masking/dms-core-gate.git"
28+
29+
PACKAGE_DEPENDENCIES="adoptopenjdk"
30+
SKIP_COPYRIGHTS_CHECK=true
31+
32+
function prepare() {
33+
logmust install_pkgs "$DEPDIR"/adoptopenjdk/*.deb
34+
}
35+
36+
function build() {
37+
export JAVA_HOME
38+
JAVA_HOME=$(cat "$DEPDIR/adoptopenjdk/JDK_PATH") ||
39+
die "Failed to read $DEPDIR/adoptopenjdk/JDK_PATH"
40+
41+
logmust cd "$WORKDIR/repo"
42+
43+
logmust ./gradlew --no-daemon --stacktrace \
44+
-Porg.gradle.configureondemand=false \
45+
-PenvironmentName=linuxappliance \
46+
:tools:docker:packageMaskingKubernetes
47+
48+
logmust cp -v tools/docker/build/masking-kubernetes.zip \
49+
"$WORKDIR/artifacts/"
50+
}

0 commit comments

Comments
 (0)