Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for incremental builds #303

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions 2.7/s2i/bin/assemble
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#!/bin/bash

if [ "$(ls -A /tmp/artifacts/ 2>/dev/null)" ]; then
echo "---> Restoring found build artifacts..."
cp -Rf /tmp/artifacts/. ./
rc=$?
if [ $rc -eq 0 ] && [ ! -z "${PYTHONUSERBASE}" ] && [ -d "$(dirname ${PYTHONUSERBASE})" ]; then
cp -Rf /tmp/artifacts/. $(dirname ${PYTHONUSERBASE})
else
ls -la $(dirname ${PYTHONUSERBASE})
fi
fi

function is_django_installed() {
python -c "import django" &>/dev/null
}
Expand Down
8 changes: 8 additions & 0 deletions 2.7/s2i/bin/save-artifacts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

if [ -d .local ]; then
tar cf - .local
elif [ ! -z "${PYTHONUSERBASE}" ] && [ -d "${PYTHONUSERBASE}" ]; then
cd $(dirname ${PYTHONUSERBASE})
tar cf - $(basename ${PYTHONUSERBASE})
fi
11 changes: 11 additions & 0 deletions 3.3/s2i/bin/assemble
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#!/bin/bash

if [ "$(ls -A /tmp/artifacts/ 2>/dev/null)" ]; then
echo "---> Restoring found build artifacts..."
cp -Rf /tmp/artifacts/. ./
rc=$?
if [ $rc -eq 0 ] && [ ! -z "${PYTHONUSERBASE}" ] && [ -d "$(dirname ${PYTHONUSERBASE})" ]; then
cp -Rf /tmp/artifacts/. $(dirname ${PYTHONUSERBASE})
else
ls -la $(dirname ${PYTHONUSERBASE})
fi
fi

function is_django_installed() {
python -c "import django" &>/dev/null
}
Expand Down
8 changes: 8 additions & 0 deletions 3.3/s2i/bin/save-artifacts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

if [ -d .local ]; then
tar cf - .local
elif [ ! -z "${PYTHONUSERBASE}" ] && [ -d "${PYTHONUSERBASE}" ]; then
cd $(dirname ${PYTHONUSERBASE})
tar cf - $(basename ${PYTHONUSERBASE})
fi
11 changes: 11 additions & 0 deletions 3.4/s2i/bin/assemble
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#!/bin/bash

if [ "$(ls -A /tmp/artifacts/ 2>/dev/null)" ]; then
echo "---> Restoring found build artifacts..."
cp -Rf /tmp/artifacts/. ./
rc=$?
if [ $rc -eq 0 ] && [ ! -z "${PYTHONUSERBASE}" ] && [ -d "$(dirname ${PYTHONUSERBASE})" ]; then
cp -Rf /tmp/artifacts/. $(dirname ${PYTHONUSERBASE})
else
ls -la $(dirname ${PYTHONUSERBASE})
fi
fi

function is_django_installed() {
python -c "import django" &>/dev/null
}
Expand Down
8 changes: 8 additions & 0 deletions 3.4/s2i/bin/save-artifacts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

if [ -d .local ]; then
tar cf - .local
elif [ ! -z "${PYTHONUSERBASE}" ] && [ -d "${PYTHONUSERBASE}" ]; then
cd $(dirname ${PYTHONUSERBASE})
tar cf - $(basename ${PYTHONUSERBASE})
fi
11 changes: 11 additions & 0 deletions 3.5/s2i/bin/assemble
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#!/bin/bash

if [ "$(ls -A /tmp/artifacts/ 2>/dev/null)" ]; then
echo "---> Restoring found build artifacts..."
cp -Rf /tmp/artifacts/. ./
rc=$?
if [ $rc -eq 0 ] && [ ! -z "${PYTHONUSERBASE}" ] && [ -d "$(dirname ${PYTHONUSERBASE})" ]; then
cp -Rf /tmp/artifacts/. $(dirname ${PYTHONUSERBASE})
else
ls -la $(dirname ${PYTHONUSERBASE})
fi
fi

function is_django_installed() {
python -c "import django" &>/dev/null
}
Expand Down
8 changes: 8 additions & 0 deletions 3.5/s2i/bin/save-artifacts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

if [ -d .local ]; then
tar cf - .local
elif [ ! -z "${PYTHONUSERBASE}" ] && [ -d "${PYTHONUSERBASE}" ]; then
cd $(dirname ${PYTHONUSERBASE})
tar cf - $(basename ${PYTHONUSERBASE})
fi
11 changes: 11 additions & 0 deletions 3.6/s2i/bin/assemble
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#!/bin/bash

if [ "$(ls -A /tmp/artifacts/ 2>/dev/null)" ]; then
echo "---> Restoring found build artifacts..."
cp -Rf /tmp/artifacts/. ./
rc=$?
if [ $rc -eq 0 ] && [ ! -z "${PYTHONUSERBASE}" ] && [ -d "$(dirname ${PYTHONUSERBASE})" ]; then
cp -Rf /tmp/artifacts/. $(dirname ${PYTHONUSERBASE})
else
ls -la $(dirname ${PYTHONUSERBASE})
fi
fi

function is_django_installed() {
python -c "import django" &>/dev/null
}
Expand Down
8 changes: 8 additions & 0 deletions 3.6/s2i/bin/save-artifacts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

if [ -d .local ]; then
tar cf - .local
elif [ ! -z "${PYTHONUSERBASE}" ] && [ -d "${PYTHONUSERBASE}" ]; then
cd $(dirname ${PYTHONUSERBASE})
tar cf - $(basename ${PYTHONUSERBASE})
fi