Merge pull request #45 from sbidoul/download-instead-of-clone

Download github commit instead of cloning
This commit is contained in:
Stéphane Bidoul 2022-02-18 18:54:20 +01:00 committed by GitHub
commit 7cb0b3fce1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View file

@ -41,7 +41,7 @@ configMapGenerator:
literals:
- PGDATABASE={{ build_name }}
- ADDONS_DIR=/mnt/data/odoo-addons-dir
- RUNBOAT_GIT_REPO=https://github.com/{{ commit_info.repo }}
- RUNBOAT_GIT_REPO={{ commit_info.repo }}
- RUNBOAT_GIT_REF={{ commit_info.git_commit }}
{%- for key, value in build_env.items() %}
- {{ key }}={{ value }}

View file

@ -1,6 +1,6 @@
#!/bin/bash
set -ex
set -exo pipefail
# Remove initialization sentinel, in case we are reinitializing.
rm -fr /mnt/data/initialized
@ -8,11 +8,10 @@ rm -fr /mnt/data/initialized
# Remove addons dir, in case we are reinitializing after a previously
# failed installation.
rm -fr $ADDONS_DIR
# Clone the repository at git reference into $ADDONS_DIR.
git clone --quiet --filter=blob:none $RUNBOAT_GIT_REPO $ADDONS_DIR
# Download the repository at git reference into $ADDONS_DIR.
mkdir -p $ADDONS_DIR
cd $ADDONS_DIR
git fetch origin $RUNBOAT_GIT_REF:build
git checkout build
curl -sSL https://github.com/${RUNBOAT_GIT_REPO}/tarball/${RUNBOAT_GIT_REF} | tar zxf - --strip-components=1
# Install.
INSTALL_METHOD=${INSTALL_METHOD:-oca_install_addons}

View file

@ -37,7 +37,7 @@ configMapGenerator:
literals:
- PGDATABASE=build-name
- ADDONS_DIR=/mnt/data/odoo-addons-dir
- RUNBOAT_GIT_REPO=https://github.com/oca/mis-builder
- RUNBOAT_GIT_REPO=oca/mis-builder
- RUNBOAT_GIT_REF=abcdef123456789
- name: runboat-scripts
files: