~jelmer/byoci/brz-git-tests

« back to all changes in this revision

Viewing changes to testing/seed-launchpad

  • Committer: Vincent Ladeuil
  • Date: 2018-02-20 17:25:56 UTC
  • mfrom: (158.1.6 lp-tests)
  • Revision ID: v.ladeuil+lp@free.fr-20180220172556-3ixv0oox23v1r1ig
Make launchpad tests pass (again) against production, on slave as well as host.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
 
 
3
# Seed trunks on launchpad for the test project.
 
4
 
 
5
# This needs to happen only once but is simple enough to automate.
 
6
 
 
7
# Note to maintainers : The qastaging fqdns in the README below are unlikely
 
8
# to change but keep them up to date for documentation purposes ;)
 
9
 
 
10
 
 
11
TEST_PROJECT=${1:-byoci-test-project}
 
12
# FIXME: This should be ~byoci-{devs,testers} or something -- vila 2018-02-20
 
13
TEST_TEAM=${2:-brz}
 
14
 
 
15
BZR_DIR=$(mktemp -d /tmp/branch-bzr.XXXXXXXX)
 
16
cd $BZR_DIR
 
17
 
 
18
bzr init .
 
19
cat <<"EOR" > README
 
20
A bzr branch for $TEST_PROJECT on bazaar.launchpad.net (and/or
 
21
bazaar.qastaging.launchpad.net if needed)
 
22
EOR
 
23
 
 
24
bzr add README
 
25
bzr commit -m "README seeding $TEST_PROJECT"
 
26
bzr push lp:~$TEST_TEAM/$TEST_PROJECT/trunk
 
27
rm -fr $BZR_DIR
 
28
 
 
29
GIT_DIR=$(mktemp -d /tmp/branch-git.XXXXXXXX)
 
30
cd $GIT_DIR
 
31
 
 
32
git init .
 
33
cat <<"EOR" > README
 
34
A git branch for $TEST_PROJECT on git.launchpad.net (and/or
 
35
git.qastaging.paddev.net if needed)
 
36
EOR
 
37
 
 
38
git add README
 
39
git commit -m "README seeding $TEST_PROJECT"
 
40
git push lp:~$TEST_TEAM/$TEST_PROJECT/+git/master master
 
41
rm -fr $GIT_DIR
 
42