Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ci: get docker merge passing; fixes #283 #285

Merged
merged 1 commit into from
Jul 19, 2024
Merged
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ charts/
# Prevent copying scripts that are unused in docker
scripts/
!scripts/test.sh
!scripts/activate-venv.sh
!scripts/install-build-tools.sh
!scripts/setup-dependencies.sh
!scripts/test-transaction.sh
Expand Down
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ ARG BASE_IMAGE="ghcr.io/mit-dci/opencbdc-tx-base:latest"
FROM $IMAGE_VERSION AS base

# set non-interactive shell
ENV DEBIAN_FRONTEND noninteractive
ENV CMAKE_BUILD_TYPE Release
ENV BUILD_RELEASE 1
ENV DEBIAN_FRONTEND=noninteractive
ENV CMAKE_BUILD_TYPE=Release
ENV BUILD_RELEASE=1
HalosGhost marked this conversation as resolved.
Show resolved Hide resolved

RUN mkdir -p /opt/tx-processor/scripts

COPY requirements.txt /opt/tx-processor/requirements.txt
COPY scripts/activate-venv.sh /opt/tx-processor/scripts/activate-venv.sh
COPY scripts/install-build-tools.sh /opt/tx-processor/scripts/install-build-tools.sh
COPY scripts/setup-dependencies.sh /opt/tx-processor/scripts/setup-dependencies.sh

Expand Down
2 changes: 1 addition & 1 deletion scripts/build-docker.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
rockett-m marked this conversation as resolved.
Show resolved Hide resolved

#!/bin/bash
set -e

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
Expand Down
11 changes: 8 additions & 3 deletions scripts/install-build-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ create_venv_install_python() {
if rm -rf -- "${ENV_LOCATION}"; then
echo "Removed existing virtual environment"
else
echo "Failed to remove existing virtual environment"; exit 1
echo "Failed to remove existing virtual environment"
exit 1
fi
fi
# install pip for linux
Expand Down Expand Up @@ -82,10 +83,14 @@ create_venv_install_python() {
if "${PY_LOC}" -m venv "${ENV_NAME}"; then
echo "Virtual environment '${ENV_NAME}' created"
else
echo "Virtual environment creation failed"; exit 1
echo "Virtual environment creation failed"
exit 1
fi
# activate virtual environment
source "${ROOT}/scripts/activate-venv.sh"
if ! . "${ROOT}/scripts/activate-venv.sh"; then
echo "Failed to activate virtual environment"
exit 1
fi
# install python packages
if pip install -r "${ROOT}/requirements.txt"; then
echo "Success installing python packages"
Expand Down
Loading