Merge ~morphis/snappy-hwe-snaps/+git/jenkins-jobs:f/infra-install-fixes into ~snappy-hwe-team/snappy-hwe-snaps/+git/jenkins-jobs:master

Proposed by Simon Fels
Status: Merged
Approved by: Konrad ZapaƂowicz
Approved revision: 47d0b9686c1109796f45362eb167fc64de70d63c
Merged at revision: 1fa46ee9ba97355ae9933a1bb5d490492de23282
Proposed branch: ~morphis/snappy-hwe-snaps/+git/jenkins-jobs:f/infra-install-fixes
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/jenkins-jobs:master
Diff against target: 95 lines (+22/-20)
3 files modified
jobs/infrastructure/common-job-prepare.sh (+6/-3)
jobs/infrastructure/prepare-0-install.sh (+13/-15)
local.yaml (+3/-2)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Roberto Mier Escandon (community) Approve
Oliver Grawert Approve
Review via email: mp+331131@code.launchpad.net

Description of the change

* infra: the proxy is already exported by the common prepare script
* infra: use noninteractive frontend for deb installs
* infra: differentiate between http and https proxy

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Oliver Grawert (ogra) wrote :

LGTM

review: Approve
Revision history for this message
Roberto Mier Escandon (rmescandon) wrote :

lgtm

review: Approve
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/jobs/infrastructure/common-job-prepare.sh b/jobs/infrastructure/common-job-prepare.sh
2index 64d6c05..eef6f39 100644
3--- a/jobs/infrastructure/common-job-prepare.sh
4+++ b/jobs/infrastructure/common-job-prepare.sh
5@@ -33,10 +33,13 @@ if [ -n "${{CLEANUP_WORKSPACE}}" ] && [ "${{CLEANUP_WORKSPACE}}" -eq 1 ]; then
6 fi
7
8 # Setup a proxy if the project wants to use one
9-PROXY="{proxy}"
10-if [ -n "$PROXY" ]; then
11+HTTP_PROXY="{http_proxy}"
12+if [ -n "$HTTP_PROXY" ]; then
13 export http_proxy=$PROXY
14- export https_proxy=$PROXY
15+fi
16+HTTPS_PROXY="{https_proxy}"
17+if [ -n "$HTTPS_PROXY" ]; then
18+ export https_proxy=$HTTPS_PROXY
19 fi
20
21 cat << EOF > $WORKSPACE/.build_env
22diff --git a/jobs/infrastructure/prepare-0-install.sh b/jobs/infrastructure/prepare-0-install.sh
23index bb47272..3d2fb34 100644
24--- a/jobs/infrastructure/prepare-0-install.sh
25+++ b/jobs/infrastructure/prepare-0-install.sh
26@@ -16,19 +16,24 @@
27
28 set -ex
29
30-sudo apt-get install --yes software-properties-common
31+# Use correct home and preserve environment variables when calling `sudo ...`
32+SUDO="sudo -E -H"
33+
34+export DEBIAN_FRONTEND=noninteractive
35+
36+$SUDO apt-get install --yes software-properties-common
37
38 # build tools as used in Launchpad
39-sudo add-apt-repository --yes ppa:launchpad/buildd-staging
40-sudo add-apt-repository --yes ppa:jenkaas-hackers/tools
41-sudo add-apt-repository --yes ppa:snappy-hwe-team/ci-tools
42+$SUDO add-apt-repository --yes ppa:launchpad/buildd-staging
43+$SUDO add-apt-repository --yes ppa:jenkaas-hackers/tools
44+$SUDO add-apt-repository --yes ppa:snappy-hwe-team/ci-tools
45
46-sudo apt-get update
47+$SUDO apt-get update
48
49-echo "postfix postfix/mailname string $(hostname)" | sudo debconf-set-selections
50-echo "postfix postfix/main_mailer_type string 'Internet Site'" | sudo debconf-set-selections
51+echo "postfix postfix/mailname string $(hostname)" | $SUDO debconf-set-selections
52+echo "postfix postfix/main_mailer_type string 'Internet Site'" | $SUDO debconf-set-selections
53
54-sudo apt-get install --yes \
55+$SUDO apt-get install --yes \
56 git \
57 python \
58 python-launchpadlib \
59@@ -55,13 +60,6 @@ sudo apt-get install --yes \
60 snapcraft \
61 {install_packages}
62
63-export http_proxy="http://squid.internal:3128/"
64-export https_proxy="http://squid.internal:3128/"
65-
66-# Use correct home and preserve environment variables when calling
67-# `sudo pip[3] ...` below. pip otherwise fails to run.
68-SUDO="sudo -E -H"
69-
70 # Install additional sofware from the python package database
71 $SUDO pip install --upgrade pip
72 $SUDO pip install jenkins-job-builder
73diff --git a/local.yaml b/local.yaml
74index c5b7820..8703421 100644
75--- a/local.yaml
76+++ b/local.yaml
77@@ -17,7 +17,8 @@
78 install_packages: ""
79 build_slaves:
80 - master
81- proxy: ""
82+ http_proxy: ""
83+ https_proxy: ""
84 jobs:
85 - infrastructure-jobs
86
87@@ -36,7 +37,7 @@
88 update_mps: false
89 run_tests: false
90 build_on_launchpad: false
91- trigger_ci: false
92+ trigger_ci: true
93 auto_merge: false
94
95 build_architectures: [amd64]

Subscribers

People subscribed via source and target branches

to all changes: