Skip to content
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
29 changes: 29 additions & 0 deletions .github/workflows/check_setup_py.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check packaging is up to date

on: [push, pull_request]

jobs:
check_setup_py:
strategy:
fail-fast: false
matrix:
python-version: [3.6]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: 1.1.6
- name: Run packaging update
run: bash githooks/update_packaging.sh
- name: Show changes on working copy
run: git status --porcelain=v1 -uno
- name: Show diff on working copy
run: git diff --cached
- name: Check if something changed after running the update script
run: |
[ -z "$(git status --porcelain=v1 -uno 2>/dev/null)" ]
56 changes: 56 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI

on: [push, pull_request]

jobs:
test-docker-starter:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Test ./exaslct
run: ./exaslct --help

test-all:
strategy:
fail-fast: false
matrix:
exasol_version:
- "default"
python_version:
- 3.6
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Python 3.6 for integration-test-docker-environment
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install Poetry
uses: abatilo/actions-poetry@v2.0.0

- name: Run all tests
run: ./run_all_tests.sh

- name: Test ./exaslct-with-poetry
run: ./exaslct-with-poetry --help

# publish:
# if: github.ref == 'refs/heads/main'
# runs-on: ubuntu-latest
# environment: publish
# steps:
# - uses: actions/checkout@v2
# - name: Build new Docker image
# run: bash build_docker_runner_image.sh
# - name: Docker login
# run: echo "$SECRET_DOCKER_TOKEN" | docker login --username "$SECRET_DOCKER_USER_NAME" --password-stdin
# env: # Set the secret as an input
# SECRET_DOCKER_USER_NAME: ${{ secrets.DOCKER_USER_NAME }}
# SECRET_DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
# - name: Push new Docker image
# run: bash push_docker_runner_image.sh
#
19 changes: 16 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*.pyc
*.pyo
*.pyd
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
/build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
/lib/
lib64/
parts/
sdist/
Expand Down Expand Up @@ -127,3 +129,14 @@ dmypy.json

# Pyre type checker
.pyre/

# Vagrant
.vagrant

# Jetbrains
.idea/


# Project
.build_output/

26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM ubuntu:18.04

COPY ext/01_nodoc /etc/dpkg/dpkg.cfg.d/01_nodoc

RUN apt-get -y update && \
apt-get -y install --no-install-recommends\
ca-certificates \
locales \
python3-wheel \
python3-setuptools \
git \
bash \
curl && \
locale-gen en_US.UTF-8 && \
update-locale LC_ALL=en_US.UTF-8 && \
apt-get -y clean && \
apt-get -y autoremove && \
ldconfig

RUN curl https://bootstrap.pypa.io/get-pip.py | python3

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
COPY . /script-languages-container-tool
WORKDIR /script-languages-container-tool
RUN python3 -m pip install .
Empty file added README.md
Empty file.
9 changes: 9 additions & 0 deletions build_docker_runner_image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -euo pipefail

SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"

IMAGE_NAME="$($SCRIPT_DIR/construct_docker_runner_image_name.sh)"

docker build -t $IMAGE_NAME .
14 changes: 14 additions & 0 deletions construct_docker_runner_image_name.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -euo pipefail

SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"

if [ -z "${1-}" ]
then
VERSION="$(git rev-parse HEAD || echo latest)"
else
VERSION="$1"
fi

echo "exasol/script-languages:container-tool-runner-$VERSION"
Loading