Skip to content

Commit 9917a1f

Browse files
authored
From scratch CircleCI configuration script. (#1488)
* CircleCI direct deployment update for Python3 * Move pre-push test back * Minor cleanup, allow testing circleci-deploy branch * Don't run unittests during deploy job * Comment out master deploy for now
1 parent cfc9509 commit 9917a1f

18 files changed

+536
-362
lines changed

.circleci/config.yml

Lines changed: 81 additions & 353 deletions
Large diffs are not rendered by default.

.circleci/config.yml.old

Lines changed: 378 additions & 0 deletions
Large diffs are not rendered by default.

ci/activate_creds.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Does gcloud auth using the result.
66

77
echo $GCLOUD_CREDENTIALS | \
8-
openssl enc -d -aes-256-cbc -base64 -A -k $GCLOUD_CREDENTIALS_KEY \
8+
openssl enc -md md5 -d -aes-256-cbc -base64 -A -k $GCLOUD_CREDENTIALS_KEY \
99
> $1
1010

1111
gcloud auth activate-service-account --key-file $1

ci/deploy_app.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# Deploy application to GAE
3+
#
4+
source venv/bin/activate
5+
source /tmp/cloud-sdk/google-cloud-sdk/path.bash.inc
6+
export PYTHONPATH=$PYTHONPATH:`pwd`
7+
export GOOGLE_APPLICATION_CREDENTIALS=/home/circleci/gcloud-credentials.key
8+
./ci/activate_creds.sh ~/gcloud-credentials.key
9+
cd rdr_service
10+
python -m tools app-engine --project $1 deploy --deploy-as circleci --quiet

ci/install_google_sdk.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# Install the Google Cloud SDK
3+
#
4+
curl -o /tmp/cloud-sdk.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-272.0.0-linux-x86_64.tar.gz
5+
mkdir /tmp/cloud-sdk
6+
tar -xf /tmp/cloud-sdk.tar.gz --directory /tmp/cloud-sdk
7+
cd /tmp/cloud-sdk/google-cloud-sdk
8+
./install.sh -q --additional-components cloud_sql_proxy core gsutil app-engine-python app-engine-python-extras bq
9+
source /tmp/cloud-sdk/google-cloud-sdk/path.bash.inc
10+
gcloud components list

ci/install_mysql.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Install and configure mysql
3+
#
4+
export DEBIAN_FRONTEND=noninteractive
5+
sudo apt-get update
6+
sudo apt-get -y install lsb-release
7+
mkdir ~/tmp_mysql && cd ~/tmp_mysql/
8+
curl -LO https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb
9+
sudo debconf-set-selections <<< 'mysql-apt-config mysql-apt-config/select-preview select '
10+
sudo debconf-set-selections <<< 'mysql-apt-config mysql-apt-config/select-product select Ok'
11+
sudo debconf-set-selections <<< 'mysql-apt-config mysql-apt-config/select-server select mysql-5.7'
12+
sudo debconf-set-selections <<< 'mysql-apt-config mysql-apt-config/select-tools select '
13+
sudo debconf-set-selections <<< 'mysql-apt-config mysql-apt-config/unsupported-platform select abort'
14+
dpkg -c mysql-apt-config_0.8.14-1_all.deb
15+
sudo -E dpkg -i mysql-apt-config_0.8.14-1_all.deb
16+
sudo apt-get update
17+
sudo debconf-set-selections <<< "mysql-community-server mysql-community-server/root-pass password root"
18+
sudo debconf-set-selections <<< "mysql-community-server mysql-community-server/re-root-pass password root"
19+
sudo -E apt-get -y install mysql-community-server
20+
sudo chmod 660 /var/log/mysql/error.log
21+
sudo chmod 750 /var/log/mysql
22+
sudo chmod 775 /var/log
23+
sudo chmod 755 /var
24+
export MYSQL_ROOT_PASSWORD=root
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)