Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
180 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM fedora:24 | ||
|
||
MAINTAINER Lion Krischer | ||
|
||
# Can fail on occasion. | ||
RUN dnf -y upgrade || true | ||
RUN dnf install -y gcc redhat-rpm-config numpy scipy python-matplotlib python-sqlalchemy python-lxml python-mock python-basemap python-basemap-data python-tornado python-pip python-decorator python-requests python-future | ||
RUN pip install https://github.com/Damgaard/PyImgur/archive/9ebd8bed9b3d0ae2797950876f5c1e64a560f7d8.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
.../base_images/ubuntu_15_10_wily/Dockerfile → ...ase_images/ubuntu_16_04_xenial/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
FROM ubuntu:15.10 | ||
FROM ubuntu:16.04 | ||
|
||
MAINTAINER Lion Krischer | ||
|
||
# Can fail on occasion. | ||
RUN apt-get update && apt-get upgrade || true | ||
RUN apt-get -y install python-numpy python-scipy python-matplotlib python-sqlalchemy python-lxml python-mock python-mpltoolkits.basemap python-mpltoolkits.basemap-data python-pip python-tornado ttf-bitstream-vera | ||
RUN pip install flake8 future | ||
RUN pip install future | ||
RUN pip install https://github.com/Damgaard/PyImgur/archive/9ebd8bed9b3d0ae2797950876f5c1e64a560f7d8.zip |
47 changes: 47 additions & 0 deletions
47
misc/docker_tests/github_get_all_pr_heads_without_docker-testbot_status.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
mkdir -p logs | ||
LOG=logs/github_get_all_pr_heads_without_docker-testbot_status.log | ||
|
||
rm $LOG | ||
|
||
# get a list of commit hashes for open pull requests | ||
DATA=`curl --silent -H "Authorization: token ${OBSPY_COMMIT_STATUS_TOKEN}" --request GET 'https://api.github.com/repos/obspy/obspy/pulls?state=open&sort=updated&direction=desc&per_page=100'` | ||
echo $DATA >> $LOG | ||
echo "" >> $LOG | ||
# echo without quotes gets rid of line breaks, which makes regex simpler | ||
# than get rid of spaces and tabs with sed | ||
# than extract all matches with grep, one per line | ||
# ..assuming the following structure in the returned json: | ||
# ... | ||
# "statuses_url": "https://api.github.com/repos/obspy/obspy/statuses/dd58fbbc33a8d8ce6f1a76013a5daa9e4a7db72a", | ||
# "head": { | ||
# "label": "obspy:docker_rm_old_logs", | ||
# "ref": "docker_rm_old_logs", | ||
# "sha": "dd58fbbc33a8d8ce6f1a76013a5daa9e4a7db72a", | ||
# "user": { | ||
# "login": "obspy", | ||
# ... | ||
# finally extract the interesting parts with sed and regex | ||
COMMITS=`echo $DATA | sed 's#\s##g' | grep -s --only-matching --extended-regexp '"head":{"label":"[^"]*","ref":"[^"]*","sha":"[a-z0-9]{40}"' | sed 's#.*"label":"\([^:]*\):.*"sha":"\([a-z0-9]\{40\}\)"#\1:\2#'` | ||
echo $COMMITS >> $LOG | ||
echo "" >> $LOG | ||
|
||
# helper function to determine if given commit hash has a status with "docker-testbot" context or not | ||
# returns 0 if no such status exists, i.e. build needed | ||
# returns 1 if such status exists, i.e. no build needed | ||
commit_needs_build() { | ||
REPO_SHA=(${1//:/ }) | ||
SHA=${REPO_SHA[1]} | ||
curl --silent --show-error --no-buffer -H "Authorization: token ${OBSPY_COMMIT_STATUS_TOKEN}" --request GET "https://api.github.com/repos/obspy/obspy/commits/${SHA}/status" 2>> $LOG | grep -q -s '"context":[ ]*"docker-testbot"' >> $LOG 2>&1 | ||
if [ $? = 0 ]; then return 1; else return 0; fi | ||
} | ||
|
||
for COMMIT in $COMMITS | ||
do | ||
if commit_needs_build $COMMIT | ||
then | ||
echo $COMMIT | ||
echo $COMMIT >> $LOG | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters