Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
bb.org: dbdeployer ci test
- Loading branch information
1 parent
f810eb6
commit 471e248
Showing
3 changed files
with
119 additions
and
1 deletion.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
buildbot.mariadb.org/dockerfiles/eco-dbdeployer-ubuntu-2004.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 |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| FROM ubuntu:20.04 | ||
|
|
||
| LABEL maintainer="MariaDB Buildbot maintainers" | ||
|
|
||
| ARG DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| RUN apt-get update \ | ||
| && apt-get upgrade -y \ | ||
| && apt-get install -y make sudo curl libsnappy1v5 libaio1 vim-tiny perl-modules libnuma1 binutils \ | ||
| xz-utils wget less net-tools lsof libreadline5 python3-pip \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Create buildbot user | ||
| RUN useradd -ms /bin/bash buildbot && \ | ||
| mkdir -p /buildbot && \ | ||
| chown -R buildbot /buildbot /usr/local && \ | ||
| curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac | ||
|
|
||
| VOLUME /dbdeployer | ||
|
|
||
| WORKDIR /buildbot | ||
|
|
||
| # Upgrade pip and install packages | ||
| RUN pip3 install -U pip virtualenv | ||
| RUN pip3 install buildbot-worker && \ | ||
| pip3 --no-cache-dir install 'twisted[tls]' | ||
|
|
||
| RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_$(dpkg --print-architecture).deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb | ||
|
|
||
| USER buildbot | ||
| ENV USER=buildbot | ||
| ENV HOME=/buildbot | ||
|
|
||
| CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] | ||
|
|
34 changes: 34 additions & 0 deletions
34
buildbot.mariadb.org/dockerfiles/ecofiles/test-dbdeployer.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,34 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -xeuvo pipefail | ||
|
|
||
| if [ $# -lt 2 ] | ||
| then | ||
| echo "insufficent arguments - two arguments minimum expected" | ||
| exit 1 | ||
| fi | ||
|
|
||
|
|
||
| # Asset ID for download: | ||
| # curl -L -s -H 'Accept: application/vnd.github.v3+json' https://api.github.com/repos/datacharmer/dbdeployer/releases/latest | grep -B 4 linux.tar.gz\" | ||
| case "${1}" in | ||
| dbdeployerfetch) | ||
| f=dbdeployer-"${2}".linux | ||
| [ ! -f "/dbdeployer/$f" ] || \ | ||
| curl -L -s -H 'Accept: application/octet-stream' https://api.github.com/repos/datacharmer/dbdeployer/releases/assets/"${2}" \ | ||
| | tar -zxf - -C /dbdeployer | ||
| ln -s /dbdeployer/dbdeployer-${2}.linux dbeployer | ||
| ;; | ||
| init) | ||
| mkdir /tmp/opt | ||
| ./dbdeployer init --skip-all-downloads --skip-shell-completion --sandbox-home=/tmp/sandboxes --sandbox-binary=/tmp/opt | ||
| file=/tmp/$(basename "${2}") | ||
| [ -f "$file" ] || curl --output "${file}" "$2" | ||
| ./dbdeployer unpack --prefix=ma "${file}" | ||
| rm "${file}" | ||
| ;; | ||
| *) | ||
| ./dbdeployer $@ | ||
| ;; | ||
| esac | ||
|
|
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