Merge branch 'master' into feature/ch132964/sync-api-keys-both-in-on-prem-and-associated-fix-specs-3
commit
29df9dcd9e
@ -1 +1 @@
|
||||
Subproject commit 0d530a06c2998c9ecaaae2236639c4f7d654de27
|
||||
Subproject commit d0e6e878514c1df283c2ee07c5d1d3bb03722142
|
@ -1,97 +0,0 @@
|
||||
steps:
|
||||
|
||||
# Cancel previous job on the same branch
|
||||
- name: gcr.io/cloud-builders/gcloud
|
||||
entrypoint: /bin/bash
|
||||
args:
|
||||
- '-c'
|
||||
- 'gcloud builds list --ongoing --filter="buildTriggerId=056221c7-f5ef-4857-9706-3bc1054799a3 AND substitutions.BRANCH_NAME=${BRANCH_NAME} AND id!=${BUILD_ID}" --format="get(ID)" > jobs_to_cancel'
|
||||
|
||||
- name: gcr.io/cloud-builders/gcloud
|
||||
entrypoint: /bin/bash
|
||||
args:
|
||||
- '-c'
|
||||
- 'gcloud builds cancel $(cat jobs_to_cancel | xargs) || true'
|
||||
|
||||
# Decrypt github key
|
||||
- name: gcr.io/cloud-builders/gcloud
|
||||
args:
|
||||
- kms
|
||||
- decrypt
|
||||
- --ciphertext-file=script/ci/.id_github_cartofante.enc
|
||||
- --plaintext-file=/root/.ssh/id_rsa
|
||||
- --location=global
|
||||
- --keyring=keyring-github-ci
|
||||
- --key=github-key
|
||||
volumes:
|
||||
- name: 'ssh'
|
||||
path: /root/.ssh
|
||||
|
||||
# Set up git with key and domain
|
||||
- name: 'gcr.io/cloud-builders/git'
|
||||
entrypoint: 'bash'
|
||||
args:
|
||||
- '-c'
|
||||
- |
|
||||
chmod 600 /root/.ssh/id_rsa
|
||||
cat <<EOF >/root/.ssh/config
|
||||
Hostname github.com
|
||||
IdentityFile /root/.ssh/id_rsa
|
||||
EOF
|
||||
mv script/ci/known_hosts /root/.ssh/known_hosts
|
||||
volumes:
|
||||
- name: 'ssh'
|
||||
path: /root/.ssh
|
||||
|
||||
# Clean working directory
|
||||
- name: alpine
|
||||
args: ['sh', '-c', 'rm -rf .* | true && rm -rf *']
|
||||
|
||||
# Checkout repo with submodules
|
||||
- name: 'gcr.io/cloud-builders/git'
|
||||
entrypoint: 'sh'
|
||||
args: ['-c', 'git clone git@github.com:CartoDB/cartodb -b "${BRANCH_NAME}" --depth 1 --recursive .']
|
||||
volumes:
|
||||
- name: 'ssh'
|
||||
path: /root/.ssh
|
||||
|
||||
# Copy files to the right directories to run the tests
|
||||
- name: ubuntu
|
||||
entrypoint: /bin/bash
|
||||
args:
|
||||
- -c
|
||||
- |
|
||||
cp private/script/ci/* .
|
||||
cp private/Dockerfile .
|
||||
cp script/ci/* .
|
||||
cp config/app_config.yml.sample config/app_config.yml
|
||||
cp config/database.yml.sample config/database.yml
|
||||
cp lib/assets/javascripts/cdb/secrets.example.json lib/assets/javascripts/cdb/secrets.json
|
||||
|
||||
- name: gcr.io/cloud-builders/docker
|
||||
entrypoint: /bin/bash
|
||||
args:
|
||||
- -cx
|
||||
- |
|
||||
docker pull gcr.io/cartodb-on-gcp-main-artifacts/builder:${_BRANCH_TAG}
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
docker pull gcr.io/cartodb-on-gcp-main-artifacts/builder:latest
|
||||
docker tag gcr.io/cartodb-on-gcp-main-artifacts/builder:latest gcr.io/cartodb-on-gcp-main-artifacts/builder:${_BRANCH_TAG}
|
||||
fi
|
||||
docker build --build-arg COMPILE_ASSETS=false --build-arg BUNDLE_JOBS=16 -t gcr.io/cartodb-on-gcp-main-artifacts/builder:current -t gcr.io/cartodb-on-gcp-main-artifacts/builder:${_BRANCH_TAG} -t gcr.io/cartodb-on-gcp-main-artifacts/builder:${SHORT_SHA} -t gcr.io/cartodb-on-gcp-main-artifacts/builder:${_BRANCH_TAG}--${SHORT_SHA} --cache-from gcr.io/cartodb-on-gcp-main-artifacts/builder:${_BRANCH_TAG} .
|
||||
|
||||
# Run tests
|
||||
- name: 'docker/compose:1.22.0'
|
||||
args: ['-f', 'docker-compose-pg11.yml', 'up', '--build', '-d']
|
||||
timeout: 900s
|
||||
|
||||
- name: gcr.io/cloud-builders/docker
|
||||
args: ['exec', '-i', 'builder_1', 'bash', '-c', '/cartodb/runParallelTests.sh 24' ]
|
||||
timeout: 2700s
|
||||
|
||||
substitutions:
|
||||
_BRANCH_TAG: ${BRANCH_NAME//\//-}
|
||||
options:
|
||||
machineType: 'N1_HIGHCPU_32'
|
||||
timeout: 3600s
|
Loading…
Reference in new issue