Skip to content
Snippets Groups Projects
Commit 4b33eb0b authored by František Řezníček's avatar František Řezníček
Browse files

feat: improve CI pipeline

parent cb1068e6
No related branches found
No related tags found
No related merge requests found
Pipeline #435665 passed
......@@ -14,6 +14,10 @@ before_script:
- export GENERAL_VERSIONS="$(ci/general-versions.sh ${VERSION} latest)"
- cd ci/toolset-container
after_script: &container-images-list
- echo "Pushed container images are:"
- awk '{print " " $0}' container-release.uri
# build and release container image
# ---------------------------------------------------------------------------
build-image:
......
......@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [1.3.0] - 2024-04-29
### Changed
- new container tag
- CI display all tags
## [1.2.0] - 2024-04-29
### Changed
- container automation added (entrypoint)
......
......@@ -14,7 +14,7 @@ SCRIPT_DIR=$(dirname $(readlink -f $0))
source "${SCRIPT_DIR}/ci/toolset-container/lib.sh.inc"
CONTAINER_RUNTIME_EXE=$(get_container_engine)
CONTAINER_IMAGE="${CONTAINER_IMAGE:-"registry.gitlab.ics.muni.cz:443/cloud/terraform/modules/dask-distributed-2t-infra:v1"}"
CONTAINER_IMAGE="${CONTAINER_IMAGE:-"registry.gitlab.ics.muni.cz:443/cloud/terraform/modules/dask-distributed-2t-infra:1"}"
REPO_NAME=dask-distributed-2t-infra
if [[ "${OPERATION}" =~ ^(shell|cloud-connect|infra-deploy|infra-destroy)$ ]]; then
......
#!/usr/bin/env bash
# e-INFRA CZ G2 openstack terraform demo - personal/group project
# Usage: terraform-demo.sh <cloud-environment-name>
SCRIPT_DIR=$(dirname $(readlink -f $0))
#############################################################################
# variables
#############################################################################
CLOUD_ENV_NAME="$1"
export CLOUD_ENV_NAME
#############################################################################
# functions
#############################################################################
source ${SCRIPT_DIR}/../../lib.sh.inc
#############################################################################
# main steps
#############################################################################
log_section "Using commandline tools:"
./terraform.sh validate-tools
log_section "Detect cloud (${CLOUD_ENV_NAME} requested):"
./terraform.sh detect-cloud
log_section "Detect project:"
./terraform.sh detect-project
log_section "Initialize the terraform environment:"
./terraform.sh init
log_section "Validate the terraform environment:"
./terraform.sh validate
log_section "Perform terraform environment planning:"
./terraform.sh plan --out plan
log_section "Apply previously performed terraform plan i.e. create IaaS infrastructure:"
./terraform.sh apply plan
log_section "Destroy previously created IaaS infrastructure:"
./terraform.sh destroy
#!/usr/bin/env bash
# terraform wrapper for automatic personal/group project reconfiguration
# terraform.sh <arguments>
#
# <arguments> are:
# * detect-cloud
# * detect-project
# * validate-tools
# * clean-up-metadata-and-state-files
# * ... or any valid terraform arguments
# variables
TERRAFORM="terraform"
SCRIPT_DIR=$(dirname $(readlink -f $0))
# functions
source ${SCRIPT_DIR}/../../lib.sh.inc
if [[ "$1" =~ (detect-(cloud|project)|validate-tools|clean-up-metadata-and-state-files) ]]; then
if [ "$1" == "detect-cloud" ]; then
log "Using OpenStack cloud:"
openstack version show -fcsv | grep identity
elif [ "$1" == "clean-up-metadata-and-state-files" ]; then
log "Cleaning up metadata and state files:"
rm -rf ./.terraform
rm -f ./.terraform* ./terraform.tfstate*
elif [ "$1" == "detect-project" ]; then
project_type=group
if prj_name=$(is_personal_project); then
project_type=personal
fi
log "Using OpenStack ${project_type} project named: ${prj_name}"
elif [ "$1" == "validate-tools" ]; then
log "Using commandline tools:"
report_tools "terraform version"
fi
exit $?
else
project_type=group
if prj_name=$(is_personal_project); then
project_type=personal
fi
if [ "$1" == "plan" -o "$1" == "destroy" ]; then
if [ -n "${CLOUD_ENV_NAME}" ]; then
${TERRAFORM} "$@" "--var-file=${CLOUD_ENV_NAME}-${project_type}-projects.tfvars"
else
${TERRAFORM} "$@"
fi
else
${TERRAFORM} "$@"
fi
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment