on master help sign in
Merge branch 'master' of https://github.com/hughjfchen/project-m36 into dockerci
commit762f6c20516d5111e412910e99a319eea1fff0cc authorA.M <agentm@themactionfaction.com> dateSat 4 Jul 2020, 20:40 (6 years ago) parentf65d06a3602928
95 files changed+3218−36
.travis.yml+28−36 .travis.yml.orig+68 DevOps/common/common.sh+148 DevOps/local/test/build/build.sh+18 DevOps/local/test/build/finishing.sh+14 DevOps/local/test/build/prepare.sh+81 DevOps/local/test/build/unbuild.sh+14 DevOps/local/test/build/unfinishing.sh+13 DevOps/local/test/build/unprepare.sh+34 DevOps/local/test/cb-cd-ct.sh+63 DevOps/local/test/cb-cd.sh+49 DevOps/local/test/cb.sh+34 DevOps/local/test/cd-ct.sh+49 DevOps/local/test/cd.sh+34 DevOps/local/test/ct.sh+34 DevOps/local/test/deploy/deploy.sh+13 DevOps/local/test/deploy/finishing.sh+13 DevOps/local/test/deploy/prepare.sh+116 DevOps/local/test/deploy/undeploy.sh+13 DevOps/local/test/deploy/unfinishing.sh+13 DevOps/local/test/deploy/unprepare.sh+59 DevOps/local/test/finishing.sh+36 DevOps/local/test/prepare.sh+39 DevOps/local/test/test/finishing.sh+13 DevOps/local/test/test/prepare.sh+13 DevOps/local/test/test/test.sh+13 DevOps/local/test/test/unfinishing.sh+13 DevOps/local/test/test/unprepare.sh+13 DevOps/local/test/test/untest.sh+13 DevOps/local/test/uncb-uncd-unct.sh+63 DevOps/local/test/uncb-uncd.sh+49 DevOps/local/test/uncb.sh+34 DevOps/local/test/uncd-unct.sh+49 DevOps/local/test/uncd.sh+34 DevOps/local/test/unct.sh+34 DevOps/local/test/unfinishing.sh+37 DevOps/local/test/unprepare.sh+36 ci/DevOps/common/common.sh+144 ci/DevOps/local/test/build/build.sh+32 ci/DevOps/local/test/build/finishing.sh+13 ci/DevOps/local/test/build/nix/data-interval.nix+19 ci/DevOps/local/test/build/nix/default.nix+474 ci/DevOps/local/test/build/nix/distributed-process-async.nix+32 ci/DevOps/local/test/build/nix/distributed-process-client-server.nix+34 ci/DevOps/local/test/build/nix/distributed-process-extras.nix+35 ci/DevOps/local/test/build/nix/distributed-process.nix+27 ci/DevOps/local/test/build/nix/distributed-static.nix+15 ci/DevOps/local/test/build/nix/extended-reals.nix+19 ci/DevOps/local/test/build/nix/hashable-time.nix+12 ci/DevOps/local/test/build/nix/megaparsec.nix+20 ci/DevOps/local/test/build/nix/network-transport-tcp.nix+19 ci/DevOps/local/test/build/nix/nixpkgs+10 ci/DevOps/local/test/build/nix/nixpkgs.template+6 ci/DevOps/local/test/build/nix/primitive-unlifted.nix+12 ci/DevOps/local/test/build/nix/project-m36.nix+72 ci/DevOps/local/test/build/nix/rank1dynamic.nix+18 ci/DevOps/local/test/build/nix/rset.nix+13 ci/DevOps/local/test/build/nix/shell.nix+1 ci/DevOps/local/test/build/nix/stm-containers.nix+20 ci/DevOps/local/test/build/nix/stm-hamt.nix+27 ci/DevOps/local/test/build/prepare.sh+21 ci/DevOps/local/test/build/unbuild.sh+18 ci/DevOps/local/test/build/unfinishing.sh+13 ci/DevOps/local/test/build/unprepare.sh+13 ci/DevOps/local/test/cb-cd-ct.sh+40 ci/DevOps/local/test/cb-cd.sh+33 ci/DevOps/local/test/cb.sh+25 ci/DevOps/local/test/cd-ct.sh+31 ci/DevOps/local/test/cd.sh+25 ci/DevOps/local/test/ct.sh+25 ci/DevOps/local/test/deploy/config/some-sub-project.dhall ci/DevOps/local/test/deploy/deploy.sh+15 ci/DevOps/local/test/deploy/docker-compose.yml+21 ci/DevOps/local/test/deploy/finishing.sh+16 ci/DevOps/local/test/deploy/non-docker-dependencies/some-sub-project-non-docker-dependencies-list.dhall ci/DevOps/local/test/deploy/prepare.sh+56 ci/DevOps/local/test/deploy/undeploy.sh+15 ci/DevOps/local/test/deploy/unfinishing.sh+13 ci/DevOps/local/test/deploy/unprepare.sh+38 ci/DevOps/local/test/finishing.sh+13 ci/DevOps/local/test/prepare.sh+14 ci/DevOps/local/test/test/finishing.sh+13 ci/DevOps/local/test/test/prepare.sh+13 ci/DevOps/local/test/test/test.sh+13 ci/DevOps/local/test/test/unfinishing.sh+13 ci/DevOps/local/test/test/unprepare.sh+13 ci/DevOps/local/test/test/untest.sh+13 ci/DevOps/local/test/uncb-uncd-unct.sh+45 ci/DevOps/local/test/uncb-uncd.sh+36 ci/DevOps/local/test/uncb.sh+27 ci/DevOps/local/test/uncd-unct.sh+36 ci/DevOps/local/test/uncd.sh+27 ci/DevOps/local/test/unct.sh+27 ci/DevOps/local/test/unfinishing.sh+13 ci/DevOps/local/test/unprepare.sh+13
.travis.yml+28−36
@@ -1,60 +1,52 @@
11# For more information, see https://github.com/ChrisPenner/haskell-stack-travis-ci
22language: c
3−sudo: false
3+# sudo: true -- this is deprecated
44
55git:
66 submodules: false # whether to recursively clone submodules
77
8−cache:
9− directories:
10− - $HOME/.ghc
11− - $HOME/.cabal
12− - $HOME/.stack
13− - .stack-work
14− timeout: 1000
8+os: linux
9+dist: bionic
1510
16−matrix:
11+jobs:
1712 fast_finish: true
1813 include:
19− - env: CACHE_NAME=8.4.4 STACK_YAML=stack.ghc8.4.yaml
20− compiler: ": #stack 8.4.4"
21−
22− - env: CACHE_NAME=8.6.5 STACK_YAML=stack.ghc8.6.yaml
23− compiler: ": #stack 8.6.5"
24−
25− - env: CACHE_NAME=osx-8.6.5 STACK_YAML=stack.ghc8.6.yaml
26− os: osx
27− osx_image: xcode11
28− compiler: ": #stack 8.6.5"
14+ # disable because some of the travis-ci osx images would ask password for sudo
15+ # - env: BUILD_NAME=OSX
16+ # os: osx
17+ # osx_image: xcode11.4
18+
19+ - env: BUILD_NAME=LINUX-AMD64
20+ os: linux
21+ dist: bionic
22+ arch: amd64
23+
24+ # disable due to it takes too long. For a successful build, it may take over 20 hours!
25+ # - env: BUILD_NAME=LINUX-ARM64
26+ # os: linux
27+ # dist: bionic
28+ # arch: arm64
2929
3030before_script:
3131 - unset CC
32− - export PATH=$HOME/.local/bin:/opt/ghc/$GHC_VERSION/bin:$PATH
33− - ./.travis/install-ghr.sh
34− - ./.travis/install-stack.sh
32+ - sudo -n true || echo "sudo password needed, may fail"
33+ - sudo -v
3534
3635# Here starts the actual work to be performed for the package under test;
3736# any command which exits with a non-zero exit code causes the build to fail.
3837script:
3938 - |
4039 # Run tests
41− set -e
42− ./.travis/install-dependencies.sh
43− stack --no-terminal --jobs=2 --system-ghc test
44− - |
45− #Run HLint
46− if [[ "$(uname)" = "Linux" ]]; then
47− curl -sL https://raw.github.com/ndmitchell/hlint/master/misc/travis.sh | sh -s lint src test examples --cpp-define VERSION_project_m36=HLINT
48− fi
49− - |
50− #Run Haddock
51− if [[ "$(uname)" = "Linux" ]]; then
52− stack --no-install-ghc --system-ghc --no-haddock-deps haddock
53− fi
40+ ./ci/DevOps/local/test/cb.sh
5441
5542after_success:
5643 - |
5744 # Build and ship binary
58− #./.travis/attach-binary.sh
45+ # cd.sh will deploy the built image locally and push it to the docker hub
46+ # Because it needs to login to docker hub, you should define the following
47+ # two env variables in the travis-ci.org setting page of this repository
48+ # project_m36_DOCKER_HUB_USERNAME
49+ # project_m36_DOCKER_HUB_PASSWORD
50+ ./ci/DevOps/local/test/cd.sh
5951
6052# EOF
.travis.yml.orignew file+68
@@ -0,0 +1,68 @@
1+# For more information, see https://github.com/ChrisPenner/haskell-stack-travis-ci
2+language: c
3+sudo: false
4+
5+git:
6+ submodules: false # whether to recursively clone submodules
7+
8+cache:
9+ directories:
10+ - $HOME/.ghc
11+ - $HOME/.cabal
12+ - $HOME/.stack
13+ - .stack-work
14+ timeout: 1000
15+
16+matrix:
17+ fast_finish: true
18+ include:
19+ - env: CACHE_NAME=8.2.2 STACK_YAML=stack.ghc8.2.yaml
20+ compiler: ": #stack 8.2.2"
21+
22+ - env: CACHE_NAME=osx-8.2.2 STACK_YAML=stack.ghc8.2.yaml
23+ os: osx
24+ osx_image: xcode7.3
25+ compiler: ": #stack 8.2.2"
26+
27+ - env: CACHE_NAME=8.4.4 STACK_YAML=stack.ghc8.4.yaml
28+ compiler: ": #stack 8.4.4"
29+
30+ - env: CACHE_NAME=8.6.5 STACK_YAML=stack.ghc8.6.yaml
31+ compiler: ": #stack 8.6.5"
32+
33+ - env: CACHE_NAME=osx-8.6.5 STACK_YAML=stack.ghc8.6.yaml
34+ os: osx
35+ osx_image: xcode11
36+ compiler: ": #stack 8.6.5"
37+
38+before_script:
39+ - unset CC
40+ - export PATH=$HOME/.local/bin:/opt/ghc/$GHC_VERSION/bin:$PATH
41+ - ./.travis/install-ghr.sh
42+ - ./.travis/install-stack.sh
43+
44+# Here starts the actual work to be performed for the package under test;
45+# any command which exits with a non-zero exit code causes the build to fail.
46+script:
47+ - |
48+ # Run tests
49+ set -e
50+ ./.travis/install-dependencies.sh
51+ stack --no-terminal --jobs=2 --system-ghc test
52+ - |
53+ #Run HLint
54+ if [[ "$(uname)" = "Linux" ]]; then
55+ curl -sL https://raw.github.com/ndmitchell/hlint/master/misc/travis.sh | sh -s lint src test examples --cpp-define VERSION_project_m36=HLINT
56+ fi
57+ - |
58+ #Run Haddock
59+ if [[ "$(uname)" = "Linux" ]]; then
60+ stack --no-install-ghc --system-ghc --no-haddock-deps haddock
61+ fi
62+
63+after_success:
64+ - |
65+ # Build and ship binary
66+ #./.travis/attach-binary.sh
67+
68+# EOF
DevOps/common/common.shnew file+148
@@ -0,0 +1,148 @@
1+#!/usr/bin/env bash
2+set -Eeuo pipefail
3+
4+guard_bash_error () {
5+ set -Eeuo pipefail
6+}
7+
8+# Log levels
9+INFO=0
10+WARN=1
11+ERROR=2
12+FATAL=3
13+DEBUG=4
14+DEFAULT_LOG_LEVEL=${ERROR}
15+
16+my_exit () {
17+ echo "EXIT: - [HOST:$(hostname)]: - $(date +"%Y-%m-%d %H:%M:%S") - $1"
18+ exit "$2"
19+}
20+
21+msg () {
22+ if [ $1 -le ${DEFAULT_LOG_LEVEL} ]; then
23+ echo "[HOST:$(hostname)]: - $(date +"%Y-%m-%d %H:%M:%S") - $2"
24+ fi
25+}
26+
27+info () {
28+ msg ${INFO} "INFO: - $1"
29+}
30+
31+warn () {
32+ msg ${WARN} "WARNING: - $1"
33+}
34+
35+error () {
36+ msg ${ERROR} "ERROR: - $1"
37+}
38+
39+fatal () {
40+ msg ${FATAL} "FATAL: - $1"
41+}
42+
43+debug () {
44+ msg ${DEBUG} "DEBUG: - $1"
45+}
46+
47+begin_banner () {
48+ info "$1 - $2 phase - begin"
49+}
50+
51+done_banner () {
52+ info "$1 - $2 phase - done"
53+}
54+
55+### turn path within script into absolute path
56+### must pass the calling string of the script as the first parameter
57+### e.g., ./path_to_script/script.sh
58+### or, /root/path_to_script/script.sh
59+### return the absolute path to the script with "echo" command
60+turn_to_absolute_path () {
61+ local SCRIPT_ABS_PATH_RAW="$(dirname "$1")"
62+ # turn SCRIPT_ABS_PATH into absolute path
63+ case ${SCRIPT_ABS_PATH_RAW} in
64+ /*) echo "${SCRIPT_ABS_PATH_RAW}" ;;
65+ \.\.*) echo "$PWD/${SCRIPT_ABS_PATH_RAW}" ;;
66+ \.*) echo "$PWD/${SCRIPT_ABS_PATH_RAW}" ;;
67+ *) echo "$PWD" ;;
68+ esac
69+}
70+
71+### change CD to up to the project root directory
72+### must pass the absolute path to the script as the first parameter
73+change_CD_to_project_root () {
74+ cd "$1"
75+ local up_level=..
76+ local my_loop=10 # guard not to loop forever
77+ until ls "${up_level}"|grep -w DevOps > /dev/null 2>&1 && [ ${my_loop} -gt 0 ]
78+ do
79+ up_level=${up_level}/..
80+ my_loop=$(expr ${my_loop} - 1)
81+ done
82+ if [ ${my_loop} -eq 0 ]; then
83+ my_exit "Too many level up within the searching for DevOps directory,abort." 1
84+ fi
85+ cd "$1/${up_level}"
86+}
87+
88+### check OS and distribution
89+### return the OS distribution and ID with "echo" command
90+check_dist_or_OS () {
91+ local MY_THE_DISTRIBUTION_ID=""
92+ local MY_THE_DISTRIBUTION_VERSION=""
93+ if [ -e /etc/os-release ]; then
94+ MY_THE_DISTRIBUTION_ID=$(grep -w "ID" /etc/os-release |awk -F"=" '{print $NF}'|sed 's/"//g')
95+ if [ "${MY_THE_DISTRIBUTION_ID}" == "ubuntu" ]; then
96+ MY_THE_DISTRIBUTION_VERSION=$(grep -w "VERSION_ID" /etc/os-release |awk -F"=" '{print $NF}'|sed 's/"//g')
97+ else
98+ MY_THE_DISTRIBUTION_VERSION=$(grep -w "VERSION_ID" /etc/os-release |awk -F"=" '{print $NF}'|awk -F"." '{print $1}'|sed 's/"//g')
99+ fi
100+ echo "${MY_THE_DISTRIBUTION_ID} ${MY_THE_DISTRIBUTION_VERSION}"
101+ else if type uname > /dev/null 2>&1; then
102+ MY_THE_DISTRIBUTION_ID=$(uname -s)
103+ MY_THE_DISTRIBUTION_VERSION=$(uname -r)
104+ echo "${MY_THE_DISTRIBUTION_ID} ${MY_THE_DISTRIBUTION_VERSION}"
105+ else
106+ echo ""
107+ fi
108+ fi
109+}
110+
111+### guard that the caller of the script must be root or has sudo right
112+guard_root_or_sudo () {
113+ if [[ $EUID > 0 ]] && ! sudo -v >/dev/null 2>&1; then
114+ return 1
115+ else
116+ return 0
117+ fi
118+}
119+
120+### init script with check if root or sudo
121+init_with_root_or_sudo () {
122+ guard_bash_error
123+
124+ if ! guard_root_or_sudo; then
125+ my_exit "You must be root or you must be sudoer to prepare the env for CI/CD." 1
126+ fi
127+
128+ SCRIPT_ABS_PATH=$(turn_to_absolute_path $0)
129+
130+ change_CD_to_project_root ${SCRIPT_ABS_PATH}
131+
132+ THE_DISTRIBUTION_ID_VERSION=$(check_dist_or_OS)
133+ THE_DISTRIBUTION_ID=$(echo ${THE_DISTRIBUTION_ID_VERSION}|awk '{print $1}')
134+ THE_DISTRIBUTION_VERSION=$(echo ${THE_DISTRIBUTION_ID_VERSION}|awk '{print $2}')
135+}
136+
137+### init script without check if root or sudo
138+init_without_root_or_sudo () {
139+ guard_bash_error
140+
141+ SCRIPT_ABS_PATH=$(turn_to_absolute_path $0)
142+
143+ change_CD_to_project_root ${SCRIPT_ABS_PATH}
144+
145+ THE_DISTRIBUTION_ID_VERSION=$(check_dist_or_OS)
146+ THE_DISTRIBUTION_ID=$(echo ${THE_DISTRIBUTION_ID_VERSION}|awk '{print $1}')
147+ THE_DISTRIBUTION_VERSION=$(echo ${THE_DISTRIBUTION_ID_VERSION}|awk '{print $2}')
148+}
DevOps/local/test/build/build.shnew file+18
@@ -0,0 +1,18 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "build build"
12+
13+#set +u to temp work around the nix script
14+set +u
15+[[ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]] && . $HOME/.nix-profile/etc/profile.d/nix.sh
16+set -u
17+
18+done_banner "Top level" "build build"
DevOps/local/test/build/finishing.shnew file+14
@@ -0,0 +1,14 @@
1+#!/usr/bin/env bash
2+
3+if ! type dirname > /dev/null 2>&1; then
4+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
5+ exit 1
6+fi
7+
8+. "$(dirname "$0")"/../../../common/common.sh
9+
10+init_with_root_or_sudo "$0"
11+
12+begin_banner "Top level" "build finishing"
13+
14+done_banner "Top level" "build finishing"
DevOps/local/test/build/prepare.shnew file+81
@@ -0,0 +1,81 @@
1+#!/usr/bin/env bash
2+
3+if ! type dirname > /dev/null 2>&1; then
4+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
5+ exit 1
6+fi
7+
8+. "$(dirname "$0")"/../../../common/common.sh
9+
10+init_with_root_or_sudo "$0"
11+
12+begin_banner "Top level" "build prepare"
13+
14+get_last_stable_nix_channel () {
15+ local MY_CHANNEL_NAME_REGEX=""
16+ case ${THE_DISTRIBUTION_ID} in
17+ debian|ubuntu|rhel|centos) MY_CHANNEL_NAME_REGEX='s/.*\(nixos-[0-9][0-9].[0-9][0-9]\).*/\1/p' ;;
18+ Darwin) MY_CHANNEL_NAME_REGEX='s/.*\(nixpkgs-[0-9][0-9].[0-9][0-9]-darwin\).*/\1/p' ;;
19+ *) ;;
20+ esac
21+ local MY_LAST_NIX_STABLE_CHANNEL=$(git ls-remote --heads https://github.com/NixOS/nixpkgs-channels | awk '{print $NF}' | awk -F"/" '{print $NF}' | grep -v "\-unstable" | grep -v "\-small" | sed -n ${MY_CHANNEL_NAME_REGEX} | sort | tail -2 | head -1)
22+ echo ${MY_LAST_NIX_STABLE_CHANNEL}
23+}
24+
25+switch_to_last_stable_nix_channel () {
26+ nix-channel --remove nixpkgs
27+ nix-channel --add "https://nixos.org/channels/$(get_last_stable_nix_channel)" nixpkgs
28+ nix-channel --update
29+}
30+
31+set +u
32+[[ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]] && . $HOME/.nix-profile/etc/profile.d/nix.sh
33+set -u
34+
35+if ! type nix-build >/dev/null 2>&1; then
36+ info "no nix-build found, trying to install it"
37+ case ${THE_DISTRIBUTION_ID} in
38+ debian)
39+ [[ -e /proc/sys/kernel/unprivileged_userns_clone ]] && sudo sysctl kernel.unprivileged_userns_clone=1
40+ curl https://nixos.org/nix/install | sh
41+ ;;
42+ ubuntu)
43+ [[ -e /proc/sys/kernel/unprivileged_userns_clone ]] && sudo sysctl kernel.unprivileged_userns_clone=1
44+ curl https://nixos.org/nix/install | sh
45+ ;;
46+ Darwin)
47+ curl https://nixos.org/nix/install | sh
48+ ;;
49+ rhel|centos)
50+ curl https://nixos.org/releases/nix/nix-2.1.3/install | sh
51+ ;;
52+ *) ;;
53+ esac
54+ set +u
55+ . $HOME/.nix-profile/etc/profile.d/nix.sh
56+ set -u
57+ switch_to_last_stable_nix_channel
58+fi
59+
60+if ! type patchelf >/dev/null 2>&1; then
61+ info "no patchelf found, trying to install it"
62+ nix-env --install patchelf
63+fi
64+
65+if ! type cabal2nix >/dev/null 2>&1; then
66+ info "no cabal2nix found, trying to install it"
67+
68+ nix-env --install cabal2nix
69+fi
70+
71+if ! type nix-prefetch-git >/dev/null 2>&1; then
72+ info "no nix-prefetch-git found, trying to install it"
73+ nix-env --install nix-prefetch-git
74+fi
75+
76+if ! type cabal >/dev/null 2>&1; then
77+ info "no cabal-install found, trying to install it"
78+ nix-env --install cabal-install
79+fi
80+
81+done_banner "Top level" "build prepare"
DevOps/local/test/build/unbuild.shnew file+14
@@ -0,0 +1,14 @@
1+#!/usr/bin/env bash
2+
3+if ! type dirname > /dev/null 2>&1; then
4+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
5+ exit 1
6+fi
7+
8+. "$(dirname "$0")"/../../../common/common.sh
9+
10+init_with_root_or_sudo "$0"
11+
12+begin_banner "Top level" "build unbuild"
13+
14+done_banner "Top level" "build unbuild"
DevOps/local/test/build/unfinishing.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "build unfinishing"
12+
13+done_banner "Top level" "build unfinishing"
DevOps/local/test/build/unprepare.shnew file+34
@@ -0,0 +1,34 @@
1+#!/usr/bin/env bash
2+
3+if ! type dirname > /dev/null 2>&1; then
4+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
5+ exit 1
6+fi
7+
8+. "$(dirname "$0")"/../../../common/common.sh
9+
10+init_with_root_or_sudo "$0"
11+
12+begin_banner "Top level" "build unprepare"
13+
14+set +u
15+[[ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]] && . $HOME/.nix-profile/etc/profile.d/nix.sh
16+set -u
17+
18+if type nix-build >/dev/null 2>&1; then
19+ info "nix-build found, trying to uninstall it"
20+ if [ "${THE_DISTRIBUTION_ID}" == "debian" ] || [ "${THE_DISTRIBUTION_ID}" == "ubuntu" ]; then
21+ [[ -e /proc/sys/kernel/unprivileged_userns_clone ]] && sudo sysctl kernel.unprivileged_userns_clone=1
22+ fi
23+ set +e
24+ sudo rm -fr /nix > /dev/null 2>&1
25+ set -e
26+ sudo rm -fr $HOME/.nix-channels
27+ sudo rm -fr $HOME/.nix-defexpr
28+ sudo rm -fr $HOME/.nix-profile
29+ [[ -f $HOME/.profile ]] && sed -i.nix.uninstall.bak '/.nix-profile/d' $HOME/.profile
30+ [[ -f $HOME/.bash_profile ]] && sed -i.nix.uninstall.bak '/.nix-profile/d' $HOME/.bash_profile
31+ [[ -f $HOME/.bashrc ]] && sed -i.nix.uninstall.bak '/.nix-profile/d' $HOME/.bashrc
32+fi
33+
34+done_banner "Top level" "build unprepare"
DevOps/local/test/cb-cd-ct.shnew file+63
@@ -0,0 +1,63 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "Cont. Build, Deploy and Test"
12+
13+warn "Nothing can be filled by default, you must build the top level CB-CD-CT pipeline yourself."
14+warn "Refer to the cb-cd-ct.sh for some example"
15+
16+#${SCRIPT_ABS_PATH}/prepare.sh
17+#${SCRIPT_ABS_PATH}/build/prepare.sh
18+
19+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unfinishing.sh
20+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unbuild.sh
21+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unprepare.sh
22+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
23+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
24+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
25+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/prepare.sh
26+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/build.sh
27+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/finishing.sh
28+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
29+
30+#${SCRIPT_ABS_PATH}/build/build.sh
31+#${SCRIPT_ABS_PATH}/build/finishing.sh
32+
33+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/unfinishing.sh
34+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/undeploy.sh
35+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/unprepare.sh
36+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
37+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
38+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
39+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/prepare.sh
40+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/deploy.sh
41+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/finishing.sh
42+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
43+
44+#${SCRIPT_ABS_PATH}/deploy/deploy.sh
45+#${SCRIPT_ABS_PATH}/deploy/finishing.sh
46+
47+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/unfinishing.sh
48+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/untest.sh
49+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/unprepare.sh
50+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
51+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
52+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
53+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/prepare.sh
54+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/test.sh
55+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/finishing.sh
56+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
57+
58+#${SCRIPT_ABS_PATH}/test/test.sh
59+#${SCRIPT_ABS_PATH}/test/finishing.sh
60+
61+#${SCRIPT_ABS_PATH}/finishing.sh
62+
63+done_banner "Top level" "Cont. Build, Deploy and Test"
DevOps/local/test/cb-cd.shnew file+49
@@ -0,0 +1,49 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "Cont. Build and Deploy"
12+
13+warn "Nothing can be filled by default, you must build the top level CB-CD pipeline yourself."
14+warn "Refer to the cb-cd.sh for some example"
15+
16+#${SCRIPT_ABS_PATH}/prepare.sh
17+#${SCRIPT_ABS_PATH}/build/prepare.sh
18+
19+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unfinishing.sh
20+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unbuild.sh
21+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unprepare.sh
22+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
23+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
24+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
25+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/prepare.sh
26+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/build.sh
27+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/finishing.sh
28+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
29+
30+#${SCRIPT_ABS_PATH}/build/build.sh
31+#${SCRIPT_ABS_PATH}/build/finishing.sh
32+
33+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/unfinishing.sh
34+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/undeploy.sh
35+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/unprepare.sh
36+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
37+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
38+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
39+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/prepare.sh
40+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/deploy.sh
41+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/finishing.sh
42+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
43+
44+#${SCRIPT_ABS_PATH}/deploy/deploy.sh
45+#${SCRIPT_ABS_PATH}/deploy/finishing.sh
46+
47+#${SCRIPT_ABS_PATH}/finishing.sh
48+
49+done_banner "Top level" "Cont. Build and Deploy"
DevOps/local/test/cb.shnew file+34
@@ -0,0 +1,34 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "Cont. Build"
12+
13+warn "Nothing can be filled by default, you must build the top level CB pipeline yourself."
14+warn "Refer to the cb.sh for some example"
15+
16+#${SCRIPT_ABS_PATH}/prepare.sh
17+#${SCRIPT_ABS_PATH}/build/prepare.sh
18+
19+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unfinishing.sh
20+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unbuild.sh
21+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unprepare.sh
22+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
23+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
24+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
25+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/prepare.sh
26+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/build.sh
27+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/finishing.sh
28+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
29+
30+#${SCRIPT_ABS_PATH}/build/build.sh
31+#${SCRIPT_ABS_PATH}/build/finishing.sh
32+#${SCRIPT_ABS_PATH}/finishing.sh
33+
34+done_banner "Top level" "Cont. Build"
DevOps/local/test/cd-ct.shnew file+49
@@ -0,0 +1,49 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "Cont. Deploy and Test"
12+
13+warn "Nothing can be filled by default, you must build the top level CD-CT pipeline yourself."
14+warn "Refer to the cd-ct.sh for some example"
15+
16+#${SCRIPT_ABS_PATH}/prepare.sh
17+#${SCRIPT_ABS_PATH}/deploy/prepare.sh
18+
19+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/unfinishing.sh
20+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/undeploy.sh
21+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/unprepare.sh
22+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
23+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
24+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
25+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/prepare.sh
26+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/deploy.sh
27+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/finishing.sh
28+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
29+
30+#${SCRIPT_ABS_PATH}/deploy/deploy.sh
31+#${SCRIPT_ABS_PATH}/deploy/finishing.sh
32+
33+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/unfinishing.sh
34+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/untest.sh
35+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/unprepare.sh
36+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
37+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
38+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
39+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/prepare.sh
40+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/test.sh
41+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/finishing.sh
42+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
43+
44+#${SCRIPT_ABS_PATH}/test/test.sh
45+#${SCRIPT_ABS_PATH}/test/finishing.sh
46+
47+#${SCRIPT_ABS_PATH}/finishing.sh
48+
49+done_banner "Top level" "Cont. Deploy and Test"
DevOps/local/test/cd.shnew file+34
@@ -0,0 +1,34 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "Cont. Deploy"
12+
13+warn "Nothing can be filled by default, you must build the top level CD pipeline yourself."
14+warn "Refer to the cd.sh for some example"
15+
16+#${SCRIPT_ABS_PATH}/prepare.sh
17+#${SCRIPT_ABS_PATH}/deploy/prepare.sh
18+
19+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/unfinishing.sh
20+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/undeploy.sh
21+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/unprepare.sh
22+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
23+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
24+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
25+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/prepare.sh
26+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/deploy.sh
27+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/finishing.sh
28+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
29+
30+#${SCRIPT_ABS_PATH}/deploy/deploy.sh
31+#${SCRIPT_ABS_PATH}/deploy/finishing.sh
32+#${SCRIPT_ABS_PATH}/finishing.sh
33+
34+done_banner "Top level" "Cont. Deploy"
DevOps/local/test/ct.shnew file+34
@@ -0,0 +1,34 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "Cont. Test"
12+
13+warn "Nothing can be filled by default, you must build the top level CT pipeline yourself."
14+warn "Refer to the ct.sh for some example"
15+
16+#${SCRIPT_ABS_PATH}/prepare.sh
17+#${SCRIPT_ABS_PATH}/test/prepare.sh
18+
19+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/unfinishing.sh
20+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/untest.sh
21+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/unprepare.sh
22+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
23+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
24+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
25+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/prepare.sh
26+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/test.sh
27+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/finishing.sh
28+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
29+
30+#${SCRIPT_ABS_PATH}/test/test.sh
31+#${SCRIPT_ABS_PATH}/test/finishing.sh
32+#${SCRIPT_ABS_PATH}/finishing.sh
33+
34+done_banner "Top level" "Cont. Test"
DevOps/local/test/deploy/deploy.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "deploy deploy"
12+
13+done_banner "Top level" "deploy deploy"
DevOps/local/test/deploy/finishing.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "deploy finishing"
12+
13+done_banner "Top level" "deploy finishing"
DevOps/local/test/deploy/prepare.shnew file+116
@@ -0,0 +1,116 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "deploy prepare"
12+
13+if ! type docker >/dev/null 2>&1; then
14+ info "no docker found, trying to install it"
15+ case ${THE_DISTRIBUTION_ID} in
16+ rhel) my_exit "Don't know how to install docker-ce on RHEL, will abort." 1
17+ ;;
18+ debian) THE_DISTRIBUTION_VERSION_CODENAME=$(grep -w "VERSION_CODENAME" /etc/os-release |awk -F"=" '{print $NF}'|sed 's/"//g')
19+ my_arch=$(uname -m)
20+ if [ ${my_arch} = "aarch64" ]; then
21+ docker_arm="arm64"
22+ else
23+ docker_arm="amd64"
24+ fi
25+ if dpkg-query -l | grep docker.io ; then
26+ sudo apt-get purge -y docker.io
27+ fi
28+ if dpkg-query -l | grep docker-engine ; then
29+ sudo apt-get purge -y docker-engine
30+ fi
31+ if dpkg-query -l | grep docker ; then
32+ sudo apt-get purge -y docker
33+ fi
34+ if dpkg-query -l | grep runc ; then
35+ sudo apt-get purge -y runc
36+ fi
37+ sudo apt-get update
38+ sudo apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common
39+ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
40+ sudo add-apt-repository "deb [arch=${docker_arm}] https://download.docker.com/linux/debian ${THE_DISTRIBUTION_VERSION_CODENAME} stable"
41+ sudo apt-get update
42+ sudo apt-get install -y docker-ce docker-ce-cli containerd.io
43+ sudo /usr/sbin/usermod -a -G docker $(whoami)
44+ ;;
45+ ubuntu) THE_DISTRIBUTION_VERSION_CODENAME=$(grep -w "VERSION_CODENAME" /etc/os-release |awk -F"=" '{print $NF}'|sed 's/"//g')
46+ my_arch=$(uname -m)
47+ if [ ${my_arch} = "aarch64" ]; then
48+ docker_arm="arm64"
49+ else
50+ docker_arm="amd64"
51+ fi
52+ if dpkg-query -l | grep docker.io ; then
53+ sudo apt-get purge -y docker.io
54+ fi
55+ if dpkg-query -l | grep docker-engine ; then
56+ sudo apt-get purge -y docker-engine
57+ fi
58+ if dpkg-query -l | grep docker ; then
59+ sudo apt-get purge -y docker
60+ fi
61+ if dpkg-query -l | grep runc ; then
62+ sudo apt-get purge -y runc
63+ fi
64+ sudo apt-get update
65+ sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
66+ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
67+ sudo add-apt-repository "deb [arch=${docker_arm}] https://download.docker.com/linux/ubuntu ${THE_DISTRIBUTION_VERSION_CODENAME} stable"
68+ sudo apt-get update
69+ sudo apt-get install -y docker-ce docker-ce-cli containerd.io
70+ sudo /usr/sbin/usermod -a -G docker $(whoami)
71+ ;;
72+ centos) sudo yum install -y yum-utils device-mapper-persistent-data lvm2
73+ sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
74+ sudo yum install -y docker-ce docker-ce-cli containerd.io
75+ sudo systemctl enable docker
76+ sudo systemctl start docker
77+ sudo /usr/sbin/usermod -a -G docker $(whoami)
78+ ;;
79+ Darwin) if type brew > /dev/null 2>&1; then
80+ brew cask install docker
81+ else
82+ #wget -c https://download.docker.com/mac/stable/Docker.dmg
83+ warn "Cannot install docker desktop for MacOS automatically without homebrew,"
84+ warn "please go to following web page to download and isntall the package."
85+ warn "https://hub.docker.com/?overlay=onboarding"
86+ fi
87+ ;;
88+ *) my_exit "Not supported distribution OS" 1
89+ ;;
90+ esac
91+fi
92+
93+if ! type docker-compose >/dev/null 2>&1; then
94+ info "no docker-compose found, trying to install it"
95+ case ${THE_DISTRIBUTION_ID} in
96+ rhel) my_exit "docker-compose depends on docker, yet don't know how to install docker-ce on RHEL, so abord." 1
97+ ;;
98+ debian|ubuntu) sudo apt-get update
99+ sudo apt-get install -y docker-compose
100+ # following is for docker login
101+ sudo apt-get install -y gnupg pass
102+ ;;
103+ centos) sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
104+ sudo chmod +x /usr/local/bin/docker-compose
105+ sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
106+ # following is for docker login
107+ sudo yum install -y gnupg pass
108+ ;;
109+ Darwin) info "docker-compose will installed with docker desktop for macos. skip."
110+ ;;
111+ *) my_exit "Not supported distribution OS" 1
112+ ;;
113+ esac
114+fi
115+
116+done_banner "Top level" "deploy prepare"
DevOps/local/test/deploy/undeploy.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "deploy undeploy"
12+
13+done_banner "Top level" "deploy undeploy"
DevOps/local/test/deploy/unfinishing.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "deploy unfinishing"
12+
13+done_banner "Top level" "deploy unfinishing"
DevOps/local/test/deploy/unprepare.shnew file+59
@@ -0,0 +1,59 @@
1+#!/usr/bin/env bash
2+
3+if ! type dirname > /dev/null 2>&1; then
4+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
5+ exit 1
6+fi
7+
8+. "$(dirname "$0")"/../../../common/common.sh
9+
10+init_with_root_or_sudo "$0"
11+
12+begin_banner "Top level" "deploy unprepare"
13+
14+if type docker >/dev/null 2>&1; then
15+ info "docker found, trying to uninstall it"
16+ case ${THE_DISTRIBUTION_ID} in
17+ rhel) info "This script not know how to install docker-ce on RHEL, so that docker cna't be installed by this script. Ignore."
18+ ;;
19+ debian|ubuntu) my_arch=$(uname -m)
20+ if [ ${my_arch} = "aarch64" ]; then
21+ docker_arm="arm64"
22+ else
23+ docker_arm="amd64"
24+ fi
25+ sudo apt-get purge -y docker-ce docker-ce-cli containerd.io
26+ ;;
27+ centos) sudo yum erase -y docker-ce docker-ce-cli containerd.io
28+ ;;
29+ Darwin) if type brew > /dev/null 2>&1; then
30+ brew cask uninstall docker
31+ brew cask unlink docker
32+ else
33+ info "Don't know how to uninstall the docker desktop for macOS package."
34+ info "please refer to the installation web page for uninstallation instructions."
35+ fi
36+ ;;
37+ *) warn "Not supported distribution OS."
38+ ;;
39+ esac
40+fi
41+
42+if type docker-compose >/dev/null 2>&1; then
43+ info "docker-compose found, trying to uninstall it"
44+ case ${THE_DISTRIBUTION_ID} in
45+ rhel) info "This script not know how to install docker-compose on RHEL, so that docker-compose cna't be installed by this script. Ignore."
46+ ;;
47+ debian|ubuntu) sudo apt-get purge -y docker-compose
48+ ;;
49+ centos) [[ -e /usr/local/bin/docker-compose ]] && sudo rm /usr/local/bin/docker-compose
50+ [[ -L /usr/bin/docker-compose ]] && sudo rm /usr/bin/docker-compose
51+ ;;
52+ Darwin) info "docker-compose will be uninstalled with docker for desktop package. skip."
53+ ;;
54+ *) warn "Not supported distribution OS"
55+ ;;
56+ esac
57+fi
58+
59+done_banner "Top level" "deploy unprepare"
DevOps/local/test/finishing.shnew file+36
@@ -0,0 +1,36 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "finishing"
12+
13+case ${THE_DISTRIBUTION_ID} in
14+ rhel) if [ "${THE_DISTRIBUTION_VERSION}" != "7" ]; then
15+ my_exit "This CI/CD script only supports RHEL 7.x, will abort." 1
16+ fi
17+ ;;
18+ debian) if [ "${THE_DISTRIBUTION_VERSION}" != "9" ] && [ "${THE_DISTRIBUTION_VERSION}" != "10" ]; then
19+ my_exit "This CI/CD script only supports debian 9.x and 10.x, will abort" 1
20+ fi
21+ ;;
22+ ubuntu) if [ "${THE_DISTRIBUTION_VERSION}" != "16.04" ] && [ "${THE_DISTRIBUTION_VERSION}" != "18.04" ]; then
23+ my_exit "This CI/CD script only supports ubuntu 16.04 and 18.04, will abort" 1
24+ fi
25+ ;;
26+ centos) if [ "${THE_DISTRIBUTION_VERSION}" != "7" ]; then
27+ my_exit "This CI/CD script only support Centos 7.x, will abort" 1
28+ fi
29+ ;;
30+ Darwin) info "Please note that MacOS ony support as a development environment."
31+ ;;
32+ *) my_exit "Unsupported linux distribution, will abort" 1
33+ ;;
34+esac
35+
36+done_banner "Top level" "finishing"
DevOps/local/test/prepare.shnew file+39
@@ -0,0 +1,39 @@
1+#!/usr/bin/env bash
2+
3+if ! type dirname > /dev/null 2>&1; then
4+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
5+ exit 1
6+fi
7+
8+. "$(dirname "$0")"/../../common/common.sh
9+
10+init_with_root_or_sudo "$0"
11+
12+begin_banner "Top level" "prepare"
13+
14+case ${THE_DISTRIBUTION_ID} in
15+ rhel) if [ "${THE_DISTRIBUTION_VERSION}" != "7" ]; then
16+ my_exit "This CI/CD script only supports RHEL 7.x, will abort." 1
17+ fi
18+ ;;
19+ debian) if [ "${THE_DISTRIBUTION_VERSION}" != "9" ] && [ "${THE_DISTRIBUTION_VERSION}" != "10" ]; then
20+ my_exit "This CI/CD script only supports debian 9.x and 10.x, will abort" 1
21+ fi
22+ ;;
23+ ubuntu) if [ "${THE_DISTRIBUTION_VERSION}" != "16.04" ] && [ "${THE_DISTRIBUTION_VERSION}" != "18.04" ]; then
24+ my_exit "This CI/CD script only supports ubuntu 16.04 and 18.04, will abort" 1
25+ fi
26+ ;;
27+ centos) if [ "${THE_DISTRIBUTION_VERSION}" != "7" ]; then
28+ my_exit "This CI/CD script only support Centos 7.x, will abort" 1
29+ fi
30+ ;;
31+ Darwin) warn "Please note that MacOS only use as a development environment."
32+ ;;
33+ *) my_exit "Unsupported linux distribution, will abort" 1
34+ ;;
35+esac
36+
37+done_banner "Top level" "prepare"
38+
39+# for development env, git should had already be installed.
DevOps/local/test/test/finishing.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "test finishing"
12+
13+done_banner "Top level" "test finishing"
DevOps/local/test/test/prepare.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "test prepare"
12+
13+done_banner "Top level" "test prepare"
DevOps/local/test/test/test.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "test test"
12+
13+done_banner "Top level" "test test"
DevOps/local/test/test/unfinishing.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "test unfinishing"
12+
13+done_banner "Top level" "test unfinishing"
DevOps/local/test/test/unprepare.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "test unprepare"
12+
13+done_banner "Top level" "test unprepare"
DevOps/local/test/test/untest.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "test untest"
12+
13+done_banner "Top level" "test untest"
DevOps/local/test/uncb-uncd-unct.shnew file+63
@@ -0,0 +1,63 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "Cont. UnBuild, UnDeploy and UnTest"
12+
13+warn "Nothing can be filled by default, you must build the top level UnCB-UnCD-UnCT pipeline yourself."
14+warn "Refer to the uncb-uncd-unct.sh of some specific sub project for some example"
15+
16+#${SCRIPT_ABS_PATH}/prepare.sh
17+#${SCRIPT_ABS_PATH}/build/prepare.sh
18+
19+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unfinishing.sh
20+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unbuild.sh
21+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unprepare.sh
22+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
23+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
24+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
25+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/prepare.sh
26+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/build.sh
27+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/finishing.sh
28+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
29+
30+#${SCRIPT_ABS_PATH}/build/build.sh
31+#${SCRIPT_ABS_PATH}/build/finishing.sh
32+
33+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/unfinishing.sh
34+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/undeploy.sh
35+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/unprepare.sh
36+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
37+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
38+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
39+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/prepare.sh
40+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/deploy.sh
41+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/finishing.sh
42+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
43+
44+#${SCRIPT_ABS_PATH}/deploy/deploy.sh
45+#${SCRIPT_ABS_PATH}/deploy/finishing.sh
46+
47+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/unfinishing.sh
48+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/untest.sh
49+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/unprepare.sh
50+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
51+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
52+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
53+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/prepare.sh
54+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/test.sh
55+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/finishing.sh
56+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
57+
58+#${SCRIPT_ABS_PATH}/test/test.sh
59+#${SCRIPT_ABS_PATH}/test/finishing.sh
60+
61+#${SCRIPT_ABS_PATH}/finishing.sh
62+
63+done_banner "Top level" "Cont. UnBuild, UnDeploy and UnTest"
DevOps/local/test/uncb-uncd.shnew file+49
@@ -0,0 +1,49 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "Cont. UnBuild and UnDeploy"
12+
13+warn "Nothing can be filled by default, you must build the top level UnCB-UnCD pipeline yourself."
14+warn "Refer to the uncb-uncd.sh of some specific sub project for some example"
15+
16+#${SCRIPT_ABS_PATH}/prepare.sh
17+#${SCRIPT_ABS_PATH}/build/prepare.sh
18+
19+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unfinishing.sh
20+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unbuild.sh
21+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unprepare.sh
22+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
23+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
24+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
25+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/prepare.sh
26+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/build.sh
27+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/finishing.sh
28+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
29+
30+#${SCRIPT_ABS_PATH}/build/build.sh
31+#${SCRIPT_ABS_PATH}/build/finishing.sh
32+
33+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/unfinishing.sh
34+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/undeploy.sh
35+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/unprepare.sh
36+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
37+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
38+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
39+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/prepare.sh
40+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/deploy.sh
41+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/finishing.sh
42+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
43+
44+#${SCRIPT_ABS_PATH}/deploy/deploy.sh
45+#${SCRIPT_ABS_PATH}/deploy/finishing.sh
46+
47+#${SCRIPT_ABS_PATH}/finishing.sh
48+
49+done_banner "Top level" "Cont. UnBuild and UnDeploy"
DevOps/local/test/uncb.shnew file+34
@@ -0,0 +1,34 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "Cont. UnBuild"
12+
13+warn "Nothing can be filled by default, you must build the top level UNCB pipeline yourself."
14+warn "Refer to the uncb.sh under some specific sub project for some example"
15+
16+#${SCRIPT_ABS_PATH}/prepare.sh
17+#${SCRIPT_ABS_PATH}/build/prepare.sh
18+
19+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unfinishing.sh
20+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unbuild.sh
21+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/unprepare.sh
22+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
23+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
24+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
25+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/prepare.sh
26+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/build.sh
27+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/build/finishing.sh
28+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
29+
30+#${SCRIPT_ABS_PATH}/build/build.sh
31+#${SCRIPT_ABS_PATH}/build/finishing.sh
32+#${SCRIPT_ABS_PATH}/finishing.sh
33+
34+done_banner "Top level" "Cont. UnBuild"
DevOps/local/test/uncd-unct.shnew file+49
@@ -0,0 +1,49 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "Cont. UnDeploy and UnTest"
12+
13+warn "Nothing can be filled by default, you must build the top level UnCD-UnCT pipeline yourself."
14+warn "Refer to the cd-ct.sh of some specific sub project for some example"
15+
16+#${SCRIPT_ABS_PATH}/prepare.sh
17+#${SCRIPT_ABS_PATH}/deploy/prepare.sh
18+
19+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/unfinishing.sh
20+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/undeploy.sh
21+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/unprepare.sh
22+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
23+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
24+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
25+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/prepare.sh
26+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/deploy.sh
27+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/finishing.sh
28+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
29+
30+#${SCRIPT_ABS_PATH}/deploy/deploy.sh
31+#${SCRIPT_ABS_PATH}/deploy/finishing.sh
32+
33+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/unfinishing.sh
34+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/untest.sh
35+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/unprepare.sh
36+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
37+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
38+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
39+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/prepare.sh
40+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/test.sh
41+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/finishing.sh
42+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
43+
44+#${SCRIPT_ABS_PATH}/test/test.sh
45+#${SCRIPT_ABS_PATH}/test/finishing.sh
46+
47+#${SCRIPT_ABS_PATH}/finishing.sh
48+
49+done_banner "Top level" "Cont. UnDeploy and UnTest"
DevOps/local/test/uncd.shnew file+34
@@ -0,0 +1,34 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "Cont. UnDeploy"
12+
13+warn "Nothing can be filled by default, you must build the top level UnCD pipeline yourself."
14+warn "Refer to the uncd.sh of some specific sub project for some example"
15+
16+#${SCRIPT_ABS_PATH}/prepare.sh
17+#${SCRIPT_ABS_PATH}/deploy/prepare.sh
18+
19+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/unfinishing.sh
20+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/undeploy.sh
21+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/unprepare.sh
22+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
23+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
24+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
25+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/prepare.sh
26+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/deploy.sh
27+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/deploy/finishing.sh
28+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
29+
30+#${SCRIPT_ABS_PATH}/deploy/deploy.sh
31+#${SCRIPT_ABS_PATH}/deploy/finishing.sh
32+#${SCRIPT_ABS_PATH}/finishing.sh
33+
34+done_banner "Top level" "Cont. UnDeploy"
DevOps/local/test/unct.shnew file+34
@@ -0,0 +1,34 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "Cont. UnTest"
12+
13+warn "Nothing can be filled by default, you must build the top level UnCT pipeline yourself."
14+warn "Refer to the unct.sh of some specific sub project for some example"
15+
16+#${SCRIPT_ABS_PATH}/prepare.sh
17+#${SCRIPT_ABS_PATH}/test/prepare.sh
18+
19+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/unfinishing.sh
20+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/untest.sh
21+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/unprepare.sh
22+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unfinishing.sh
23+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/unprepare.sh
24+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/prepare.sh
25+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/prepare.sh
26+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/test.sh
27+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/test/finishing.sh
28+#${SCRIPT_ABS_PATH}/../../../MY_SUB_PROJECT_NAME/DevOps/MY_LOCATION_NAME/MY_PHASE_NAME/finishing.sh
29+
30+#${SCRIPT_ABS_PATH}/test/test.sh
31+#${SCRIPT_ABS_PATH}/test/finishing.sh
32+#${SCRIPT_ABS_PATH}/finishing.sh
33+
34+done_banner "Top level" "Cont. UnTest"
DevOps/local/test/unfinishing.shnew file+37
@@ -0,0 +1,37 @@
1+#!/usr/bin/env bash
2+
3+if ! type dirname > /dev/null 2>&1; then
4+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
5+ exit 1
6+fi
7+
8+. "$(dirname "$0")"/../../common/common.sh
9+
10+init_with_root_or_sudo "$0"
11+
12+begin_banner "Top level" "unfinishing"
13+
14+case ${THE_DISTRIBUTION_ID} in
15+ rhel) if [ "${THE_DISTRIBUTION_VERSION}" != "7" ]; then
16+ my_exit "This CI/CD script only supports RHEL 7.x, will abort." 1
17+ fi
18+ ;;
19+ debian) if [ "${THE_DISTRIBUTION_VERSION}" != "9" ] && [ "${THE_DISTRIBUTION_VERSION}" != "10" ]; then
20+ my_exit "This CI/CD script only supports debian 9.x and 10.x, will abort" 1
21+ fi
22+ ;;
23+ ubuntu) if [ "${THE_DISTRIBUTION_VERSION}" != "16.04" ] && [ "${THE_DISTRIBUTION_VERSION}" != "18.04" ]; then
24+ my_exit "This CI/CD script only supports ubuntu 16.04 and 18.04, will abort" 1
25+ fi
26+ ;;
27+ centos) if [ "${THE_DISTRIBUTION_VERSION}" != "7" ]; then
28+ my_exit "This CI/CD script only support Centos 7.x, will abort" 1
29+ fi
30+ ;;
31+ Darwin) info "Please note that MacOS only support as a development environment."
32+ ;;
33+ *) my_exit "Unsupported linux distribution, will abort" 1
34+ ;;
35+esac
36+
37+done_banner "Top level" "unfinishing"
DevOps/local/test/unprepare.shnew file+36
@@ -0,0 +1,36 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "Top level" "unprepare"
12+
13+case ${THE_DISTRIBUTION_ID} in
14+ rhel) if [ "${THE_DISTRIBUTION_VERSION}" != "7" ]; then
15+ my_exit "This CI/CD script only supports RHEL 7.x, will abort." 1
16+ fi
17+ ;;
18+ debian) if [ "${THE_DISTRIBUTION_VERSION}" != "9" ] && [ "${THE_DISTRIBUTION_VERSION}" != "10" ]; then
19+ my_exit "This CI/CD script only supports debian 9.x and 10.x, will abort" 1
20+ fi
21+ ;;
22+ ubuntu) if [ "${THE_DISTRIBUTION_VERSION}" != "16.04" ] && [ "${THE_DISTRIBUTION_VERSION}" != "18.04" ]; then
23+ my_exit "This CI/CD script only supports ubuntu 16.04 and 18.04, will abort" 1
24+ fi
25+ ;;
26+ centos) if [ "${THE_DISTRIBUTION_VERSION}" != "7" ]; then
27+ my_exit "This CI/CD script only support Centos 7.x, will abort" 1
28+ fi
29+ ;;
30+ Darwin) info "Please note that MacOS only support as a develoment environment."
31+ ;;
32+ *) my_exit "Unsupported linux distribution, will abort" 1
33+ ;;
34+esac
35+
36+done_banner "Top level" "unprepare"
ci/DevOps/common/common.shnew file+144
@@ -0,0 +1,144 @@
1+#!/usr/bin/env bash
2+set -Eeuo pipefail
3+
4+guard_bash_error () {
5+ set -Eeuo pipefail
6+}
7+
8+# Log levels
9+INFO=0
10+WARN=1
11+ERROR=2
12+FATAL=3
13+DEBUG=4
14+DEFAULT_LOG_LEVEL=${ERROR}
15+
16+my_exit () {
17+ echo "EXIT: - [HOST:$(hostname)]: - $(date +"%Y-%m-%d %H:%M:%S") - $1"
18+ exit "$2"
19+}
20+
21+msg () {
22+ if [ $1 -le ${DEFAULT_LOG_LEVEL} ]; then
23+ echo "[HOST:$(hostname)]: - $(date +"%Y-%m-%d %H:%M:%S") - $2"
24+ fi
25+}
26+
27+info () {
28+ msg ${INFO} "INFO: - $1"
29+}
30+
31+warn () {
32+ msg ${WARN} "WARNING: - $1"
33+}
34+
35+error () {
36+ msg ${ERROR} "ERROR: - $1"
37+}
38+
39+fatal () {
40+ msg ${FATAL} "FATAL: - $1"
41+}
42+
43+debug () {
44+ msg ${DEBUG} "DEBUG: - $1"
45+}
46+
47+begin_banner () {
48+ info "$1 - $2 phase - begin"
49+}
50+
51+done_banner () {
52+ info "$1 - $2 phase - done"
53+}
54+
55+### turn path within script into absolute path
56+### must pass the calling string of the script as the first parameter
57+### e.g., ./path_to_script/script.sh
58+### or, /root/path_to_script/script.sh
59+### return the absolute path to the script with "echo" command
60+turn_to_absolute_path () {
61+ local SCRIPT_ABS_PATH_RAW="$(dirname "$1")"
62+ # turn SCRIPT_ABS_PATH into absolute path
63+ case ${SCRIPT_ABS_PATH_RAW} in
64+ /*) echo "${SCRIPT_ABS_PATH_RAW}" ;;
65+ \.\.*) echo "$PWD/${SCRIPT_ABS_PATH_RAW}" ;;
66+ \.*) echo "$PWD/${SCRIPT_ABS_PATH_RAW}" ;;
67+ *) echo "$PWD" ;;
68+ esac
69+}
70+
71+### change CD to up to the project root directory
72+### must pass the absolute path to the script as the first parameter
73+change_CD_to_project_root () {
74+ cd "$1"
75+ local up_level=..
76+ local my_loop=10 # guard not to loop forever
77+ until ls "${up_level}"|grep -w DevOps > /dev/null 2>&1 && [ ${my_loop} -gt 0 ]
78+ do
79+ up_level=${up_level}/..
80+ my_loop=$(expr ${my_loop} - 1)
81+ done
82+ if [ ${my_loop} -eq 0 ]; then
83+ my_exit "Too many level up within the searching for DevOps directory,abort." 1
84+ fi
85+ cd "$1/${up_level}"
86+}
87+
88+### check OS and distribution
89+### return the OS distribution and ID with "echo" command
90+check_dist_or_OS () {
91+ local MY_THE_DISTRIBUTION_ID=""
92+ local MY_THE_DISTRIBUTION_VERSION=""
93+ if [ -e /etc/os-release ]; then
94+ MY_THE_DISTRIBUTION_ID=$(grep -w "ID" /etc/os-release |awk -F"=" '{print $NF}'|sed 's/"//g')
95+ MY_THE_DISTRIBUTION_VERSION=$(grep -w "VERSION_ID" /etc/os-release |awk -F"=" '{print $NF}'|awk -F"." '{print $1}'|sed 's/"//g')
96+ echo "${MY_THE_DISTRIBUTION_ID} ${MY_THE_DISTRIBUTION_VERSION}"
97+ else if type uname > /dev/null 2>&1; then
98+ MY_THE_DISTRIBUTION_ID=$(uname -s)
99+ MY_THE_DISTRIBUTION_VERSION=$(uname -r)
100+ echo "${MY_THE_DISTRIBUTION_ID} ${MY_THE_DISTRIBUTION_VERSION}"
101+ else
102+ echo ""
103+ fi
104+ fi
105+}
106+
107+### guard that the caller of the script must be root or has sudo right
108+guard_root_or_sudo () {
109+ if [[ $EUID > 0 ]] && ! sudo -v >/dev/null 2>&1; then
110+ return 1
111+ else
112+ return 0
113+ fi
114+}
115+
116+### init script with check if root or sudo
117+init_with_root_or_sudo () {
118+ guard_bash_error
119+
120+ if ! guard_root_or_sudo; then
121+ my_exit "You must be root or you must be sudoer to prepare the env for CI/CD." 1
122+ fi
123+
124+ SCRIPT_ABS_PATH=$(turn_to_absolute_path $0)
125+
126+ change_CD_to_project_root ${SCRIPT_ABS_PATH}
127+
128+ THE_DISTRIBUTION_ID_VERSION=$(check_dist_or_OS)
129+ THE_DISTRIBUTION_ID=$(echo ${THE_DISTRIBUTION_ID_VERSION}|awk '{print $1}')
130+ THE_DISTRIBUTION_VERSION=$(echo ${THE_DISTRIBUTION_ID_VERSION}|awk '{print $2}')
131+}
132+
133+### init script without check if root or sudo
134+init_without_root_or_sudo () {
135+ guard_bash_error
136+
137+ SCRIPT_ABS_PATH=$(turn_to_absolute_path $0)
138+
139+ change_CD_to_project_root ${SCRIPT_ABS_PATH}
140+
141+ THE_DISTRIBUTION_ID_VERSION=$(check_dist_or_OS)
142+ THE_DISTRIBUTION_ID=$(echo ${THE_DISTRIBUTION_ID_VERSION}|awk '{print $1}')
143+ THE_DISTRIBUTION_VERSION=$(echo ${THE_DISTRIBUTION_ID_VERSION}|awk '{print $2}')
144+}
ci/DevOps/local/test/build/build.shnew file+32
@@ -0,0 +1,32 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "build build"
12+
13+#set +u to workaround the nix script temperlately.
14+set +u
15+. $HOME/.nix-profile/etc/profile.d/nix.sh
16+set -u
17+
18+if [ -f ${SCRIPT_ABS_PATH}/nix/project-m36.nix ]; then
19+ if [ -e ${SCRIPT_ABS_PATH}/../../dev ] && [ -e ${SCRIPT_ABS_PATH}/../../../local ]; then
20+ # for doom-emacs
21+ [ -x ~/.emacs.d/bin/doom ] && echo "((nil . ((dante-target . \"project-m36\"))))" > ${SCRIPT_ABS_PATH}/../../../../.dir-locals.el && nix-shell --run "~/.emacs.d/bin/doom env > /dev/null 2>&1" ${SCRIPT_ABS_PATH}/nix/shell.nix
22+ nix-shell ${SCRIPT_ABS_PATH}/nix/shell.nix
23+ else
24+ nix-shell --run "cd ${SCRIPT_ABS_PATH}/../../../../.. ; cabal new-update ; cabal new-clean ; cabal new-test" ${SCRIPT_ABS_PATH}/nix/shell.nix
25+ nix-shell --run "cd ${SCRIPT_ABS_PATH}/../../../../.. ; cabal new-clean" ${SCRIPT_ABS_PATH}/nix/shell.nix
26+ nix-build -A project-m36-docker ${SCRIPT_ABS_PATH}/nix/default.nix
27+ fi
28+else
29+ info "No ${SCRIPT_ABS_PATH}/nix/project-m36.nix found, skip building"
30+fi
31+
32+done_banner "project-m36" "build build"
ci/DevOps/local/test/build/finishing.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "build finishing"
12+
13+done_banner "project-m36" "build finishing"
ci/DevOps/local/test/build/nix/data-interval.nixnew file+19
@@ -0,0 +1,19 @@
1+{ mkDerivation, base, ChasingBottoms, containers, deepseq
2+, extended-reals, hashable, HUnit, lattices, QuickCheck, stdenv
3+, syb, tasty, tasty-hunit, tasty-quickcheck, tasty-th
4+}:
5+mkDerivation {
6+ pname = "data-interval";
7+ version = "2.0.1";
8+ sha256 = "5331e2df31eba3f5eb1d097a38fc5428dae56af0c0a7d71bd00491bcf81ee76f";
9+ libraryHaskellDepends = [
10+ base containers deepseq extended-reals hashable lattices
11+ ];
12+ testHaskellDepends = [
13+ base ChasingBottoms containers deepseq hashable HUnit lattices
14+ QuickCheck syb tasty tasty-hunit tasty-quickcheck tasty-th
15+ ];
16+ doCheck = false;
17+ description = "Interval datatype, interval arithmetic and interval-based containers";
18+ license = stdenv.lib.licenses.bsd3;
19+}
ci/DevOps/local/test/build/nix/default.nixnew file+474
@@ -0,0 +1,474 @@
1+{ compiler ? "ghc865" }:
2+
3+let
4+ config = {
5+ packageOverrides = pkgs: rec {
6+ haskell = pkgs.haskell // {
7+ packages = pkgs.haskell.packages // {
8+ "${compiler}" = pkgs.haskell.packages."${compiler}".override {
9+ overrides = haskellPackagesNew: haskellPackagesOld: rec {
10+
11+ /*primitive-unlifted =
12+ haskellPackagesNew.callPackage ./primitive-unlifted.nix { };*/
13+ distributed-process-extras =
14+ haskellPackagesNew.callPackage ./distributed-process-extras.nix { };
15+ distributed-process-client-server =
16+ haskellPackagesNew.callPackage ./distributed-process-client-server.nix { };
17+ distributed-process-async =
18+ haskellPackagesNew.callPackage ./distributed-process-async.nix { };
19+ rank1dynamic =
20+ haskellPackagesNew.callPackage ./rank1dynamic.nix { };
21+ distributed-static =
22+ haskellPackagesNew.callPackage ./distributed-static.nix { };
23+ distributed-process =
24+ haskellPackagesNew.callPackage ./distributed-process.nix { };
25+ stm-hamt =
26+ haskellPackagesNew.callPackage ./stm-hamt.nix { };
27+ stm-containers =
28+ haskellPackagesNew.callPackage ./stm-containers.nix { };
29+ network-transport-tcp =
30+ haskellPackagesNew.callPackage ./network-transport-tcp.nix { };
31+ data-interval =
32+ haskellPackagesNew.callPackage ./data-interval.nix { };
33+ project-m36 =
34+ haskellPackagesNew.callPackage ./project-m36.nix { };
35+ };
36+ };
37+ };
38+ };
39+ };
40+ };
41+
42+ pkgs = if builtins.pathExists ./nixpkgs then
43+ import (builtins.fetchGit (import ./nixpkgs)) { inherit config; }
44+ else
45+ import <nixpkgs> { inherit config; };
46+
47+ inherit (pkgs) dockerTools stdenv buildEnv writeText runCommand jq lib writeReferencesToFile jshon pigz coreutils findutils moreutils;
48+
49+ project-m36 = pkgs.haskell.packages.${compiler}.project-m36;
50+
51+ static-project-m36 = pkgs.haskell.lib.justStaticExecutables pkgs.haskell.packages.${compiler}.project-m36;
52+
53+ passwd = ''
54+ root:x:0:0::/root:/run/current-system/sw/bin/bash
55+ project-m36:x:90001:90001::/var/empty:/run/current-system/sw/bin/nologin
56+ '';
57+
58+ group = ''
59+ root:x:0:
60+ nogroup:x:65534:
61+ project-m36:x:90001:project-m36
62+ '';
63+
64+ nsswitch = ''
65+ hosts: files dns myhostname mymachines
66+ '';
67+
68+
69+ protocols = ''
70+ip 0 IP # internet protocol, pseudo protocol number
71+#hopopt 0 HOPOPT # hop-by-hop options for ipv6
72+icmp 1 ICMP # internet control message protocol
73+igmp 2 IGMP # internet group management protocol
74+ggp 3 GGP # gateway-gateway protocol
75+ipencap 4 IP-ENCAP # IP encapsulated in IP
76+st2 5 ST2 # ST2 datagram mode
77+tcp 6 TCP # transmission control protocol
78+cbt 7 CBT # CBT, Tony Ballardie
79+egp 8 EGP # exterior gateway protocol
80+igp 9 IGP # any private interior gateway
81+bbn-rcc 10 BBN-RCC-MON # BBN RCC Monitoring
82+nvp 11 NVP-II # Network Voice Protocol
83+pup 12 PUP # PARC universal packet protocol
84+argus 13 ARGUS # ARGUS
85+emcon 14 EMCON # EMCON
86+xnet 15 XNET # Cross Net Debugger
87+chaos 16 CHAOS # Chaos
88+udp 17 UDP # user datagram protocol
89+mux 18 MUX # Multiplexing protocol
90+dcn 19 DCN-MEAS # DCN Measurement Subsystems
91+hmp 20 HMP # host monitoring protocol
92+prm 21 PRM # packet radio measurement protocol
93+xns-idp 22 XNS-IDP # Xerox NS IDP
94+trunk-1 23 TRUNK-1 # Trunk-1
95+trunk-2 24 TRUNK-2 # Trunk-2
96+leaf-1 25 LEAF-1 # Leaf-1
97+leaf-2 26 LEAF-2 # Leaf-2
98+rdp 27 RDP # "reliable datagram" protocol
99+irtp 28 IRTP # Internet Reliable Transaction Protocol
100+iso-tp4 29 ISO-TP4 # ISO Transport Protocol Class 4
101+netblt 30 NETBLT # Bulk Data Transfer Protocol
102+mfe-nsp 31 MFE-NSP # MFE Network Services Protocol
103+merit-inp 32 MERIT-INP # MERIT Internodal Protocol
104+dccp 33 DCCP # Datagram Congestion Control Protocol
105+3pc 34 3PC # Third Party Connect Protocol
106+idpr 35 IDPR # Inter-Domain Policy Routing Protocol
107+xtp 36 XTP # Xpress Tranfer Protocol
108+ddp 37 DDP # Datagram Delivery Protocol
109+idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport Proto
110+tp++ 39 TP++ # TP++ Transport Protocol
111+il 40 IL # IL Transport Protocol
112+ipv6 41 IPV6 # ipv6
113+sdrp 42 SDRP # Source Demand Routing Protocol
114+ipv6-route 43 IPV6-ROUTE # routing header for ipv6
115+ipv6-frag 44 IPV6-FRAG # fragment header for ipv6
116+idrp 45 IDRP # Inter-Domain Routing Protocol
117+rsvp 46 RSVP # Resource ReSerVation Protocol
118+gre 47 GRE # Generic Routing Encapsulation
119+dsr 48 DSR # Dynamic Source Routing Protocol
120+bna 49 BNA # BNA
121+esp 50 ESP # encapsulating security payload
122+ah 51 AH # authentication header
123+i-nlsp 52 I-NLSP # Integrated Net Layer Security TUBA
124+swipe 53 SWIPE # IP with Encryption
125+narp 54 NARP # NBMA Address Resolution Protocol
126+mobile 55 MOBILE # IP Mobility
127+tlsp 56 TLSP # Transport Layer Security Protocol
128+skip 57 SKIP # SKIP
129+ipv6-icmp 58 IPV6-ICMP icmp6 # ICMP for IPv6
130+ipv6-nonxt 59 IPV6-NONXT # no next header for ipv6
131+ipv6-opts 60 IPV6-OPTS # destination options for ipv6
132+# 61 # any host internal protocol
133+cftp 62 CFTP # CFTP
134+# 63 # any local network
135+sat-expak 64 SAT-EXPAK # SATNET and Backroom EXPAK
136+kryptolan 65 KRYPTOLAN # Kryptolan
137+rvd 66 RVD # MIT Remote Virtual Disk Protocol
138+ippc 67 IPPC # Internet Pluribus Packet Core
139+# 68 # any distributed filesystem
140+sat-mon 69 SAT-MON # SATNET Monitoring
141+visa 70 VISA # VISA Protocol
142+ipcv 71 IPCV # Internet Packet Core Utility
143+cpnx 72 CPNX # Computer Protocol Network Executive
144+cphb 73 CPHB # Computer Protocol Heart Beat
145+wsn 74 WSN # Wang Span Network
146+pvp 75 PVP # Packet Video Protocol
147+br-sat-mon 76 BR-SAT-MON # Backroom SATNET Monitoring
148+sun-nd 77 SUN-ND # SUN ND PROTOCOL-Temporary
149+wb-mon 78 WB-MON # WIDEBAND Monitoring
150+wb-expak 79 WB-EXPAK # WIDEBAND EXPAK
151+iso-ip 80 ISO-IP # ISO Internet Protocol
152+vmtp 81 VMTP # Versatile Message Transport
153+secure-vmtp 82 SECURE-VMTP # SECURE-VMTP
154+vines 83 VINES # VINES
155+ttp 84 TTP # TTP
156+#iptm 84 IPTM # Protocol Internet Protocol Traffic
157+nsfnet-igp 85 NSFNET-IGP # NSFNET-IGP
158+dgp 86 DGP # Dissimilar Gateway Protocol
159+tcf 87 TCF # TCF
160+eigrp 88 EIGRP # Enhanced Interior Routing Protocol
161+ospf 89 OSPFIGP # Open Shortest Path First IGP
162+sprite-rpc 90 Sprite-RPC # Sprite RPC Protocol
163+larp 91 LARP # Locus Address Resolution Protocol
164+mtp 92 MTP # Multicast Transport Protocol
165+ax.25 93 AX.25 # AX.25 Frames
166+ipip 94 IPIP # Yet Another IP encapsulation
167+micp 95 MICP # Mobile Internetworking Control Pro.
168+scc-sp 96 SCC-SP # Semaphore Communications Sec. Pro.
169+etherip 97 ETHERIP # Ethernet-within-IP Encapsulation
170+encap 98 ENCAP # Yet Another IP encapsulation
171+# 99 # any private encryption scheme
172+gmtp 100 GMTP # GMTP
173+ifmp 101 IFMP # Ipsilon Flow Management Protocol
174+pnni 102 PNNI # PNNI over IP
175+pim 103 PIM # Protocol Independent Multicast
176+aris 104 ARIS # ARIS
177+scps 105 SCPS # SCPS
178+qnx 106 QNX # QNX
179+a/n 107 A/N # Active Networks
180+ipcomp 108 IPComp # IP Payload Compression Protocol
181+snp 109 SNP # Sitara Networks Protocol
182+compaq-peer 110 Compaq-Peer # Compaq Peer Protocol
183+ipx-in-ip 111 IPX-in-IP # IPX in IP
184+carp 112 CARP vrrp # Common Address Redundancy Protocol
185+pgm 113 PGM # PGM Reliable Transport Protocol
186+# 114 # any 0-hop protocol
187+l2tp 115 L2TP # Layer Two Tunneling Protocol
188+ddx 116 DDX # D-II Data Exchange
189+iatp 117 IATP # Interactive Agent Transfer Protocol
190+stp 118 STP # Schedule Transfer Protocol
191+srp 119 SRP # SpectraLink Radio Protocol
192+uti 120 UTI # UTI
193+smp 121 SMP # Simple Message Protocol
194+sm 122 SM # SM
195+ptp 123 PTP # Performance Transparency Protocol
196+isis 124 ISIS # ISIS over IPv4
197+fire 125 FIRE
198+crtp 126 CRTP # Combat Radio Transport Protocol
199+crudp 127 CRUDP # Combat Radio User Datagram
200+sscopmce 128 SSCOPMCE
201+iplt 129 IPLT
202+sps 130 SPS # Secure Packet Shield
203+pipe 131 PIPE # Private IP Encapsulation within IP
204+sctp 132 SCTP # Stream Control Transmission Protocol
205+fc 133 FC # Fibre Channel
206+rsvp-e2e-ignore 134 RSVP-E2E-IGNORE # Aggregation of RSVP for IP reservations
207+mobility-header 135 Mobility-Header # Mobility Support in IPv6
208+udplite 136 UDPLite # The UDP-Lite Protocol
209+mpls-in-ip 137 MPLS-IN-IP # Encapsulating MPLS in IP
210+manet 138 MANET # MANET Protocols
211+hip 139 HIP # Host Identity Protocol
212+shim6 140 SHIM6 # Shim6 Protocol
213+wesp 141 WESP # Wrapped Encapsulating Security Payload
214+rohc 142 ROHC # Robust Header Compression
215+# 138-254 # Unassigned
216+pfsync 240 PFSYNC # PF Synchronization
217+# 253-254 # Use for experimentation and testing
218+# 255 # Reserved
219+divert 258 DIVERT # Divert pseudo-protocol
220+'';
221+
222+ project-m36-conf = ''
223+ para1 = "$(PARA1)"
224+ para2 = "$(PARA2)"
225+ '';
226+
227+ project-m36-env = stdenv.mkDerivation {
228+ name = "project-m36-env";
229+ phases = [ "installPhase" "fixupPhase" ];
230+
231+ installPhase = ''
232+ mkdir -p $out/etc/project-m36
233+ echo '${project-m36-conf}' > $out/etc/project-m36/project-m36.conf
234+ echo '${passwd}' > $out/etc/passwd
235+ echo '${group}' > $out/etc/group
236+ echo '${protocols}' > $out/etc/ptotocols
237+ echo '${nsswitch}' > $out/etc/nsswitch.conf
238+ '';
239+ };
240+
241+ # following buildImage is copied from nixpkgs-20.03
242+ # to fix the arch always amd64 issue
243+ myarch = platform: {
244+ i686 = "386";
245+ x86_64 = "amd64";
246+ aarch64 = "arm64";
247+ arm = "arm";
248+ armv5tel = "arm";
249+ armv6l = "arm";
250+ armv7l = "arm";
251+ }.${platform.parsed.cpu.name} or (throw "Unsupported system");
252+
253+ MYTARGETARCH = myarch stdenv.targetPlatform;
254+
255+ # 1. extract the base image
256+ # 2. create the layer
257+ # 3. add layer deps to the layer itself, diffing with the base image
258+ # 4. compute the layer id
259+ # 5. put the layer in the image
260+ # 6. repack the image
261+ mybuildImage = with dockerTools; args@{
262+ # Image name.
263+ name,
264+ # Image tag, when null then the nix output hash will be used.
265+ tag ? null,
266+ # Parent image, to append to.
267+ fromImage ? null,
268+ # Name of the parent image; will be read from the image otherwise.
269+ fromImageName ? null,
270+ # Tag of the parent image; will be read from the image otherwise.
271+ fromImageTag ? null,
272+ # Files to put on the image (a nix store path or list of paths).
273+ contents ? null,
274+ # When copying the contents into the image, preserve symlinks to
275+ # directories (see `rsync -K`). Otherwise, transform those symlinks
276+ # into directories.
277+ keepContentsDirlinks ? false,
278+ # Docker config; e.g. what command to run on the container.
279+ config ? null,
280+ # Optional bash script to run on the files prior to fixturizing the layer.
281+ extraCommands ? "", uid ? 0, gid ? 0,
282+ # Optional bash script to run as root on the image when provisioning.
283+ runAsRoot ? null,
284+ # Size of the virtual machine disk to provision when building the image.
285+ diskSize ? 1024,
286+ # Time of creation of the image.
287+ created ? "1970-01-01T00:00:01Z",
288+ }:
289+
290+ let
291+ baseName = baseNameOf name;
292+
293+ # Create a JSON blob of the configuration. Set the date to unix zero.
294+ baseJson = let
295+ pure = writeText "${baseName}-config.json" (builtins.toJSON {
296+ inherit created config;
297+ architecture = MYTARGETARCH;
298+ os = "linux";
299+ });
300+ impure = runCommand "${baseName}-config.json"
301+ { nativeBuildInputs = [ jq ]; }
302+ ''
303+ jq ".created = \"$(TZ=utc date --iso-8601="seconds")\"" ${pure} > $out
304+ '';
305+ in if created == "now" then impure else pure;
306+
307+ layer =
308+ if runAsRoot == null
309+ then mkPureLayer {
310+ name = baseName;
311+ inherit baseJson contents keepContentsDirlinks extraCommands uid gid;
312+ } else mkRootLayer {
313+ name = baseName;
314+ inherit baseJson fromImage fromImageName fromImageTag
315+ contents keepContentsDirlinks runAsRoot diskSize
316+ extraCommands;
317+ };
318+ result = runCommand "docker-image-${baseName}.tar.gz" {
319+ nativeBuildInputs = [ jshon pigz coreutils findutils jq moreutils ];
320+ # Image name and tag must be lowercase
321+ imageName = lib.toLower name;
322+ imageTag = if tag == null then "" else lib.toLower tag;
323+ inherit fromImage baseJson;
324+ layerClosure = writeReferencesToFile layer;
325+ passthru.buildArgs = args;
326+ passthru.layer = layer;
327+ } ''
328+ ${lib.optionalString (tag == null) ''
329+ outName="$(basename "$out")"
330+ outHash=$(echo "$outName" | cut -d - -f 1)
331+ imageTag=$outHash
332+ ''}
333+ # Print tar contents:
334+ # 1: Interpreted as relative to the root directory
335+ # 2: With no trailing slashes on directories
336+ # This is useful for ensuring that the output matches the
337+ # values generated by the "find" command
338+ ls_tar() {
339+ for f in $(tar -tf $1 | xargs realpath -ms --relative-to=.); do
340+ if [[ "$f" != "." ]]; then
341+ echo "/$f"
342+ fi
343+ done
344+ }
345+ mkdir image
346+ touch baseFiles
347+ if [[ -n "$fromImage" ]]; then
348+ echo "Unpacking base image..."
349+ tar -C image -xpf "$fromImage"
350+ cat ./image/manifest.json | jq -r '.[0].Layers | .[]' > layer-list
351+ # Do not import the base image configuration and manifest
352+ chmod a+w image image/*.json
353+ rm -f image/*.json
354+ if [[ -z "$fromImageName" ]]; then
355+ fromImageName=$(jshon -k < image/repositories|head -n1)
356+ fi
357+ if [[ -z "$fromImageTag" ]]; then
358+ fromImageTag=$(jshon -e $fromImageName -k \
359+ < image/repositories|head -n1)
360+ fi
361+ parentID=$(jshon -e $fromImageName -e $fromImageTag -u \
362+ < image/repositories)
363+ for l in image/*/layer.tar; do
364+ ls_tar $l >> baseFiles
365+ done
366+ else
367+ touch layer-list
368+ fi
369+ chmod -R ug+rw image
370+ mkdir temp
371+ cp ${layer}/* temp/
372+ chmod ug+w temp/*
373+ for dep in $(cat $layerClosure); do
374+ find $dep >> layerFiles
375+ done
376+ echo "Adding layer..."
377+ # Record the contents of the tarball with ls_tar.
378+ ls_tar temp/layer.tar >> baseFiles
379+ # Append nix/store directory to the layer so that when the layer is loaded in the
380+ # image /nix/store has read permissions for non-root users.
381+ # nix/store is added only if the layer has /nix/store paths in it.
382+ if [ $(wc -l < $layerClosure) -gt 1 ] && [ $(grep -c -e "^/nix/store$" baseFiles) -eq 0 ]; then
383+ mkdir -p nix/store
384+ chmod -R 555 nix
385+ echo "./nix" >> layerFiles
386+ echo "./nix/store" >> layerFiles
387+ fi
388+ # Get the files in the new layer which were *not* present in
389+ # the old layer, and record them as newFiles.
390+ comm <(sort -n baseFiles|uniq) \
391+ <(sort -n layerFiles|uniq|grep -v ${layer}) -1 -3 > newFiles
392+ # Append the new files to the layer.
393+ tar -rpf temp/layer.tar --hard-dereference --sort=name --mtime="@$SOURCE_DATE_EPOCH" \
394+ --owner=0 --group=0 --no-recursion --files-from newFiles
395+ echo "Adding meta..."
396+ # If we have a parentID, add it to the json metadata.
397+ if [[ -n "$parentID" ]]; then
398+ cat temp/json | jshon -s "$parentID" -i parent > tmpjson
399+ mv tmpjson temp/json
400+ fi
401+ # Take the sha256 sum of the generated json and use it as the layer ID.
402+ # Compute the size and add it to the json under the 'Size' field.
403+ layerID=$(sha256sum temp/json|cut -d ' ' -f 1)
404+ size=$(stat --printf="%s" temp/layer.tar)
405+ cat temp/json | jshon -s "$layerID" -i id -n $size -i Size > tmpjson
406+ mv tmpjson temp/json
407+ # Use the temp folder we've been working on to create a new image.
408+ mv temp image/$layerID
409+ # Add the new layer ID to the end of the layer list
410+ (
411+ cat layer-list
412+ # originally this used `sed -i "1i$layerID" layer-list`, but
413+ # would fail if layer-list was completely empty.
414+ echo "$layerID/layer.tar"
415+ ) | sponge layer-list
416+ # Create image json and image manifest
417+ imageJson=$(cat ${baseJson} | jq ". + {\"rootfs\": {\"diff_ids\": [], \"type\": \"layers\"}}")
418+ manifestJson=$(jq -n "[{\"RepoTags\":[\"$imageName:$imageTag\"]}]")
419+ for layerTar in $(cat ./layer-list); do
420+ layerChecksum=$(sha256sum image/$layerTar | cut -d ' ' -f1)
421+ imageJson=$(echo "$imageJson" | jq ".history |= . + [{\"created\": \"$(jq -r .created ${baseJson})\"}]")
422+ # diff_ids order is from the bottom-most to top-most layer
423+ imageJson=$(echo "$imageJson" | jq ".rootfs.diff_ids |= . + [\"sha256:$layerChecksum\"]")
424+ manifestJson=$(echo "$manifestJson" | jq ".[0].Layers |= . + [\"$layerTar\"]")
425+ done
426+ imageJsonChecksum=$(echo "$imageJson" | sha256sum | cut -d ' ' -f1)
427+ echo "$imageJson" > "image/$imageJsonChecksum.json"
428+ manifestJson=$(echo "$manifestJson" | jq ".[0].Config = \"$imageJsonChecksum.json\"")
429+ echo "$manifestJson" > image/manifest.json
430+ # Store the json under the name image/repositories.
431+ jshon -n object \
432+ -n object -s "$layerID" -i "$imageTag" \
433+ -i "$imageName" > image/repositories
434+ # Make the image read-only.
435+ chmod -R a-w image
436+ echo "Cooking the image..."
437+ tar -C image --hard-dereference --sort=name --mtime="@$SOURCE_DATE_EPOCH" --owner=0 --group=0 --xform s:'^./':: -c . | pigz -nT > $out
438+ echo "Finished."
439+ '';
440+
441+ in
442+ result;
443+
444+ project-m36-docker = mybuildImage {
445+ name = "project-m36";
446+ tag = project-m36.version;
447+ created = "now";
448+
449+ contents = [ static-project-m36
450+ project-m36-env ];
451+ config = {
452+ Env = [
453+ "PATH=${static-project-m36}/bin:$PATH"
454+ "DATABASE=mytestdb"
455+ "DATABASE_DIRECTORY=/var/project-m36/data"
456+ "HOSTNAME=localhost"
457+ "PORT=54321"
458+ ];
459+ User = "project-m36";
460+ Cmd = [ "project-m36-server" ];
461+ ExposedPorts = {
462+ "54321/tcp" = {};
463+ };
464+ WorkingDir = "/var/project-m36/data";
465+ Volumes = {
466+ "/var/project-m36/data" = {};
467+ };
468+ };
469+};
470+in {
471+ inherit project-m36;
472+ inherit static-project-m36;
473+ inherit project-m36-docker;
474+}
ci/DevOps/local/test/build/nix/distributed-process-async.nixnew file+32
@@ -0,0 +1,32 @@
1+{ mkDerivation, ansi-terminal, base, binary, containers
2+, data-accessor, deepseq, distributed-process
3+, distributed-process-systest, exceptions, fetchgit, fingertree
4+, hashable, mtl, network, network-transport, network-transport-tcp
5+, rematch, stdenv, stm, test-framework, test-framework-hunit, time
6+, transformers, unordered-containers
7+}:
8+mkDerivation {
9+ pname = "distributed-process-async";
10+ version = "0.2.6";
11+ src = fetchgit {
12+ url = "https://github.com/hughjfchen/distributed-process-async";
13+ sha256 = "00sh8glxf21l56s07v5jp13gxq2v5cp8w2b7snq3dc405mrl2jk9";
14+ rev = "73fcda3c254538db2386184530203c8aac26b905";
15+ fetchSubmodules = true;
16+ };
17+ libraryHaskellDepends = [
18+ base binary containers data-accessor deepseq distributed-process
19+ exceptions fingertree hashable mtl stm time transformers
20+ unordered-containers
21+ ];
22+ testHaskellDepends = [
23+ ansi-terminal base binary deepseq distributed-process
24+ distributed-process-systest exceptions network network-transport
25+ network-transport-tcp rematch stm test-framework
26+ test-framework-hunit transformers
27+ ];
28+ doCheck = false;
29+ homepage = "http://github.com/haskell-distributed/distributed-process-async";
30+ description = "Cloud Haskell Async API";
31+ license = stdenv.lib.licenses.bsd3;
32+}
ci/DevOps/local/test/build/nix/distributed-process-client-server.nixnew file+34
@@ -0,0 +1,34 @@
1+{ mkDerivation, ansi-terminal, base, binary, containers, deepseq
2+, distributed-process, distributed-process-async
3+, distributed-process-extras, distributed-process-systest
4+, exceptions, fetchgit, fingertree, ghc-prim, hashable, HUnit, mtl
5+, network, network-transport, network-transport-tcp, rematch
6+, stdenv, stm, test-framework, test-framework-hunit, time
7+, transformers, unordered-containers
8+}:
9+mkDerivation {
10+ pname = "distributed-process-client-server";
11+ version = "0.2.5.1";
12+ src = fetchgit {
13+ url = "https://github.com/hughjfchen/distributed-process-client-server";
14+ sha256 = "1ld4madf8fbv640rv0gyp1sbfac687k9iikaqj23rdvr2bi22h2v";
15+ rev = "4648b7f7cce67c0af47bd0f56915bc6d59131225";
16+ fetchSubmodules = true;
17+ };
18+ libraryHaskellDepends = [
19+ base binary containers deepseq distributed-process
20+ distributed-process-async distributed-process-extras exceptions
21+ fingertree hashable mtl stm time transformers unordered-containers
22+ ];
23+ testHaskellDepends = [
24+ ansi-terminal base binary containers deepseq distributed-process
25+ distributed-process-async distributed-process-extras
26+ distributed-process-systest exceptions fingertree ghc-prim HUnit
27+ mtl network network-transport network-transport-tcp rematch stm
28+ test-framework test-framework-hunit transformers
29+ ];
30+ doCheck = false;
31+ homepage = "http://github.com/haskell-distributed/distributed-process-client-server";
32+ description = "The Cloud Haskell Application Platform";
33+ license = stdenv.lib.licenses.bsd3;
34+}
ci/DevOps/local/test/build/nix/distributed-process-extras.nixnew file+35
@@ -0,0 +1,35 @@
1+{ mkDerivation, ansi-terminal, base, binary, bytestring, containers
2+, data-accessor, deepseq, distributed-process
3+, distributed-process-systest, distributed-static, exceptions
4+, fetchgit, fingertree, ghc-prim, hashable, HUnit, mtl, network
5+, network-transport, network-transport-tcp, QuickCheck, rematch
6+, stdenv, stm, test-framework, test-framework-hunit
7+, test-framework-quickcheck2, time, transformers
8+, unordered-containers
9+}:
10+mkDerivation {
11+ pname = "distributed-process-extras";
12+ version = "0.3.5";
13+ src = fetchgit {
14+ url = "https://github.com/hughjfchen/distributed-process-extras";
15+ sha256 = "1fk3sxk9953wp3ya0c21l2d3yn18931bsny5d01wpn14khdy7mfj";
16+ rev = "5f75e9ff6d1df2c12f28d99adb15ea4267f02017";
17+ fetchSubmodules = true;
18+ };
19+ libraryHaskellDepends = [
20+ base binary containers deepseq distributed-process exceptions
21+ fingertree hashable mtl stm time transformers unordered-containers
22+ ];
23+ testHaskellDepends = [
24+ ansi-terminal base binary bytestring containers data-accessor
25+ deepseq distributed-process distributed-process-systest
26+ distributed-static fingertree ghc-prim hashable HUnit mtl network
27+ network-transport network-transport-tcp QuickCheck rematch stm
28+ test-framework test-framework-hunit test-framework-quickcheck2 time
29+ transformers unordered-containers
30+ ];
31+ doCheck = false;
32+ homepage = "http://github.com/haskell-distributed/distributed-process-extras";
33+ description = "Cloud Haskell Extras";
34+ license = stdenv.lib.licenses.bsd3;
35+}
ci/DevOps/local/test/build/nix/distributed-process.nixnew file+27
@@ -0,0 +1,27 @@
1+{ mkDerivation, base, binary, bytestring, containers, data-accessor
2+, deepseq, distributed-static, exceptions, fetchgit, hashable, mtl
3+, network-transport, network-transport-tcp, random, rank1dynamic
4+, stdenv, stm, syb, template-haskell, time, transformers
5+}:
6+mkDerivation {
7+ pname = "distributed-process";
8+ version = "0.7.4";
9+ src = fetchgit {
10+ url = "https://github.com/haskell-distributed/distributed-process";
11+ sha256 = "0c71b3nc19zic9xiirkc41znv93f9j9qlf2kn89mjjyh9w7dazsn";
12+ rev = "660d554f6acd2dba8b605c84e8fa69e45708bc14";
13+ fetchSubmodules = true;
14+ };
15+ libraryHaskellDepends = [
16+ base binary bytestring containers data-accessor deepseq
17+ distributed-static exceptions hashable mtl network-transport random
18+ rank1dynamic stm syb template-haskell time transformers
19+ ];
20+ benchmarkHaskellDepends = [
21+ base binary bytestring network-transport-tcp
22+ ];
23+ doCheck = false;
24+ homepage = "http://haskell-distributed.github.com/";
25+ description = "Cloud Haskell: Erlang-style concurrency in Haskell";
26+ license = stdenv.lib.licenses.bsd3;
27+}
ci/DevOps/local/test/build/nix/distributed-static.nixnew file+15
@@ -0,0 +1,15 @@
1+{ mkDerivation, base, binary, bytestring, containers, deepseq
2+, rank1dynamic, stdenv
3+}:
4+mkDerivation {
5+ pname = "distributed-static";
6+ version = "0.3.9";
7+ sha256 = "ee9a9595c20c6456b2b14e579349546f2e0cda46706a72858ec651dbd01490d9";
8+ libraryHaskellDepends = [
9+ base binary bytestring containers deepseq rank1dynamic
10+ ];
11+ doCheck = false;
12+ homepage = "http://haskell-distributed.github.com";
13+ description = "Compositional, type-safe, polymorphic static values and closures";
14+ license = stdenv.lib.licenses.bsd3;
15+}
ci/DevOps/local/test/build/nix/extended-reals.nixnew file+19
@@ -0,0 +1,19 @@
1+{ mkDerivation, base, deepseq, hashable, HUnit, QuickCheck, stdenv
2+, tasty, tasty-hunit, tasty-quickcheck, tasty-th
3+}:
4+mkDerivation {
5+ pname = "extended-reals";
6+ version = "0.2.3.0";
7+ sha256 = "7c8ac733ef09cb37c0a9816e7765ab6fe46551ee58445c00fc6c52a37eef169c";
8+ revision = "5";
9+ editedCabalFile = "1qm0xrlklg0849a2ydg2gh1fimxknmwpy7xmh4p9qsy5dlyj7516";
10+ libraryHaskellDepends = [ base deepseq hashable ];
11+ testHaskellDepends = [
12+ base deepseq HUnit QuickCheck tasty tasty-hunit tasty-quickcheck
13+ tasty-th
14+ ];
15+ doCheck = false;
16+ homepage = "https://github.com/msakai/extended-reals/";
17+ description = "Extension of real numbers with positive/negative infinities";
18+ license = stdenv.lib.licenses.bsd3;
19+}
ci/DevOps/local/test/build/nix/hashable-time.nixnew file+12
@@ -0,0 +1,12 @@
1+{ mkDerivation, base, hashable, stdenv, time }:
2+mkDerivation {
3+ pname = "hashable-time";
4+ version = "0.2.0.2";
5+ sha256 = "fa61f7fbd493b5a54f2aeb10e0c1c4144111ecf34e74080d12c5738ce925fee0";
6+ revision = "3";
7+ editedCabalFile = "1dr7ak803ngrhpv43dy25jm18gfzn02gzd3hm31dzcjv3mxsmbrk";
8+ libraryHaskellDepends = [ base hashable time ];
9+ doCheck = false;
10+ description = "Hashable instances for Data.Time";
11+ license = stdenv.lib.licenses.bsd3;
12+}
ci/DevOps/local/test/build/nix/megaparsec.nixnew file+20
@@ -0,0 +1,20 @@
1+{ mkDerivation, base, bytestring, case-insensitive, containers
2+, criterion, deepseq, mtl, parser-combinators, scientific, stdenv
3+, text, transformers, weigh
4+}:
5+mkDerivation {
6+ pname = "megaparsec";
7+ version = "7.0.5";
8+ sha256 = "f2dc2ea9da25f726c0650051f4fe3cec0003a97dfa37b62a3f1acdba580c1d2f";
9+ libraryHaskellDepends = [
10+ base bytestring case-insensitive containers deepseq mtl
11+ parser-combinators scientific text transformers
12+ ];
13+ benchmarkHaskellDepends = [
14+ base containers criterion deepseq text weigh
15+ ];
16+ doCheck = false;
17+ homepage = "https://github.com/mrkkrp/megaparsec";
18+ description = "Monadic parser combinators";
19+ license = stdenv.lib.licenses.bsd2;
20+}
ci/DevOps/local/test/build/nix/network-transport-tcp.nixnew file+19
@@ -0,0 +1,19 @@
1+{ mkDerivation, async, base, bytestring, containers, data-accessor
2+, network, network-transport, network-transport-tests, stdenv, uuid
3+}:
4+mkDerivation {
5+ pname = "network-transport-tcp";
6+ version = "0.7.0";
7+ sha256 = "5630250afbf08b71b321fd1038183d1947b02d39c4e52800fbe17df29a62b993";
8+ libraryHaskellDepends = [
9+ async base bytestring containers data-accessor network
10+ network-transport uuid
11+ ];
12+ testHaskellDepends = [
13+ base bytestring network network-transport network-transport-tests
14+ ];
15+ doCheck = false;
16+ homepage = "http://haskell-distributed.github.com";
17+ description = "TCP instantiation of Network.Transport";
18+ license = stdenv.lib.licenses.bsd3;
19+}
ci/DevOps/local/test/build/nix/nixpkgsnew file+10
@@ -0,0 +1,10 @@
1+# nixpkgs-19.09 at 2020-04-05T15:13:59Z
2+{
3+ # Descriptive name to make the store path easier to identify
4+ name = "nixos-19.09-2020-04-05";
5+ url = "https://github.com/nixos/nixpkgs-channels/";
6+ # Commit hash for nixos-19.09 as of 2020-04-05
7+ # `git ls-remote https://github.com/nixos/nixpkgs-channels nixos-unstable`
8+ ref = "refs/heads/nixos-19.09";
9+ rev = "f6c1d3b113ce9e7c908991df2e8eed02f03df1bc";
10+}
ci/DevOps/local/test/build/nix/nixpkgs.templatenew file+6
@@ -0,0 +1,6 @@
1+nixpkgs = fetchFromGitHub {
2+ owner = "NixOS";
3+ repo = "nixpkgs-channels";
4+ rev = "2f6440eb09b7e6e3322720ac91ce7e2cdeb413f9";
5+ sha256 = "0vb7ikjscrp2rw0dfw6pilxqpjm50l5qg2x2mn1vfh93dkl2aan7";
6+};
ci/DevOps/local/test/build/nix/primitive-unlifted.nixnew file+12
@@ -0,0 +1,12 @@
1+{ mkDerivation, base, primitive, stdenv, stm }:
2+mkDerivation {
3+ pname = "primitive-unlifted";
4+ version = "0.1.2.0";
5+ sha256 = "031932b9958adabcb27ef1017a42266f3589b44cd25338c4d41d6a31407705ff";
6+ libraryHaskellDepends = [ base primitive ];
7+ testHaskellDepends = [ base primitive stm ];
8+ doCheck = false;
9+ homepage = "https://github.com/haskell-primitive/primitive-unlifted";
10+ description = "Primitive GHC types with unlifted types inside";
11+ license = stdenv.lib.licenses.bsd3;
12+}
ci/DevOps/local/test/build/nix/project-m36.nixnew file+72
@@ -0,0 +1,72 @@
1+{ mkDerivation, aeson, attoparsec, base, base64-bytestring, binary
2+, blaze-html, bytestring, Cabal, cassava, conduit, containers
3+, criterion, cryptohash-sha256, data-interval, deepseq
4+, deepseq-generics, deferred-folds, directory, distributed-process
5+, distributed-process-async, distributed-process-client-server
6+, distributed-process-extras, either, exceptions, extended-reals
7+, filepath, foldl, ghc, ghc-paths, Glob, gnuplot, hashable
8+, hashable-time, haskeline, http-api-data, http-types, HUnit
9+, list-t, megaparsec, monad-parallel, MonadRandom, mtl, network
10+, network-transport, network-transport-tcp, old-locale
11+, optparse-applicative, parallel, parser-combinators, path-pieces
12+, QuickCheck, quickcheck-instances, random, random-shuffle
13+, resourcet, rset, scotty, semigroups, stdenv, stm, stm-containers
14+, template-haskell, temporary, text, time, transformers, unix
15+, unordered-containers, uuid, vector, vector-binary-instances
16+, websockets, zlib
17+}:
18+mkDerivation {
19+ pname = "project-m36";
20+ version = "0.7";
21+ src = /home/chenjf/projects/project-m36/ci/DevOps/local/test/build/../../../../..;
22+ configureFlags = [ "-f-haskell-scripting" ];
23+ isLibrary = true;
24+ isExecutable = true;
25+ libraryHaskellDepends = [
26+ aeson attoparsec base base64-bytestring binary bytestring cassava
27+ conduit containers cryptohash-sha256 data-interval deepseq
28+ deepseq-generics deferred-folds directory distributed-process
29+ distributed-process-async distributed-process-client-server
30+ distributed-process-extras either exceptions extended-reals
31+ filepath foldl ghc-paths Glob gnuplot hashable hashable-time
32+ haskeline http-api-data list-t monad-parallel MonadRandom mtl
33+ network-transport network-transport-tcp old-locale
34+ optparse-applicative parallel path-pieces QuickCheck
35+ quickcheck-instances random-shuffle resourcet rset semigroups stm
36+ stm-containers temporary text time transformers unix
37+ unordered-containers uuid vector vector-binary-instances zlib
38+ ];
39+ executableHaskellDepends = [
40+ aeson attoparsec base base64-bytestring binary blaze-html
41+ bytestring Cabal cassava conduit containers data-interval deepseq
42+ deepseq-generics directory either filepath ghc ghc-paths gnuplot
43+ hashable hashable-time haskeline http-api-data http-types HUnit
44+ list-t megaparsec MonadRandom mtl network-transport-tcp
45+ optparse-applicative parallel parser-combinators path-pieces random
46+ scotty semigroups stm stm-containers template-haskell temporary
47+ text time transformers unordered-containers uuid vector
48+ vector-binary-instances websockets
49+ ];
50+ testHaskellDepends = [
51+ aeson attoparsec base base64-bytestring binary bytestring Cabal
52+ cassava conduit containers data-interval deepseq deepseq-generics
53+ directory either filepath gnuplot hashable hashable-time haskeline
54+ http-api-data HUnit list-t megaparsec MonadRandom mtl network
55+ network-transport network-transport-tcp optparse-applicative
56+ parallel parser-combinators path-pieces random semigroups stm
57+ stm-containers template-haskell temporary text time transformers
58+ unordered-containers uuid vector vector-binary-instances websockets
59+ ];
60+ benchmarkHaskellDepends = [
61+ attoparsec base base64-bytestring binary bytestring Cabal cassava
62+ containers criterion data-interval deepseq deepseq-generics
63+ directory filepath gnuplot hashable hashable-time haskeline HUnit
64+ megaparsec mtl parallel stm stm-containers temporary text time
65+ transformers unordered-containers uuid vector
66+ vector-binary-instances
67+ ];
68+ doCheck = false;
69+ homepage = "https://github.com/agentm/project-m36";
70+ description = "Relational Algebra Engine";
71+ license = stdenv.lib.licenses.publicDomain;
72+}
ci/DevOps/local/test/build/nix/rank1dynamic.nixnew file+18
@@ -0,0 +1,18 @@
1+{ mkDerivation, base, binary, HUnit, stdenv, test-framework
2+, test-framework-hunit
3+}:
4+mkDerivation {
5+ pname = "rank1dynamic";
6+ version = "0.4.0";
7+ sha256 = "3c424bfe52b7d4766fd66ea34c204cf920b146455711d8d10d580ca6c175ab1d";
8+ revision = "1";
9+ editedCabalFile = "1idh1iz15pzdhrhy19584i9ahz41ijbmf56wbb2wns2kipy6w9lr";
10+ libraryHaskellDepends = [ base binary ];
11+ testHaskellDepends = [
12+ base HUnit test-framework test-framework-hunit
13+ ];
14+ doCheck = false;
15+ homepage = "http://haskell-distributed.github.com";
16+ description = "Like Data.Dynamic/Data.Typeable but with support for rank-1 polymorphic types";
17+ license = stdenv.lib.licenses.bsd3;
18+}
ci/DevOps/local/test/build/nix/rset.nixnew file+13
@@ -0,0 +1,13 @@
1+{ mkDerivation, base, QuickCheck, safe, stdenv }:
2+mkDerivation {
3+ pname = "rset";
4+ version = "1.0.0";
5+ sha256 = "f80e4f1092be752e7fc6ba965626d616b477a812c4425cab0c1456342e4c39b4";
6+ libraryHaskellDepends = [ base safe ];
7+ testHaskellDepends = [ base QuickCheck safe ];
8+ doCheck = false;
9+ homepage = "https://github.com/lovasko/rset";
10+ description = "Range set";
11+ license = "unknown";
12+ hydraPlatforms = stdenv.lib.platforms.none;
13+}
ci/DevOps/local/test/build/nix/shell.nixnew file+1
@@ -0,0 +1 @@
1+(import ./default.nix {}).project-m36.env
ci/DevOps/local/test/build/nix/stm-containers.nixnew file+20
@@ -0,0 +1,20 @@
1+{ mkDerivation, base, deferred-folds, focus, foldl, free, hashable
2+, HTF, list-t, QuickCheck, quickcheck-text, rerebase, stdenv
3+, stm-hamt, transformers
4+}:
5+mkDerivation {
6+ pname = "stm-containers";
7+ version = "1.1.0.4";
8+ sha256 = "d43346bfadbe5ccc33c0903a7dfbce8f48657184176fcefa11174ff9d2269655";
9+ libraryHaskellDepends = [
10+ base deferred-folds focus hashable list-t stm-hamt transformers
11+ ];
12+ testHaskellDepends = [
13+ deferred-folds focus foldl free HTF list-t QuickCheck
14+ quickcheck-text rerebase
15+ ];
16+ doCheck = false;
17+ homepage = "https://github.com/nikita-volkov/stm-containers";
18+ description = "Containers for STM";
19+ license = stdenv.lib.licenses.mit;
20+}
ci/DevOps/local/test/build/nix/stm-hamt.nixnew file+27
@@ -0,0 +1,27 @@
1+{ mkDerivation, async, base, criterion, deferred-folds, focus, free
2+, hashable, list-t, mwc-random, mwc-random-monad, primitive
3+, primitive-extras, QuickCheck, quickcheck-instances, rebase
4+, rerebase, stdenv, tasty, tasty-hunit, tasty-quickcheck
5+, transformers
6+}:
7+mkDerivation {
8+ pname = "stm-hamt";
9+ version = "1.2.0.3";
10+ sha256 = "2389eae079a7c80013c1ac028ee4750cdfec1f192f521561f3078f80c4c4d72f";
11+ libraryHaskellDepends = [
12+ base deferred-folds focus hashable list-t primitive
13+ primitive-extras transformers
14+ ];
15+ testHaskellDepends = [
16+ deferred-folds focus QuickCheck quickcheck-instances rerebase tasty
17+ tasty-hunit tasty-quickcheck
18+ ];
19+ benchmarkHaskellDepends = [
20+ async criterion focus free list-t mwc-random mwc-random-monad
21+ rebase
22+ ];
23+ doCheck = false;
24+ homepage = "https://github.com/nikita-volkov/stm-hamt";
25+ description = "STM-specialised Hash Array Mapped Trie";
26+ license = stdenv.lib.licenses.mit;
27+}
ci/DevOps/local/test/build/prepare.shnew file+21
@@ -0,0 +1,21 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "build prepare"
12+
13+#set +u to workaround the nix script temperlately.
14+set +u
15+. $HOME/.nix-profile/etc/profile.d/nix.sh
16+set -u
17+
18+# generate nix file for the project
19+ls ${SCRIPT_ABS_PATH}/../../../../../*.cabal > /dev/null 2>&1 || ls ${SCRIPT_ABS_PATH}/../../../../../package.yaml > /dev/null 2>&1 && cabal2nix --no-check -f-haskell-scripting ${SCRIPT_ABS_PATH}/../../../../.. > ${SCRIPT_ABS_PATH}/nix/project-m36.nix
20+
21+done_banner "project-m36" "build prepare"
ci/DevOps/local/test/build/unbuild.shnew file+18
@@ -0,0 +1,18 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+#set +u to workaround the nix script temperlately.
12+set +u
13+. $HOME/.nix-profile/etc/profile.d/nix.sh
14+set -u
15+
16+begin_banner "project-m36" "build unbuild"
17+
18+done_banner "project-m36" "build unbuild"
ci/DevOps/local/test/build/unfinishing.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "build unfinishing"
12+
13+done_banner "project-m36" "build unfinishing"
ci/DevOps/local/test/build/unprepare.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "build unprepare"
12+
13+done_banner "project-m36" "build unprepare"
ci/DevOps/local/test/cb-cd-ct.shnew file+40
@@ -0,0 +1,40 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "Cont. Build, Deploy and Test"
12+
13+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/prepare.sh
14+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/build/prepare.sh
15+
16+${SCRIPT_ABS_PATH}/prepare.sh
17+${SCRIPT_ABS_PATH}/build/prepare.sh
18+${SCRIPT_ABS_PATH}/build/build.sh
19+${SCRIPT_ABS_PATH}/build/finishing.sh
20+
21+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/build/finishing.sh
22+
23+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/deploy/prepare.sh
24+
25+${SCRIPT_ABS_PATH}/deploy/prepare.sh
26+${SCRIPT_ABS_PATH}/deploy/deploy.sh
27+${SCRIPT_ABS_PATH}/deploy/finishing.sh
28+
29+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/deploy/finishing.sh
30+
31+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/test/prepare.sh
32+
33+${SCRIPT_ABS_PATH}/test/prepare.sh
34+${SCRIPT_ABS_PATH}/test/test.sh
35+${SCRIPT_ABS_PATH}/test/finishing.sh
36+${SCRIPT_ABS_PATH}/finishing.sh
37+
38+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/finishing.sh
39+
40+done_banner "project-m36" "Cont. Build, Deploy and Test"
ci/DevOps/local/test/cb-cd.shnew file+33
@@ -0,0 +1,33 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "Cont. Build and Deploy"
12+
13+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/prepare.sh
14+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/build/prepare.sh
15+
16+${SCRIPT_ABS_PATH}/prepare.sh
17+${SCRIPT_ABS_PATH}/build/prepare.sh
18+${SCRIPT_ABS_PATH}/build/build.sh
19+${SCRIPT_ABS_PATH}/build/finishing.sh
20+
21+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/build/finishing.sh
22+
23+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/deploy/prepare.sh
24+
25+${SCRIPT_ABS_PATH}/deploy/prepare.sh
26+${SCRIPT_ABS_PATH}/deploy/deploy.sh
27+${SCRIPT_ABS_PATH}/deploy/finishing.sh
28+${SCRIPT_ABS_PATH}/finishing.sh
29+
30+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/deploy/finishing.sh
31+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/finishing.sh
32+
33+done_banner "project-m36" "Cont. Build and Deploy"
ci/DevOps/local/test/cb.shnew file+25
@@ -0,0 +1,25 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "Cont. Build"
12+
13+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/prepare.sh
14+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/build/prepare.sh
15+
16+${SCRIPT_ABS_PATH}/prepare.sh
17+${SCRIPT_ABS_PATH}/build/prepare.sh
18+${SCRIPT_ABS_PATH}/build/build.sh
19+${SCRIPT_ABS_PATH}/build/finishing.sh
20+${SCRIPT_ABS_PATH}/finishing.sh
21+
22+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/build/finishing.sh
23+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/finishing.sh
24+
25+done_banner "project-m36" "Cont. Build"
ci/DevOps/local/test/cd-ct.shnew file+31
@@ -0,0 +1,31 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "Cont. Deploy and Test"
12+
13+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/prepare.sh
14+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/deploy/prepare.sh
15+
16+${SCRIPT_ABS_PATH}/deploy/prepare.sh
17+${SCRIPT_ABS_PATH}/deploy/deploy.sh
18+${SCRIPT_ABS_PATH}/deploy/finishing.sh
19+
20+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/deploy/finishing.sh
21+
22+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/test/prepare.sh
23+
24+${SCRIPT_ABS_PATH}/test/prepare.sh
25+${SCRIPT_ABS_PATH}/test/test.sh
26+${SCRIPT_ABS_PATH}/test/finishing.sh
27+${SCRIPT_ABS_PATH}/finishing.sh
28+
29+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/finishing.sh
30+
31+done_banner "project-m36" "Cont. Deploy and Test"
ci/DevOps/local/test/cd.shnew file+25
@@ -0,0 +1,25 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "Cont. Deploy"
12+
13+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/prepare.sh
14+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/deploy/prepare.sh
15+
16+${SCRIPT_ABS_PATH}/prepare.sh
17+${SCRIPT_ABS_PATH}/deploy/prepare.sh
18+${SCRIPT_ABS_PATH}/deploy/deploy.sh
19+${SCRIPT_ABS_PATH}/deploy/finishing.sh
20+${SCRIPT_ABS_PATH}/finishing.sh
21+
22+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/deploy/finishing.sh
23+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/finishing.sh
24+
25+done_banner "project-m36" "Cont. Deploy"
ci/DevOps/local/test/ct.shnew file+25
@@ -0,0 +1,25 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "Cont. Test"
12+
13+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/prepare.sh
14+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/test/prepare.sh
15+
16+${SCRIPT_ABS_PATH}/prepare.sh
17+${SCRIPT_ABS_PATH}/test/prepare.sh
18+${SCRIPT_ABS_PATH}/test/test.sh
19+${SCRIPT_ABS_PATH}/test/finishing.sh
20+${SCRIPT_ABS_PATH}/finishing.sh
21+
22+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/test/finishing.sh
23+${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/finishing.sh
24+
25+done_banner "project-m36" "Cont. Test"
ci/DevOps/local/test/deploy/config/some-sub-project.dhallnew file

No changes to the content.

ci/DevOps/local/test/deploy/deploy.shnew file+15
@@ -0,0 +1,15 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "deploy deploy"
12+
13+sudo sg docker -c "docker-compose -f /var/project-m36/docker-compose-project-m36.yml up -d"
14+
15+done_banner "project-m36" "deploy deploy"
ci/DevOps/local/test/deploy/docker-compose.ymlnew file+21
@@ -0,0 +1,21 @@
1+# docker-compose.yml
2+
3+version: '2'
4+services:
5+ project-m36:
6+ image: DOCKER_HUB_IMAGE_TAG
7+ ports:
8+ - "54321:54321"
9+ # links:
10+ # - depend_service:depend_service
11+ user: project-m36
12+ environment:
13+ DATABASE: mytestdb
14+ DATABASE_DIRECTORY: /var/project-m36/data
15+ command: project-m36-server --database $DATABASE --database-directory $DATABASE_DIRECTORY
16+ volumes:
17+ - "project-m36_config_path:/var/project-m36/config"
18+ - "project-m36_data_path:/var/project-m36/data"
19+ # depends_on:
20+ # - depend_service
21+ restart: unless-stopped
ci/DevOps/local/test/deploy/finishing.shnew file+16
@@ -0,0 +1,16 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "deploy finishing"
12+
13+# clean up the docker login info
14+[[ -d ~/.docker ]] && sudo rm -fr ~/.docker
15+
16+done_banner "project-m36" "deploy finishing"
ci/DevOps/local/test/deploy/non-docker-dependencies/some-sub-project-non-docker-dependencies-list.dhallnew file

No changes to the content.

ci/DevOps/local/test/deploy/prepare.shnew file+56
@@ -0,0 +1,56 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "deploy prepare"
12+
13+if [ ! -L ${SCRIPT_ABS_PATH}/../../../../result ]; then
14+ warn "no project-m36 build result found, suppose that the image would be pull from registry"
15+else
16+ LOCAL_IMAGE_LOAD_RESULT=$(sudo sg docker -c "docker load -i ${SCRIPT_ABS_PATH}/../../../../result")
17+ LOCAL_IMAGE_TAG=$(echo ${LOCAL_IMAGE_LOAD_RESULT} | awk -F"image: " '{print $NF}')
18+ info "local image tag: ${LOCAL_IMAGE_TAG}"
19+ info "tagging the image as projectm36/${LOCAL_IMAGE_TAG}"
20+ sudo sg docker -c "docker tag ${LOCAL_IMAGE_TAG} projectm36/${LOCAL_IMAGE_TAG}"
21+ info "pushing the tag projectm36/${LOCAL_IMAGE_TAG} to docker.io hub"
22+ sudo sg docker -c "docker login -u \"${project_m36_DOCKER_HUB_USERNAME}\" -p \"${project_m36_DOCKER_HUB_PASSWORD}\""
23+ sudo sg docker -c "docker push projectm36/${LOCAL_IMAGE_TAG}"
24+fi
25+
26+set +e
27+myGroup2=$(awk -F":" '{print $1}' /etc/group | grep -w project-m36)
28+set -e
29+if [ "X${myGroup2}" = "X" ]; then
30+ info "no project-m36 group defined yet, create it..."
31+ sudo groupadd -f --gid 90009 project-m36
32+fi
33+
34+set +e
35+myUser2=$(awk -F":" '{print $1}' /etc/passwd | grep -w project-m36)
36+set -e
37+if [ "X${myUser2}" = "X" ]; then
38+ info "no project-m36 user defined yet, create it..."
39+ sudo useradd -G docker -m -p Passw0rd --uid 90009 --gid 90009 project-m36
40+fi
41+
42+if [ ! -d /var/project-m36 ]; then
43+ info "no /var/project-m36 directory found, create it..."
44+ sudo mkdir -p /var/project-m36/data
45+ sudo mkdir -p /var/project-m36/config
46+ sudo chown -R project-m36:project-m36 /var/project-m36
47+fi
48+
49+sudo cp ${SCRIPT_ABS_PATH}/docker-compose.yml /var/project-m36/docker-compose-project-m36.yml.orig
50+sudo chown project-m36:project-m36 /var/project-m36/docker-compose-project-m36.yml.orig
51+
52+sudo sed "s:project-m36_config_path:/var/project-m36/config:g" < /var/project-m36/docker-compose-project-m36.yml.orig | sudo su -p -c "dd of=/var/project-m36/docker-compose-project-m36.yml.01" project-m36
53+sudo sed "s:project-m36_data_path:/var/project-m36/data:g" < /var/project-m36/docker-compose-project-m36.yml.01 | sudo su -p -c "dd of=/var/project-m36/docker-compose-project-m36.yml.02" project-m36
54+sudo sed "s/DOCKER_HUB_IMAGE_TAG/projectm36\/${LOCAL_IMAGE_TAG}/g" < /var/project-m36/docker-compose-project-m36.yml.02 | sudo su -p -c "dd of=/var/project-m36/docker-compose-project-m36.yml" project-m36
55+
56+done_banner "project-m36" "deploy prepare"
ci/DevOps/local/test/deploy/undeploy.shnew file+15
@@ -0,0 +1,15 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "deploy undeploy"
12+
13+sudo sg docker -c "docker-compose -f /var/project-m36/docker-compose-project-m36.yml down"
14+
15+done_banner "project-m36" "deploy undeploy"
ci/DevOps/local/test/deploy/unfinishing.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "deploy unfinishing"
12+
13+done_banner "project-m36" "deploy unfinishing"
ci/DevOps/local/test/deploy/unprepare.shnew file+38
@@ -0,0 +1,38 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "deploy unprepare"
12+
13+if [ -d /var/project-m36 ]; then
14+ info "/var/project-m36 directory found, delete it..."
15+ sudo rm -fr /var/project-m36
16+fi
17+
18+set +e
19+myUser2=$(awk -F":" '{print $1}' /etc/passwd | grep -w project-m36)
20+if [ "X${myUser2}" != "X" ]; then
21+ info "project-m36 user defined, delete it..."
22+ sudo userdel -fr project-m36
23+fi
24+
25+myGroup2=$(awk -F":" '{print $1}' /etc/group | grep -w project-m36)
26+if [ "X${myGroup2}" != "X" ]; then
27+ info "project-m36 group defined, delete it..."
28+ sudo groupdel -f project-m36
29+fi
30+set -e
31+
32+MY_TO_REMOVE_IMAGES=$(sudo sg docker -c "docker images"|grep -w project-m36|awk '{print $3}')
33+for MY_TO_REMOVE_IMAGE in ${MY_TO_REMOVE_IMAGES}
34+do
35+ sudo sg docker -c "docker image rm -f ${MY_TO_REMOVE_IMAGE}"
36+done
37+
38+done_banner "project-m36" "deploy unprepare"
ci/DevOps/local/test/finishing.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "finishing"
12+
13+done_banner "project-m36" "finishing"
ci/DevOps/local/test/prepare.shnew file+14
@@ -0,0 +1,14 @@
1+#!/usr/bin/env bash
2+
3+if ! type dirname > /dev/null 2>&1; then
4+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
5+ exit 1
6+fi
7+
8+. "$(dirname "$0")"/../../common/common.sh
9+
10+init_with_root_or_sudo "$0"
11+
12+begin_banner "project-m36" "prepare"
13+
14+done_banner "project-m36" "prepare"
ci/DevOps/local/test/test/finishing.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "test finishing"
12+
13+done_banner "project-m36" "test finishing"
ci/DevOps/local/test/test/prepare.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "test prepare"
12+
13+done_banner "project-m36" "test prepare"
ci/DevOps/local/test/test/test.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "test test"
12+
13+done_banner "project-m36" "test test"
ci/DevOps/local/test/test/unfinishing.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "test unfinishing"
12+
13+done_banner "project-m36" "test unfinishing"
ci/DevOps/local/test/test/unprepare.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "test unprepare"
12+
13+done_banner "project-m36" "test unprepare"
ci/DevOps/local/test/test/untest.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "test untest"
12+
13+done_banner "project-m36" "test untest"
ci/DevOps/local/test/uncb-uncd-unct.shnew file+45
@@ -0,0 +1,45 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "Cont. UnBuild, UnDeploy and UnTest"
12+
13+# I don't think we need to undo the top-level finishing and prepare
14+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/unfinishing.sh
15+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/test/unfinishing.sh
16+
17+${SCRIPT_ABS_PATH}/unfinishing.sh
18+${SCRIPT_ABS_PATH}/test/unfinishing.sh
19+${SCRIPT_ABS_PATH}/test/untest.sh
20+${SCRIPT_ABS_PATH}/test/unprepare.sh
21+
22+# I don't think we need this either
23+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/test/unprepare.sh
24+
25+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/deploy/unfinishing.sh
26+
27+${SCRIPT_ABS_PATH}/deploy/unfinishing.sh
28+${SCRIPT_ABS_PATH}/deploy/undeploy.sh
29+${SCRIPT_ABS_PATH}/deploy/unprepare.sh
30+
31+# I don't think we need this either
32+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/deploy/unprepare.sh
33+
34+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/build/unfinishing.sh
35+
36+${SCRIPT_ABS_PATH}/build/unfinishing.sh
37+${SCRIPT_ABS_PATH}/build/unbuild.sh
38+${SCRIPT_ABS_PATH}/build/unprepare.sh
39+${SCRIPT_ABS_PATH}/unprepare.sh
40+
41+# I don't think we need this either
42+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/build/unprepare.sh
43+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/unprepare.sh
44+
45+done_banner "project-m36" "Cont. UnBuild, UnDeploy and UnTest"
ci/DevOps/local/test/uncb-uncd.shnew file+36
@@ -0,0 +1,36 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "Cont. UnBuild and UnDeploy"
12+
13+# I don't think we need to undo the top-level finishing and prepare
14+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/unfinishing.sh
15+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/deploy/unfinishing.sh
16+
17+${SCRIPT_ABS_PATH}/unfinishing.sh
18+${SCRIPT_ABS_PATH}/deploy/unfinishing.sh
19+${SCRIPT_ABS_PATH}/deploy/undeploy.sh
20+${SCRIPT_ABS_PATH}/deploy/unprepare.sh
21+
22+# I don't think we need this either
23+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/deploy/unprepare.sh
24+
25+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/build/unfinishing.sh
26+
27+${SCRIPT_ABS_PATH}/build/unfinishing.sh
28+${SCRIPT_ABS_PATH}/build/unbuild.sh
29+${SCRIPT_ABS_PATH}/build/unprepare.sh
30+${SCRIPT_ABS_PATH}/unprepare.sh
31+
32+# I don't think we need this either
33+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/build/unprepare.sh
34+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/unprepare.sh
35+
36+done_banner "project-m36" "Cont. UnBuild and UnDeploy"
ci/DevOps/local/test/uncb.shnew file+27
@@ -0,0 +1,27 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "Cont. UnBuild"
12+
13+# I don't think we need to undo the top-level finishing and prepare
14+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/unfinishing.sh
15+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/build/unfinishing.sh
16+
17+${SCRIPT_ABS_PATH}/unfinishing.sh
18+${SCRIPT_ABS_PATH}/build/unfinishing.sh
19+${SCRIPT_ABS_PATH}/build/unbuild.sh
20+${SCRIPT_ABS_PATH}/build/unprepare.sh
21+${SCRIPT_ABS_PATH}/unprepare.sh
22+
23+# I don't think we need this either
24+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/build/unprepare.sh
25+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/unprepare.sh
26+
27+done_banner "project-m36" "Cont. UnBuild"
ci/DevOps/local/test/uncd-unct.shnew file+36
@@ -0,0 +1,36 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "Cont. UnDeploy and UnTest"
12+
13+# I don't think we need to undo the top-level finishing and prepare
14+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/unfinishing.sh
15+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/test/unfinishing.sh
16+
17+${SCRIPT_ABS_PATH}/unfinishing.sh
18+${SCRIPT_ABS_PATH}/test/unfinishing.sh
19+${SCRIPT_ABS_PATH}/test/untest.sh
20+${SCRIPT_ABS_PATH}/test/unprepare.sh
21+
22+# I don't think we need this either
23+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/test/unprepare.sh
24+
25+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/deploy/unfinishing.sh
26+
27+${SCRIPT_ABS_PATH}/deploy/unfinishing.sh
28+${SCRIPT_ABS_PATH}/deploy/undeploy.sh
29+${SCRIPT_ABS_PATH}/deploy/unprepare.sh
30+${SCRIPT_ABS_PATH}/unprepare.sh
31+
32+# I don't think we need this either
33+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/deploy/unprepare.sh
34+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/unprepare.sh
35+
36+done_banner "project-m36" "Cont. UnDeploy and UnTest"
ci/DevOps/local/test/uncd.shnew file+27
@@ -0,0 +1,27 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "Cont. UnDeploy"
12+
13+# I don't think we need to undo the top-level finishing and prepare
14+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/unfinishing.sh
15+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/deploy/unfinishing.sh
16+
17+${SCRIPT_ABS_PATH}/unfinishing.sh
18+${SCRIPT_ABS_PATH}/deploy/unfinishing.sh
19+${SCRIPT_ABS_PATH}/deploy/undeploy.sh
20+${SCRIPT_ABS_PATH}/deploy/unprepare.sh
21+${SCRIPT_ABS_PATH}/unprepare.sh
22+
23+# I don't think we need this either
24+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/deploy/unprepare.sh
25+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/unprepare.sh
26+
27+done_banner "project-m36" "Cont. UnDeploy"
ci/DevOps/local/test/unct.shnew file+27
@@ -0,0 +1,27 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "Cont. UnTest"
12+
13+# I don't think we need to undo the top-level finishing and prepare
14+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/unfinishing.sh
15+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/test/unfinishing.sh
16+
17+${SCRIPT_ABS_PATH}/unfinishing.sh
18+${SCRIPT_ABS_PATH}/test/unfinishing.sh
19+${SCRIPT_ABS_PATH}/test/untest.sh
20+${SCRIPT_ABS_PATH}/test/unprepare.sh
21+${SCRIPT_ABS_PATH}/unprepare.sh
22+
23+# I don't think we need this either
24+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/test/unprepare.sh
25+#${SCRIPT_ABS_PATH}/../../../../DevOps/local/test/unprepare.sh
26+
27+done_banner "project-m36" "Cont. UnTest"
ci/DevOps/local/test/unfinishing.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "unfinishing"
12+
13+done_banner "project-m36" "unfinishing"
ci/DevOps/local/test/unprepare.shnew file+13
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+if ! type dirname > /dev/null 2>&1; then
3+ echo "Not even a linux or macOS, Windoze? We don't support it. Abort."
4+ exit 1
5+fi
6+
7+. "$(dirname "$0")"/../../common/common.sh
8+
9+init_with_root_or_sudo "$0"
10+
11+begin_banner "project-m36" "unprepare"
12+
13+done_banner "project-m36" "unprepare"