aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Rue <dan.rue@linaro.org>2017-08-07 15:56:37 -0500
committerDan Rue <dan.rue@linaro.org>2017-08-07 15:56:37 -0500
commit4ef8d8ad81b6196c69ac0481d0b1159c06e85558 (patch)
treee78242d1ede1f049ae20c2cf7acfd1ea1e0110ed
parenta88a03986de3b83c8849ef05db4b06d800b7f701 (diff)
Add support for 'stable' branch
Pass in '-e erp_debian_installer_environment=stable' to use debian installer stable, rather than release. This will also change the squad project to 'stable-debian', rather than 'staging-debian'. Change-Id: If73edef4213d0407ad363f269f8472425f2c401f Signed-off-by: Dan Rue <dan.rue@linaro.org>
-rw-r--r--erp-playbook/Makefile11
-rw-r--r--erp-playbook/README.md15
-rw-r--r--erp-playbook/hosts170
-rwxr-xr-x[-rw-r--r--]erp-playbook/local_scripts/check-for-changes.sh30
-rw-r--r--erp-playbook/main.yml2
5 files changed, 131 insertions, 97 deletions
diff --git a/erp-playbook/Makefile b/erp-playbook/Makefile
index 6418de6..1749845 100644
--- a/erp-playbook/Makefile
+++ b/erp-playbook/Makefile
@@ -1,20 +1,21 @@
BUILD_NUM = # retrieve latest build by default
+BUILD_ENV = staging # alternately, use stable
get-last-change:
- sh local_scripts/check-for-changes.sh
+ sh local_scripts/check-for-changes.sh $(BUILD_ENV)
provision-drue:
ifeq ($(strip $(BUILD_NUM)),)
- ansible-playbook -K -t provision -l erp-drue main.yml
+ ansible-playbook -K -t provision -l erp-drue -e erp_debian_installer_environment=$(BUILD_ENV) main.yml
else
- ansible-playbook -K -t provision -l erp-drue -e erp_build_number=$(BUILD_NUM) main.yml
+ ansible-playbook -K -t provision -l erp-drue -e erp_build_number=$(BUILD_NUM) -e erp_debian_installer_environment=$(BUILD_ENV) main.yml
endif
run-drue:
ifeq ($(strip $(BUILD_NUM)),)
- ansible-playbook -t run_test -l erp-drue main.yml
+ ansible-playbook -t run_test -l erp-drue -e erp_debian_installer_environment=$(BUILD_ENV) main.yml
else
- ansible-playbook -t run_test -l erp-drue -e "{erp_build_number: $(BUILD_NUM)}" main.yml
+ ansible-playbook -t run_test -l erp-drue -e "{erp_build_number: $(BUILD_NUM)}" -e erp_debian_installer_environment=$(BUILD_ENV) main.yml
endif
roles:
diff --git a/erp-playbook/README.md b/erp-playbook/README.md
index e5f7a5d..e1a39b7 100644
--- a/erp-playbook/README.md
+++ b/erp-playbook/README.md
@@ -53,3 +53,18 @@ To run against a given host or host group, run `ansible-playbook -l
<hostname|hostgroup> main.yml`. If -l (limit) is not used, ansible will attempt
to run against every host defined in `hosts`.
+## Examples
+
+Provision hosts in the 'erp-drue' hostgroup:
+
+ make run-drue
+
+Run tests against already-provisioned hosts in the 'erp-drue' hostgroup, but
+set build number explicitly:
+
+ make run-drue BUILD_NUM=450
+
+Provision and run against hosts using the stable build number 321:
+
+ make provision-drue BUILD_ENV=staging BUILD_NUM=321
+ make run-drue BUILD_ENV=staging BUILD_NUM=321
diff --git a/erp-playbook/hosts b/erp-playbook/hosts
index 7e46a0f..6b2520d 100644
--- a/erp-playbook/hosts
+++ b/erp-playbook/hosts
@@ -1,86 +1,86 @@
$ANSIBLE_VAULT;1.1;AES256
-35383763303764623661313536363464643932366161336534613365613965323166373334343261
-3764313332313831336265616231623765636135363430330a386364316539633534376436333662
-63343533613439333261303739613066336665386239353266373565376537663632336130373232
-6161653738336365320a396663353966303134646663373765336339383537663233623966353837
-38653039333338383237396632313163303565616638326337366132653630623761316231366265
-65356334333535316539376535306362326166353232383863623137353331313432356531643333
-66376636643236656234323936363330646535373063353863353836386232316231383930633436
-35303363656239626434633463393135383065343333306532326564333362663166383437393434
-33333061616638386665306338356231386433613733373364343531353733303664353330326163
-36643161663437313639306331336136363639666139366535323466326566656130646439653139
-65313465376432343139396366356430623463383563613436353766393231653432386433643830
-35633763323233343937366436396631363431626364346234633064646333306530663535653263
-36356534396261343465326563326235303731653466663262636235396334323138643138393165
-31356639613432646137336433666566646436363762653265393262633833353234396161653264
-35393464366266346366343634386332363439626164393137336465316363653538343539353438
-65633562313631353466626163653339373737646437636438663235656365316332373061363637
-39336139353530393862656264336238623635363333373437623738383131663865393835666630
-37656266366363343833383465346530363334353633353530373332636535306233363732626235
-32633165313831633366353736613863396630636639343931663131373235663265323966636331
-30646437663562336366663838343466313038333965373630306335656538353331376138373734
-33363438356636623964633632306233383039306433663361616164393934326161663239326439
-32646364323161303334356262666436376132653330623266366231333161666465633866653961
-30346333396133393463326437633866616238613666616363346261346362363032373265336361
-37386137383331323934373937356564336331333136643466363938386162636464333437396463
-63333462336337626131623338356637663130353462373233646332323039343765623736333332
-37336234323664653664346238616239646365343363336364333663336166653565643435383238
-37396539383531376439313265373062373739363434396565303934346532383861623964366430
-33663439356630646661333438353064663438306333663033633136313362646334373432303339
-38636266363639366537613234363237306466646630393661353762643534666337653437316666
-39316164636264613435616638323461373839303130343638383262303131396363333064663933
-61623330313230326238386161613636616634383931633566353036363362623035626561353536
-65316630616134333836356461303136343061653166323766363532666233313430383231663762
-61346465313239643338383737613232333132303464363038623162336535396339316361626462
-66306233343865346532626133623635393463366534623739663161313837363631326463363331
-35346163666238303935393462373734323431383830346338613863363066663663376531653063
-39636238373765646665363361323733316337373235653263323766383836393833643930633332
-65633034363466643064333461326461356364326263656637326535346332323339656338643631
-63663261306536346634306662323363313236363131613164393537313935643031306339303330
-31396631633639656162623662373935663130396562393432386635306431636333303464336435
-32343666663865653533353638373331326333353837643466396166306433353030623038383866
-66383937623336616561386634633532623133323535653538326463636435316136326666363535
-64613636326365346164623663623163643130613866316136653232326335633465323466616161
-63393065363865393163643634333661326235646338643935646261323039313034386263323663
-62333936306632336662663166313038633734373065653532353166343265643933353764396436
-35616565663761363262343365636462353562663066623631643136303665333731323862393161
-62663034623537646533623964633866316338636437316463633236653166383032646133623934
-37616533653331663662623831633537633837363737623961333439616135383366333364373831
-63313237643933346338396134343566666434653930646630616436373466306538336338366262
-63633364633639356166626138303661326331646263356334646235653338346662613931343662
-39353035613466346433393431326164623931653232383463663239363634373962653965376535
-65373939383539303864353832313736656664356136616162636538633332633963366636623238
-36363634343461646564373661616337323261613465353339326130613363333334613438623836
-38303430373036643133383233336534373163393530383335383939376663393234623634663465
-63356235333033313339633634373433323038346364366335656263323032396638313736363064
-63656436663037623239613539353637623766303938663464653930383639626363313733356530
-61346362643333653165313130616131323939306633356634383438333261633034613735313635
-35326336353862323636653031303930303662363161616462396362613435643132666135633235
-32373739353863353533313236373463386135653134656264353039323539363431326333333064
-36656434343834393263636433356663383164313663653564373130373435663665346631636362
-34373832343739616533356566333665363063333232396163366133643365393064623731343237
-38343764343065653966353537393935303564336135393436363064393233393265646231346437
-37646161343538373364376337353430616161333437393534363632383433323037333565623364
-34666339393335333939363639383537386633303037363766653034333932353632636431306365
-34396633326637326563326435633839346363323438396561636461616335396630613539336338
-31313036396262653362393934393735343563633463643861626163353064313430353763656632
-39643265656366393561363734386233396232646566363566393066396561393030646537666235
-35666430616463306662303835613766613561333236306531666135636339313264386238633364
-36313765616435666335386535653463653565343034353630646338626465663036653662366639
-34623735333562376239383236313837633231366533363364383030633932386338663462653565
-62666336386438646461323666393966316430343939633738303161356630326632316439396131
-36376463313739656235646238393963333133306666306561613836343564393831623465363365
-62316238353731383638316136313666656161303663353062336630636639343865376161663933
-62383838343237633435666438373033653837636662343565363339363737643066353535616537
-64616530623930303561623363333562646265613466626133316662306232616239616431636162
-66316433333135643562363233313464323466316436376365646630386663623730636539313936
-65353437633030313363353932356462386430323234383063366337323665333662623937663230
-32663965303033363235613464636132323135333065333634393835366234633436303538656334
-62333332303338386238393131313462353639376264393464343238626433613539663064626231
-66643765666365346437663937373465373136363266373065363330353863393664656233663434
-66653063333132616665346335653864343162333533396334326262373331366162366363353633
-63353237333062633931366263313539616538386632336234326634383734666137613736636635
-36386262313139353034316237393361663531396630313162653463313432313532393561656631
-34363466626466643833643139373738643437656430653731343137326532623435323637643334
-32333361323034356337333164616534633634623135616231626433623164323463636438376139
-61613931643239616162613966303339343662393965306438333237316332346561
+39333138613836363363313137626264666631633538303136323462643265356662643461653330
+6434383830666162316161623461333535396239313935650a333832613966303630383762633033
+61353932366461663334363734386261303564623266653530623961343363373835636530343036
+6131306662666337360a346534663361633339633832346137353834633331333833646238396131
+32303330636463393962663932616265666266313535306566386364366235363136333330623463
+37353861316263306231613939343961663735363166326262646363386139656530326362356236
+36323131646535343934633663336161646432393637356431343266326530303664353062353862
+37373537363332626263386233323263393737616233666638373263313064626234343930366164
+34333236303164646631353630393434353330323935353163656139303932613633346466376363
+32656633353165613136313364653565376361343762363364613662663734646631393666636339
+39396137303131646362333834326163633331383639383730636162366262383461323534313737
+38323834363030323939616633646437636164373234343231386138613931663561636630393533
+32326664323737613763666133653964303236383262306465343264633538313766333436633764
+31346635623930393535353335613530656364646239353338623666373937386261336332303366
+30633637376235363532326264306139373235313531663865666431333162613064356337323439
+62646637643562643838646435363062393238343134653966313631303436306239363537386333
+30306561613366636133376361633765383631366637336437316638363931633638336566656565
+36643339623132373265313366643030326635343537353037636537336139393965356362626334
+38366661303130613462316339313037633834376161663235373039636138313439383963663938
+64393534306436363938653432303766303766663539336537353261626138646232613831326666
+64363730663832363431336439636363366138336537346137653035396632336231303434363430
+39356337316565373135623965653534323330363266376233616666613039333434346632623065
+63393535393932653834653164316633346265653466646134643139363931323933303961656334
+30616630633536386562336561653662643233333566656561373337363065373361626265633933
+39303733323739653838346233366162303961636365333330326336626664343561636338356430
+64346662363531616330393265373931626530316332393634643066616563663265666666383734
+33613632333937663164656634363764653962626332356266303630653237613863613931633462
+30363130653337326165376633663936326166353066653666656532346338353261303061306139
+63306265343535393233303138656439616639383236663933393332396262356263646363386639
+38333938303837343630643662396466303166636632623933323263313334343337643533666564
+63383134353032393235666135633866333533653137316365313137633830333036356130663266
+32303464383039396566383462626163633636616364623764323537383030643164643462366666
+63353366363231323933666232343065313631383335616438373261613166663861316435336536
+31626164326136666437316665393163323930633035636165393134636138663532656666343663
+35343165383239656361333933303335383239373536613539383465383464623734353632313035
+39663832353032373233396666626234386134633237613734303665303733656533363161336363
+39666161363763396264323462373837356534633365663730656565636132353561363335393037
+62633834323761306164313739373238303333353563633065336338643030666239306434383035
+39623265343666653463326666336431326338323366656266393761666331646163313736666439
+38333331323233643836383761373237366131633464666464656539626636376331613432373461
+61346239306638303931353739666664336261636164393436646533316430393137633064656663
+61656238363863646562333537303962333333653533373139303163623865636334366230653838
+30356632343231303336356465336438333933356464373638366434623337633965393765353635
+30663439306266663163326131653462313331636665636235333363303539656366353836393633
+31333463373939666335343036356238343965666534306239363462326334636263346561623264
+30363261363734383865346561363561356637326535313138343231646561316238663034613863
+35633833373161633635653663623734366530326236653236373863323761653166386231636333
+39323861636338346562653435623466323033376236316635666263653639396362386538643238
+35386437373931336335623432363434643638646533316564636163306264313763396430653538
+61623834363630373432346463613865343164663037386637633532396233623239366633356164
+37616534363431643365313337363861623734376464316339393633396235346435373366303066
+39653830646238336337336465643262613066313031353739656135613364663632376132303162
+61366530633137646235663866643033346535323638383533656562646637633064393634346365
+64363630626236663830396531656363303932363234663735333736303862363430643536653937
+65623335393366393165393738656465623866323539336639376335333033323031303165613735
+64373838663365373733303438396532656266666464323164353835363936373038623963396331
+33383237303930613766613134616138366435386132373335636661393166326637336638353730
+64646163383139303161653236386163666566323330303365393534323463363337313637383835
+64626231366431646135343262643739643435333432336438396564326262326237643536623934
+38303135633136303166663734653064393130633461303064616334643339383736386562393036
+39356131376234306361313166653665316339346262343964393664313335636230316131303831
+36353262346466383038366535636530373432386664653337383639663135306538343864323430
+30393934356538306664393034353839396564616334363339396237333865353730643961653237
+33353930363738316332653933383863313338303635633865663030366536386262363934343132
+39303938653564316166366539333936613762346538323763336566323332656633336430643836
+62613366323666306231663663326430313066656562373134373133333237353233633038346164
+32316664373334633465626664386661373933333135663438393362656337666535656435313766
+61313034343333363130313364316366373866323534323164643662613133663431316234373230
+61366232396331353732373063613662653462323732633161386336663530386434346435613131
+61366264313136633731333737653431373264346666346265616535333432613265646631636264
+65303431633235326331303432653265323936633538653430363130393334383437653132356337
+34633532643932333065383735303735396463663161323530363330383330383265373164356365
+62633234353438623839346138316536653363613230643138333837666338323730343964363831
+61343930303266636337323038346334366263623237386639653234656362336533636361633339
+63313533316435383138383732313665643764626632623730373038363539623436343536393364
+62336463393534616439373463396230636564666538626537633530333536373637393239333136
+30383331396331373931343463393230343062383138363333666437613461633139323664313737
+30373138653539376632616364663932393237396439353132613739343634663437356431303264
+63353263653835663534303961356333323436386439353836393761616537326631666464373537
+32306437343464343165323039613534373830333161383434346636383833336534306133376166
+39336535393136316162666137323134333163356562346639333336313934323164623761633834
+63393665353831613666366164316366643663623533653233633239383433373866326335393362
+30613433633863353838613263336464373638333863633532656232646264386437333035336131
+30323963613735366265313063346434333639363738343365313835373438313365666162343131
+30373734393235643339613062333363313635373266656463376163356239353938
diff --git a/erp-playbook/local_scripts/check-for-changes.sh b/erp-playbook/local_scripts/check-for-changes.sh
index 5379148..b223fb2 100644..100755
--- a/erp-playbook/local_scripts/check-for-changes.sh
+++ b/erp-playbook/local_scripts/check-for-changes.sh
@@ -1,11 +1,29 @@
#!/bin/sh
-URLs=$(cat <<EOF
- http://repo.linaro.org/debian/erp-17.08-stable/dists/jessie/main/binary-arm64/Packages.bz2
- http://repo.linaro.org/debian/erp-17.08-staging/dists/jessie/main/binary-arm64/Packages.bz2
- http://repo.linaro.org/debian/erp-17.08-staging/dists/jessie/main/debian-installer/binary-arm64/Packages.gz
+BUILD_ENV=$1
+
+if [ "${BUILD_ENV}" != "staging" -a "${BUILD_ENV}" != "stable" ]; then
+ echo "Usage: $0 [staging|stable]"
+ exit 1
+fi
+
+if [ "${BUILD_ENV}" = "staging" ]; then
+ URLs=$(cat <<EOF
+ http://repo.linaro.org/debian/erp-17.08-stable/dists/jessie/main/binary-arm64/Packages.bz2
+ http://repo.linaro.org/debian/erp-17.08-staging/dists/jessie/main/binary-arm64/Packages.bz2
+ http://repo.linaro.org/debian/erp-17.08-staging/dists/jessie/main/debian-installer/binary-arm64/Packages.gz
+EOF
+ )
+elif [ "${BUILD_ENV}" = "stable" ]; then
+ URLs=$(cat <<EOF
+ http://repo.linaro.org/debian/erp-17.08-stable/dists/jessie/main/binary-arm64/Packages.bz2
+ http://repo.linaro.org/debian/erp-17.08-stable/dists/jessie/main/debian-installer/binary-arm64/Packages.gz
EOF
-)
+ )
+else
+ echo "ERROR: Unknown value ${BUILD_ENV}"
+ exit 1
+fi
RESULT=""
for url in $URLs; do
@@ -15,7 +33,7 @@ for url in $URLs; do
LAST_CHANGE=$(date -d "${LAST_CHANGE}" --iso-8601=seconds --utc)
if [ -n "${RESULT}" ]; then
- RESULT="${RESULT}\n"
+ RESULT="${RESULT}"$'\n'
fi
RESULT="${RESULT}${LAST_CHANGE}"
diff --git a/erp-playbook/main.yml b/erp-playbook/main.yml
index 8875666..23468d5 100644
--- a/erp-playbook/main.yml
+++ b/erp-playbook/main.yml
@@ -3,7 +3,7 @@
gather_facts: false
vars:
squad_environment: production
- debian_installer_environment: staging
+ erp_debian_installer_environment: stable
pre_tasks:
- set_fact: