Skip to content

Commit

Permalink
Added release buildspecs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomuben committed May 5, 2022
1 parent fda98cf commit 361b268
Show file tree
Hide file tree
Showing 7 changed files with 337 additions and 24 deletions.
16 changes: 8 additions & 8 deletions aws-code-build/ci/buildspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@ version: 0.2
batch:
fast-fail: false
build-graph:
- identifier: build_python_37_minimal_EXASOL_620
- identifier: build_python_36_data_science_cuda_EXASOL_620
env:
variables:
FLAVOR: python-3.7-minimal-EXASOL-6.2.0
FLAVOR: python-3.6-data-science-cuda-EXASOL-6.2.0
buildspec: ./aws-code-build/ci/build_buildspec.yaml
privileged-mode: true
type: BUILD_GENERAL1_MEDIUM
- identifier: build_python_36_data_science_cuda_EXASOL_620
- identifier: build_python_36_minimal_EXASOL_620
env:
variables:
FLAVOR: python-3.6-data-science-cuda-EXASOL-6.2.0
FLAVOR: python-3.6-minimal-EXASOL-6.2.0
buildspec: ./aws-code-build/ci/build_buildspec.yaml
privileged-mode: true
type: BUILD_GENERAL1_MEDIUM
- identifier: build_python_38_minimal_EXASOL_620
- identifier: build_python_37_minimal_EXASOL_620
env:
variables:
FLAVOR: python-3.8-minimal-EXASOL-6.2.0
FLAVOR: python-3.7-minimal-EXASOL-6.2.0
buildspec: ./aws-code-build/ci/build_buildspec.yaml
privileged-mode: true
type: BUILD_GENERAL1_MEDIUM
- identifier: build_python_36_minimal_EXASOL_620
- identifier: build_python_38_minimal_EXASOL_620
env:
variables:
FLAVOR: python-3.6-minimal-EXASOL-6.2.0
FLAVOR: python-3.8-minimal-EXASOL-6.2.0
buildspec: ./aws-code-build/ci/build_buildspec.yaml
privileged-mode: true
type: BUILD_GENERAL1_MEDIUM
40 changes: 40 additions & 0 deletions aws-code-build/release/build_buildspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: 0.2

# ---- AUTOMATICALLY GENERATED FILE --------
# ---- DO NOT EDIT MANUALLY, BUT USE PYTHON MODULE "script-languages-container-ci-setup" TO UPDATE ---
env:
shell: bash
variables:
RELEASE_DOCKER_REPOSITORY: "exasol/script-language-container"
UPLOAD_URL: ""
DRY_RUN: "--no-dry-run"


secrets-manager:
DOCKER_USER: "Dockerhub:User"
DOCKER_PASSWORD: "Dockerhub:AccessToken"
phases:

install:
runtime-versions:
python: 3.8
commands:
- git submodule update --init --recursive
- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -
- export PATH=$PATH:$HOME/.poetry/bin
- poetry env use $(command -v "python3.8")
- poetry install

pre_build:
commands:
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USER" --password-stdin
build:
commands:
- poetry run python3 -m exasol_script_languages_container_ci.main run-release --flavor $FLAVOR --docker-user "$DOCKER_USER" --docker-password "$DOCKER_PASSWORD" --docker-release-repository "$RELEASE_DOCKER_REPOSITORY" --upload-url "$UPLOAD_URL" "$DRY_RUN" --config-file aws-code-build/build_config.json

artifacts:
files:
- 'jobs/**/*'
name: release_build_output_$(date +%Y-%m-%d-%Hh-%Mm-%Ss)
base-directory: .build_output
s3-prefix: flavor_$FLAVOR
36 changes: 36 additions & 0 deletions aws-code-build/release/buildspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: 0.2

# ---- AUTOMATICALLY GENERATED FILE --------
# ---- DO NOT EDIT MANUALLY, BUT USE PYTHON MODULE "script-languages-container-ci-setup" TO UPDATE ---

batch:
fast-fail: false
build-graph:
- identifier: build_python_38_minimal_EXASOL_620
env:
variables:
FLAVOR: python-3.8-minimal-EXASOL-6.2.0
buildspec: ./aws-code-build/release/build_buildspec.yaml
privileged-mode: true
type: BUILD_GENERAL1_MEDIUM
- identifier: build_python_36_minimal_EXASOL_620
env:
variables:
FLAVOR: python-3.6-minimal-EXASOL-6.2.0
buildspec: ./aws-code-build/release/build_buildspec.yaml
privileged-mode: true
type: BUILD_GENERAL1_MEDIUM
- identifier: build_python_36_data_science_cuda_EXASOL_620
env:
variables:
FLAVOR: python-3.6-data-science-cuda-EXASOL-6.2.0
buildspec: ./aws-code-build/release/build_buildspec.yaml
privileged-mode: true
type: BUILD_GENERAL1_MEDIUM
- identifier: build_python_37_minimal_EXASOL_620
env:
variables:
FLAVOR: python-3.7-minimal-EXASOL-6.2.0
buildspec: ./aws-code-build/release/build_buildspec.yaml
privileged-mode: true
type: BUILD_GENERAL1_MEDIUM
3 changes: 2 additions & 1 deletion aws-code-build/update_aws_build_stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
ROOT_DIR="$SCRIPT_DIR/.."

pushd $ROOT_DIR > /dev/null
poetry run python3 -m exasol_script_languages_container_ci_setup.main deploy-ci-build --aws-profile "$AWS_PROFILE" --log-level info --project ScriptLanguages --project-url "https://github.com/exasol/script-languages"
#poetry run python3 -m exasol_script_languages_container_ci_setup.main deploy-ci-build --aws-profile "$AWS_PROFILE" --log-level info --project ScriptLanguages --project-url "https://github.com/exasol/script-languages"
poetry run python3 -m exasol_script_languages_container_ci_setup.main deploy-release-build --aws-profile "$AWS_PROFILE" --log-level info --project ScriptLanguages --project-url "https://github.com/exasol/script-languages"

popd > /dev/null

2 changes: 2 additions & 0 deletions githooks/update_aws_buildspec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ ROOT_DIR="$SCRIPT_DIR/.."

pushd $ROOT_DIR > /dev/null
poetry run python -m exasol_script_languages_container_ci_setup.main generate-buildspecs --flavor-root-path "$ROOT_DIR/flavors" --config-file aws-code-build/build_config.json
poetry run python -m exasol_script_languages_container_ci_setup.main generate-release-buildspecs --flavor-root-path "$ROOT_DIR/flavors" --config-file aws-code-build/build_config.json

git add "aws-code-build/ci"
git add "aws-code-build/release"

popd > /dev/null

Loading

0 comments on commit 361b268

Please sign in to comment.