This repository has been archived by the owner on Jan 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
/
ci_init.sh
executable file
·26 lines (20 loc) · 4.79 KB
/
ci_init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
mkdir -p ~/.ssh
chmod 700 ~/.ssh
# don't check host keys - the tests need to access repos over ssh, which would
# otherwise stall asking about the server's fingerprint
echo -e 'Host bitbucket.org\n\tStrictHostKeyChecking no\n' >> ~/.ssh/config
# We also need an account to access things on bitbucket (our test packages), so
# we have a dummy account with this public private key:
echo -e "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAwMFyShOW6SvfzQTTE4tuOfth74Xu5GseFZNmqk6aCz+mv7N+\nScswE50UBJJ7qORqw18rPsMjUIXZktfo5Ozwy4QLbTpJIPj+nLyOvHXvSof+KT2z\nV+CKeYEXt2RZ41QslPyo5aXl3I8wLIAScZgZUo+PH6U+0mM5cJD/FGWxlh7oCaLY\nCp6M+SjVEIyIH0CR0J7iT0ds6F7TPbnAqOuvxzVT31+NMRqOxWI36agoDP4wOmWl\n3oyHPmu0wlKIupong4agp1iDV6YwPZJCasMX8FE0IOYcvFKk8No1D2TP74+gAn3k\n7mIyJUWyPQy46RoF2hrDZkEk+TQA/cgROVwRLFV5IFKbM2mViMUhljJlq1glGPMq\nllThziVuzX52T9RUz2SCf2bsUp9K/qavX9VdkDAni0lQqPjE5JOd4GgVi9XCofjN\ng7NCrCKe6r3B9iIniot+znjDbWnQ8ZAM8WV0MwHaik2FQKrc+PnL0OQyx6u8veYX\nIyqYMnn6X/3HLl6nc0XkxRvUB1PgLuXAQOe9Ywz1cADTDqRwQ5hu2yG/9wMsw0A+\nrnkcJeJ6ezVaW2Ib0bNtxCYVsGMAMwud14Yk3SAF2WmsGygdvaPdlmFXi/npz7Ak\n7l+4s5wqRoOy4eOCKguSiW1POllrmIrj6KAO5DAR5h7/uoYPuquyadot8SUC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L+enPsCTuX7iznCpGg7Lh44IqC5KJbU86WWuYiuPooA7kMBHmHv+6hg+6q7Jp2i3xJQ== [email protected]" > ~/.ssh/id_rsa.pub
# make sure the keys have the right permissions
chmod 600 ~/.ssh/*
# need to be authed to pull from the registry, so stick a set of keys authed to
# the "yottatest" mbed user in ~/.yotta/config.json:
mkdir -p ~/.yotta
chmod 700 ~/.yotta
cp ./.yotta_test_config.json ~/.yotta/config.json
# set git settings
git config --global user.email "[email protected]"
git config --global user.name "Yotta CI Bot"