2
2
3
3
set -uex
4
4
5
+ : " ${REPO_FILE_URL:= } "
6
+
7
+ # Currently not working
5
8
if [ -n " ${ARTIFACTORY_URL:- } " ] && " $LOCAL_REPOS " ; then
6
- echo " MIRRORSITE=${ARTIFACTORY_URL} artifactory/ubuntu-proxy" | sudo tee /root/.pbuilderrc
9
+ pbuilderrc=" ./pbuilder_rc.txt"
10
+ rm -f " $pbuilderrc "
11
+ # echo "MIRRORSITE=${ARTIFACTORY_URL}/ubuntu-proxy/ubuntu" > "$pbuilderrc"
12
+ echo " export http_proxy=\" ${HTTPS_PROXY} \" " >> " $pbuilderrc "
13
+ # if [ -n "$REPO_FILE_URL" ]; then
14
+ # direct="${REPO_FILE_URL##*//}"
15
+ # direct="${direct%%/*}"
16
+ # echo "no_proxy=\"${direct}\"" >> "$pbuilderrc"
17
+ # fi
18
+ # shellcheck disable=SC2002
19
+ cat " $pbuilderrc " | sudo tee /root/.pbuilderrc
7
20
fi
8
21
9
22
# shellcheck disable=SC2086
10
23
sudo pbuilder create \
11
24
--extrapackages " gnupg ca-certificates" \
12
- $DISTRO_ID_OPT
25
+ $DISTRO_ID_OPT || true # Ignore error status for now.
13
26
14
27
repo_args=" "
15
28
repos_added=()
29
+ # currently a bit broken, pbuilder will not accept user provided CAs.
16
30
for repo in $DISTRO_BASE_PR_REPOS $PR_REPOS ; do
17
31
branch=" master"
18
32
build_number=" lastSuccessfulBuild"
@@ -32,31 +46,34 @@ for repo in $DISTRO_BASE_PR_REPOS $PR_REPOS; do
32
46
repo_args=" $repo_args |deb [trusted=yes] ${JENKINS_URL:- https:// build.hpdd.intel.com/ } job/daos-stack/job/$repo /job/$branch /$build_number /artifact/artifacts/$DISTRO / ./"
33
47
done
34
48
35
- repo_args+=" |$( curl -sSf " $REPO_FILE_URL " daos_ci-" $DISTRO " -artifactory.list |
36
- sed -e ' s/#.*//' -e ' /ubuntu-proxy/d' -e ' /^$/d' -e ' /^$/d' \
37
- -e ' s/signed-by=.*\.gpg/trusted=yes/' |
38
- sed -e ' :a; N; $!ba; s/\n/|/g' ) "
39
- for repo in $JOB_REPOS ; do
40
- repo_name=${repo##*:// }
41
- repo_name=${repo_name// \/ / _}
42
- if [[ " ${repos_added[*]} " = * \ ${repo_name} \ * ]]; then
43
- # don't add duplicates, first found wins
44
- continue
45
- fi
46
- repos_added+=(" $repo_name " )
47
- repo_args+=" |deb ${repo} $VERSION_CODENAME main"
48
- done
49
- # NB: This PPA is needed to support modern go toolchains on ubuntu 20.04.
50
- # After the build is updated to use 22.04, which supports go >= 1.18, it
51
- # should no longer be needed.
52
- repo_args=" $repo_args |deb [trusted=yes] https://ppa.launchpadcontent.net/longsleep/golang-backports/ubuntu $VERSION_CODENAME main"
53
- echo " $repo_args "
54
- if [ " $repo_args " = " |" ]; then
55
- repo_args=" "
56
- else
57
- # repo_args="--othermirror"${repo_args#|}\""
58
- repo_args=" ${repo_args# |} "
59
- fi
49
+ # currently broken, builder will not accept internal certs.
50
+ # repo_args+="|$(curl -sSf "$REPO_FILE_URL"daos_ci-"$DISTRO"-artifactory.list |
51
+ # sed -e 's/#.*//' -e '/ubuntu-proxy/d' -e '/^$/d' -e '/^$/d' \
52
+ # -e 's/signed-by=.*\.gpg/trusted=yes/' |
53
+ # sed -e ':a; N; $!ba; s/\n/|/g')"
54
+ # for repo in $JOB_REPOS; do
55
+ # repo_name=${repo##*://}
56
+ # repo_name=${repo_name//\//_}
57
+ # if [[ " ${repos_added[*]} " = *\ ${repo_name}\ * ]]; then
58
+ # # don't add duplicates, first found wins
59
+ # continue
60
+ # fi
61
+ # repos_added+=("$repo_name")
62
+ # repo_args+="|deb ${repo} $VERSION_CODENAME main"
63
+ # done
64
+
65
+ # # NB: This PPA is needed to support modern go toolchains on ubuntu 20.04.
66
+ # # After the build is updated to use 22.04, which supports go >= 1.18, it
67
+ # # should no longer be needed.
68
+ # currently broken - claim is public key not available.
69
+ # repo_args="$repo_args|deb [trusted=yes] https://ppa.launchpadcontent.net/longsleep/golang-backports/ubuntu $VERSION_CODENAME main"
70
+ # echo "$repo_args"
71
+ # if [ "$repo_args" = "|" ]; then
72
+ # repo_args=""
73
+ # else
74
+ # #repo_args="--othermirror"${repo_args#|}\""
75
+ # repo_args="${repo_args#|}"
76
+ # fi
60
77
cd " $DEB_TOP "
61
78
# shellcheck disable=SC2086
62
79
sudo pbuilder update --override-config $DISTRO_ID_OPT ${repo_args: +--othermirror " $repo_args " }
0 commit comments