diff --git a/.github/workflows/push_docker_test_container.yaml b/.github/workflows/push_docker_test_container.yaml index a052b7f7..830101ec 100644 --- a/.github/workflows/push_docker_test_container.yaml +++ b/.github/workflows/push_docker_test_container.yaml @@ -16,12 +16,18 @@ jobs: with: fetch-depth: 0 submodules: 'recursive' + - name: Setup Python & Poetry Environment + uses: exasol/python-toolbox/.github/actions/python-environment@0.14.0 + with: + python-version: "3.10" + poetry-version: '1.8.2' + - name: Build TestContainer - run: ./exaslct build-test-container --force-rebuild + run: poetry run exaslct build-test-container --force-rebuild - name: Push TestContainer image if: ${{ (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/main') }} run: | - ./exaslct push-test-container --source-docker-username "$SECRET_DOCKER_USER_NAME" --target-docker-username "$SECRET_DOCKER_USER_NAME" --force-push true + poetry run exaslct push-test-container --source-docker-username "$SECRET_DOCKER_USER_NAME" --target-docker-username "$SECRET_DOCKER_USER_NAME" --force-push true env: # Set the secret as an input SECRET_DOCKER_USER_NAME: ${{ secrets.DOCKER_USER_NAME }} TARGET_DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }} @@ -29,7 +35,7 @@ jobs: - name: Push ci-release-test TestContainer image if: ${{ (github.ref != 'refs/heads/master') && (github.ref != 'refs/heads/main') }} run: | - ./exaslct push-test-container --source-docker-username "$SECRET_DOCKER_USER_NAME" --target-docker-username "$SECRET_DOCKER_USER_NAME" --force-push true --source-docker-tag-prefix ci_release_test --target-docker-tag-prefix ci_release_test + poetry run exaslct push-test-container --source-docker-username "$SECRET_DOCKER_USER_NAME" --target-docker-username "$SECRET_DOCKER_USER_NAME" --force-push true --source-docker-tag-prefix ci_release_test --target-docker-tag-prefix ci_release_test env: # Set the secret as an input SECRET_DOCKER_USER_NAME: ${{ secrets.DOCKER_USER_NAME }} TARGET_DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }} diff --git a/aws-code-build/build_config.json b/aws-code-build/build_config.json index 9c1e4fd6..90b812d2 100644 --- a/aws-code-build/build_config.json +++ b/aws-code-build/build_config.json @@ -4,7 +4,6 @@ "ignore": { "paths": [ ".github", - "config", "doc", "emulator", "githooks", diff --git a/config/.bcc.env b/config/.bcc.env deleted file mode 100644 index db0acebc..00000000 --- a/config/.bcc.env +++ /dev/null @@ -1,68 +0,0 @@ -export BASH_ENV="/usr/share/Modules/init/bash" -export BUILDSYSTEM_ALIAS="tk.params.-package=src" -export COLORTERM="truecolor" -export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/10303/bus" -export DESKTOP_SESSION="gnome-xorg" -export DISPLAY=":0" -export ENV="/usr/share/Modules/init/profile.sh" -export GDMSESSION="gnome-xorg" -export GDM_LANG="en_US.UTF-8" -export GJS_DEBUG_OUTPUT="stderr" -export GJS_DEBUG_TOPICS="JS ERROR;JS LOG" -export GNOME_TERMINAL_SCREEN="/org/gnome/Terminal/screen/fcc09306_7178_4ec8_8ab4_4571b7cfc0c1" -export GNOME_TERMINAL_SERVICE=":1.383136" -export GOROOT="/home/tk/.local/share/flatpak/runtime/org.freedesktop.Sdk.Extension.golang/x86_64/19.08/active/files" -export GUESTFISH_INIT="\\e[1;34m" -export GUESTFISH_OUTPUT="\\e[0m" -export GUESTFISH_PS1="\\[\\e[1;32m\\]>\\[\\e[0;31m\\] " -export GUESTFISH_RESTORE="\\e[0m" -export HISTCONTROL="ignoredups" -export HISTSIZE="1000" -export HOME="/home/tk" -export HOSTNAME="hw2703" -export KDEDIRS="/usr" -export KRB5CCNAME="KCM:" -export LANG="en_US.UTF-8" -export LESSOPEN="||/usr/bin/lesspipe.sh %s" -export LOADEDMODULES="" -export LOGNAME="tk" -export MAIL="/var/spool/mail/tk" -export MANPATH=":" -export MODULEPATH="/etc/scl/modulefiles:/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles" -export MODULEPATH_modshare="/usr/share/modulefiles:1:/usr/share/Modules/modulefiles:1:/etc/modulefiles:1" -export MODULESHOME="/usr/share/Modules" -export MODULES_CMD="/usr/share/Modules/libexec/modulecmd.tcl" -export MODULES_RUN_QUARANTINE="LD_LIBRARY_PATH" -export MOZ_DISABLE_WAYLAND="1" -export OLDPWD="/home/tk/projects/nosync/git.script-languages-release-0ef1e48e-64r/config" -export PATH="/home/tk/.local/buildsystem/bin/:/home/tk/bin:/home/tk/.local/buildsystem/bin/:/opt/local/bin:/usr/lib64/qt-3.3/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/tk/projects/ccc/bin" -export PWD="/home/tk/projects/nosync/git.script-languages-release-0ef1e48e-64r/config" -export QTDIR="/usr/lib64/qt-3.3" -export QTINC="/usr/lib64/qt-3.3/include" -export QTLIB="/usr/lib64/qt-3.3/lib" -export QT_IM_MODULE="ibus" -export SESSION_MANAGER="local/unix:@/tmp/.ICE-unix/3083,unix/unix:/tmp/.ICE-unix/3083" -export SHELL="/bin/bash" -export SHLVL="2" -export SSH_AGENT_PID="3101" -export SSH_AUTH_SOCK="/run/user/10303/keyring/ssh" -export TERM="xterm-256color" -export USER="tk" -export USERNAME="tk" -export VAULT_ADDR="https://vault.dev.exasol.com" -export VTE_VERSION="5604" -export WINDOWPATH="2" -export XAUTHORITY="/run/user/10303/gdm/Xauthority" -export XDG_CURRENT_DESKTOP="GNOME" -export XDG_DATA_DIRS="/home/tk/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/" -export XDG_MENU_PREFIX="gnome-" -export XDG_RUNTIME_DIR="/run/user/10303" -export XDG_SEAT="seat0" -export XDG_SESSION_CLASS="user" -export XDG_SESSION_DESKTOP="gnome-xorg" -export XDG_SESSION_ID="2" -export XDG_SESSION_TYPE="x11" -export XDG_VTNR="2" -export XMODIFIERS="@im=ibus" -export ZONE="" -export _="/usr/bin/env" diff --git a/config/README.md b/config/README.md deleted file mode 100644 index 764b1955..00000000 --- a/config/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Building Language Container using Exasol's Internal Build Tool - -``` -CCC_CONFIG=config/c4.yaml c4 make build - -``` - -For more options check the help with - -``` -CCC_CONFIG=config/c4.yaml c4 make help-more - -``` diff --git a/config/build-env b/config/build-env deleted file mode 100644 index 307ea279..00000000 --- a/config/build-env +++ /dev/null @@ -1,3 +0,0 @@ -[Environment] - -exaruntime = EXARuntime-7.1.0-dev2 diff --git a/config/c4.yaml b/config/c4.yaml deleted file mode 100644 index 4fc35706..00000000 --- a/config/c4.yaml +++ /dev/null @@ -1,25 +0,0 @@ -tele: - sync: - - --include=build/ - - --include=.bcc/ - - --include=.bcc/build - - --include=.bcc/build/* - - --include=.bcc/build/*/.bcc - dont_sync: - - --exclude=.build/ - - --exclude=.build.ccc - - --exclude=.ccc[.-]* - - --exclude=.bcc.env - - --exclude=.env.dump - - --exclude=.ninja_deps - - --exclude=.ninja_log - - --exclude=.sconsign.dblite - - --exclude=.sconf_temp - - --exclude=JDBC/bin/com/exasol/jdbc/version.res - - --exclude=.git/ - - --exclude=TAGS - - --exclude=*~ - - --exclude=*.old - - --exclude=*.bak - - --exclude=*.orig - - --exclude=*.swp diff --git a/config/ccc b/config/ccc deleted file mode 100644 index 5a6eb851..00000000 --- a/config/ccc +++ /dev/null @@ -1,196 +0,0 @@ -#!/usr/bin/env bash -set -ue - -FLAVORS=("standard-EXASOL-7.0.0" "standard-EXASOL-6.2.0" "standard-EXASOL-6.1.0" "python3-ds-EXASOL-6.1.0" "python3-ds-cuda-EXASOL-6.1.0" "r-3.5-data-science-EXASOL-6.1.0") -FLAVOR=standard-EXASOL-7.0.0 -MODE=FULL -EXASLCT_TMP="$HOME/exaslct-tmp" -EXASLCT_BASE_TMP="$EXASLCT_TMP/tmp" -EXASLCT_BUILD_OUTPUT="$EXASLCT_TMP/.build_output" -EXPORT_PATH="$BUILDSYSTEM_LINKDIR/export" -INSTALL_PATH="$BUILDSYSTEM_LINKDIR/install" - -## CMD Functions: Help -_cmd_help() -{ - cat < - - you can configure the build via special aliases - - WorkingCopy Alias Pattern: .params__(__) - Flavor Numbers: - -EOF - total=${#FLAVORS[*]} - for (( i=0; i<=$(( $total -1 )); i++ )) - do - echo " $i: ${FLAVORS[$i]}" - done -} - - -get_image_hash() -{ - RELEASE_INFO_PATH="$INSTALL_PATH/build_info/image_info/$FLAVOR-release" - if [ -e "$RELEASE_INFO_PATH" ] - then - cat "$RELEASE_INFO_PATH" | jq -r .hash | cut -c 1-8 - fi -} - -## CMD Functions: General C4 Query Commands - Not explicitly used by the user -_cmd_prefix() { - prepare_variables - if [ "$MODE" != "SRC" ] - then - HASH=$(get_image_hash) - HASH=${HASH:-NOHASH} - - PREFIX=/usr/opt/${EXASUITE}/ScriptLanguages-${FLAVOR}-${MODE}-${HASH} - echo "$PREFIX" - exit "$?" - else - PREFIX=/usr/opt/${EXASUITE}/ScriptLanguages-${FLAVOR}-${MODE} - echo "$PREFIX" - exit "$?" - fi -} - -_cmd_provides() { - echo script-language-${FLAVOR}-${MODE} -} - -_cmd_requires() { - echo -} - -prepare_variables() { - # TODO: TOOLCHAIN will be provided in CURRENTTOOLCHAIN and EXARUNTIME will be provided in CCC_BUILDENV_TOOLCHAIN when branch ic.config got merged - EXASUITE=EXASuite-7 - EXARUNTIME=$(cat ./config/build-env | sed -E "s/ +/ /g" | grep "exaruntime = " | cut -f 3 -d " ") - EXARUNTIME_PATH="$EXARUNTIME" - TOOLCHAIN="/usr/opt/${EXASUITE}/${EXARUNTIME_PATH}" - export PATH="$TOOLCHAIN/bin:$PATH" -} - -prepare_exaslct() { - c4 initialize wait docker - prepare_variables - mkdir -p "$EXASLCT_BASE_TMP" - mkdir -p "$EXASLCT_BUILD_OUTPUT" - "$CCC_CCC" extract -m "@${EXARUNTIME}" - EXASLCT_OPTIONS=(--temporary-base-directory "$EXASLCT_BASE_TMP" --output-directory "$EXASLCT_BUILD_OUTPUT") -} - -_cmd_build_container() { - echo _cmd_build_container $* - MODE="$1" - FLAVOR="$2" - prepare_exaslct - PIP_INSTALL=YES ./exaslct export --flavor-path="flavors/${FLAVOR}" --export-path "$EXPORT_PATH" "${EXASLCT_OPTIONS[@]}" - mkdir -p "$INSTALL_PATH" - for f in "$EXPORT_PATH/"*.gz - do - echo "Extracting $f" - tar xfC "$f" "$INSTALL_PATH" - done - cp config/pkg.sh "$BUILDSYSTEM_LINKDIR" # We need to copy the pkg.sh, because c4 sees it as part of the final package and you could have different pkg.sh for different build modes -} - -_cmd_build_src_package() { - echo "build_src_package" - mkdir -p "$INSTALL_PATH" \ - && cp exaudfclient/base/{debug_message.h,exaudfclient.cc,exaudflib/exaudflib.cc,exaudflib/exaudflib.h,exaudflib/zmqcontainer.proto} "$INSTALL_PATH"; -} - -_parse_alias_parameters() { - ALIAS_PARAMETERS=$(echo "$BUILDSYSTEM_ALIAS" | sed -E "s/.*\.params__(SRC|RELEASE|LIGHT|TEST)(__([0-9]+))?$/\1 \3/g") - FLAVOR_NUMBER=0 - if [ "$ALIAS_PARAMETERS" != "$BUILDSYSTEM_ALIAS" ] - then - MODE=$(echo "$ALIAS_PARAMETERS" | cut -f1 -d " ") - FLAVOR_NUMBER=$(echo "$ALIAS_PARAMETERS" | cut -f2 -d " ") - fi - if [ -n "$FLAVOR_NUMBER" ] - then - FLAVOR="${FLAVORS[$FLAVOR_NUMBER]}" - fi -} - -_cmd_build() { - mkdir -p "$BUILDSYSTEM_LINKDIR" - if [ -d .git ] && [ -e .ccc/c4_play_init ] - then - echo "Update submodule as workaround for missing recursive checkout" - git submodule update - fi - - if [ "$MODE" == "SRC" ] - then - _cmd_build_src_package - else - _cmd_build_container "$MODE" "$FLAVOR" - fi -} - -_cmd_clean() { - prepare_exaslct - echo "Cleaning" -# PIP_INSTALL=YES ./exaslct clean-flavor-images --flavor-path "flavors/${FLAVOR}" "${EXASLCT_OPTIONS[@]}" - rm -rf "$EXASLCT_TMP" - rm -rf "$INSTALL_PATH" - rm -rf "$EXPORT_PATH/"*.gz - rm -rf "$BUILDSYSTEM_LINKDIR" -} - -_cmd_test() { - prepare_exaslct - PIP_INSTALL=YES ./exaslct run-db-test --flavor-path "flavors/${FLAVOR}" "${EXASLCT_OPTIONS[@]}" -} - -_parse_alias_parameters -## Command Switch -if [ "$1" = prefix ]; then - _cmd_prefix -elif [ "$1" = build ]; then - shift 1 - remaining_args=( "$@" ) - if [ "$#" -ge 1 ]; then - current_arg="${remaining_args[0]}" - if [ -n "$current_arg" ] - then - MODE="$current_arg" - fi - fi - if [ "$#" -ge 2 ]; then - current_arg="${remaining_args[1]}" - if [ -n "$current_arg" ] - then - FLAVOR="$current_arg" - fi - fi - _cmd_build 2>&1 | tee c4-make.log -elif [ "$1" = "clean" ]; then - _cmd_clean -elif [ "$1" = provides ]; then - _cmd_provides -elif [ "$1" = requires ]; then - _cmd_requires -elif [ "$1" = test ]; then - shift - _cmd_test "$@" -elif [ "$1" = "help-more" ]; then # help is already in use by main c4 path - _cmd_help -else - _cmd_build 2>&1 | tee c4-make.log -fi diff --git a/config/docker-daemon.json b/config/docker-daemon.json deleted file mode 100644 index e8bd2008..00000000 --- a/config/docker-daemon.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "data-root": "/home/admin/docker-data" -} diff --git a/config/pkg.sh b/config/pkg.sh deleted file mode 100755 index fb13e18c..00000000 --- a/config/pkg.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -# -# this script implements packaging interface of the working copy -# it must implement at least three methods: -# -# * tar - stream the installation directory (DIR) -# of the working copy to stdout. -# The script must be called from the parent directory -# of the installation directory -# (used by `c4 upload`) -# -# * extract - extract fetched archive to the installation directory -# (used by `c4 fetch`) -# -# * methods - show the list of supported methods (one method per line) - -case "$1" in - extract) - OUTPUT_DIR=install - mkdir -p $OUTPUT_DIR - for i in *.tar.gz; do - tar xf "$i" -C "$OUTPUT_DIR" - done - ;; - tar) - tar c .pkg.sh install - ;; - methods) - echo "extract methods tar" | xargs -n1 echo - ;; - *) - echo "Usage: $0 extract|create|methods" - exit 1 - ;; -esac - diff --git a/doc/changes/changes_9.0.0.md b/doc/changes/changes_9.0.0.md index af556f11..707754cd 100644 --- a/doc/changes/changes_9.0.0.md +++ b/doc/changes/changes_9.0.0.md @@ -45,6 +45,7 @@ This release uses version 1.0.0 of the container tool. - #993: Added escape sequence for backslash in new Script Options parser - #1002: Use ECR fallback repository for Trivy caching - #958: Fix conda version conflict + - #1014: Fixed Push Docker Test Container workflow ## Doc