Commit f338e283 authored by Denis Konovalyenko's avatar Denis Konovalyenko

#25: CI scripts consolidated under one directory.

parent bc43b409
......@@ -29,6 +29,7 @@ stages:
variables:
CI_GITLAB_PATH: "ci/gitlab"
CI_SCRIPTS_PATH: "${CI_GITLAB_PATH}/scripts"
MAVEN_IMAGE: "maven:3.5.3-jdk-8"
BASH_CURL_IMAGE: "cosmintitei/bash-curl:latest"
MAVEN_CLI_OPTS: "--settings ${CI_GITLAB_PATH}/.m2/settings.xml --batch-mode --errors --show-version"
......@@ -41,9 +42,9 @@ variables:
# CI_DEBUG_TRACE: "true" # WARNING: all secret variables will be exposed to a job output!
before_script:
- ${CI_GITLAB_PATH}/before-job
- ${CI_SCRIPTS_PATH}/before-job
after_script:
- ${CI_GITLAB_PATH}/after-job
- ${CI_SCRIPTS_PATH}/after-job
verification:
stage: verification
......@@ -65,7 +66,7 @@ verification:
- ${HOME}/target/
policy: pull
script:
- ${CI_GITLAB_PATH}/gpg-import
- ${CI_SCRIPTS_PATH}/gpg-import
- mvn deploy ${MAVEN_CLI_OPTS} -DskipITs -Dmaven.test.skip=true --activate-profiles sign_and_deploy,release #--quiet
- touch ${CI_GITLAB_PATH}/${CI_JOB_NAME}-passed
......@@ -96,7 +97,7 @@ okapi-snapshot-trigger:
- touch ${CI_GITLAB_PATH}/${CI_JOB_NAME}-passed
only:
variables:
- $SNAPSHOTS_BRANCH == $CI_COMMIT_REF_NAME
- $SNAPSHOTS_BRANCH == $CI_COMMIT_REF_NAME
except:
- tags
- master
#!/usr/bin/env bash
if [ ! -f ${CI_GITLAB_PATH}/${CI_JOB_NAME}-passed ] ; then
BUILD_STATUS=failed ${CI_GITLAB_PATH}/build-status;
BUILD_STATUS=failed ${CI_SCRIPTS_PATH}/build-status;
else
BUILD_STATUS=passed ${CI_GITLAB_PATH}/build-status;
BUILD_STATUS=passed ${CI_SCRIPTS_PATH}/build-status;
fi
#!/usr/bin/env bash
rm -f ${CI_GITLAB_PATH}/${CI_JOB_NAME}-passed
BUILD_STATUS=running ${CI_GITLAB_PATH}/build-status
BUILD_STATUS=running ${CI_SCRIPTS_PATH}/build-status
......@@ -21,7 +21,7 @@ fi
BITBUCKET_API_ROOT="https://api.bitbucket.org/2.0"
BITBUCKET_STATUS_API="$BITBUCKET_API_ROOT/repositories/$BITBUCKET_NAMESPACE/$BITBUCKET_REPOSITORY/commit/$CI_COMMIT_SHA/statuses/build"
BITBUCKET_KEY="ci/gitlab/$CI_JOB_NAME"
BITBUCKET_KEY="$CI_GITLAB_PATH/$CI_JOB_NAME"
BITBUCKET_NAME="$CI_JOB_STAGE:$CI_JOB_NAME:$BUILD_STATUS"
BITBUCKET_DESCRIPTION="Pipeline #$CI_PIPELINE_ID"
......
......@@ -2,6 +2,6 @@
openssl ${OPENSSL_CLI_OPTS} -d -in ${CI_GITLAB_PATH}/code-signing-key.asc.enc -out ${CI_GITLAB_PATH}/code-signing-key.asc
gpg --quiet --batch --import ${CI_GITLAB_PATH}/code-signing-key.asc
echo "use-agent" > ${HOME}/{GPG_CONF}
echo "use-agent" > ${HOME}/${GPG_CONF}
echo "pinentry-mode loopback" >> ${HOME}/${GPG_CONF}
echo "allow-loopback-pinentry" > ${HOME}/${GPG_AGENT_CONF}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment