# This file is a template, and might need editing before it works on your project. # see https://docs.gitlab.com/ee/ci/yaml/README.html for all available options # you can delete this line if you're not using Docker before_script: - echo "before script." - echo "everything is ok." after_script: - echo "hello world" - echo "everything is ok." variables: BUILD_DIR: /build/ PACKAGE_NAME: armbian-build GIT_DEPTH: "1" stages: - build - notify_failure build_job: stage: build script: - echo "Building the package ${PACKAGE_NAME}" - echo "Building paramaters:" - echo "event ${BUILD_PACKAGE_EVENT}" | base64 -d; echo - echo "${BUILD_PACKAGE_JSON}" | base64 -d; echo - python3 gitlab-ci.py --signal=package --event "${BUILD_PACKAGE_EVENT}" --build-directory "${BUILD_DIR}" --project-id "${CI_PROJECT_ID}" --pipeline-id "${CI_PIPELINE_ID}" "$(echo "${BUILD_PACKAGE_JSON}" | base64 -d)" - python3 gitlab-ci.py --signal=notify_success --build-directory "${BUILD_DIR}" --project-id "${CI_PROJECT_ID}" --pipeline-id "${CI_PIPELINE_ID}" - rm -f ".result/${CI_PROJECT_ID}-${CI_PIPELINE_ID}.json" rules: - if: '$CI_PIPELINE_SOURCE == "trigger"' tags: - android-build-runner cache: key: ${CI_COMMIT_REF_SLUG} paths: - .result/ failure_notify_job: script: - python3 gitlab-ci.py --signal=notify_failure --project-id "${CI_PROJECT_ID}" --pipeline-id "${CI_PIPELINE_ID}" stage: notify_failure rules: - if: '$CI_PIPELINE_SOURCE == "trigger"' when: on_failure cache: key: ${CI_COMMIT_REF_SLUG} paths: - .result/