monorepossa komponetti parametrina
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 22s
POC GitOps E2E / e2e (push) Successful in 52s
unit-tests Bats test report
CI Feature / Bats tests (push) Failing after 1m29s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Failing after 1m40s
CI Feature / Report Summary (push) Successful in 6s
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 22s
POC GitOps E2E / e2e (push) Successful in 52s
unit-tests Bats test report
CI Feature / Bats tests (push) Failing after 1m29s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Failing after 1m40s
CI Feature / Report Summary (push) Successful in 6s
This commit is contained in:
@@ -30,7 +30,8 @@ jobs:
|
|||||||
--arg version "0.2.0" \
|
--arg version "0.2.0" \
|
||||||
--arg source_repo "${{ github.repository }}" \
|
--arg source_repo "${{ github.repository }}" \
|
||||||
--arg source_commit "${{ github.sha }}" \
|
--arg source_commit "${{ github.sha }}" \
|
||||||
'{dispatch_id: $dispatch_id, file: $file, yq_tpl: $yq_tpl, version: $version, source_repo: $source_repo, source_commit: $source_commit}')
|
--arg git_tag_prefix "poc-test" \
|
||||||
|
'{dispatch_id: $dispatch_id, file: $file, yq_tpl: $yq_tpl, version: $version, source_repo: $source_repo, source_commit: $source_commit, git_tag_prefix: $git_tag_prefix}')
|
||||||
curl -s -X POST \
|
curl -s -X POST \
|
||||||
"https://gitea.app.keskikuja.site/api/v1/repos/niko/gitea-ci-gitops-tests/actions/workflows/gitops-service.yaml/dispatches" \
|
"https://gitea.app.keskikuja.site/api/v1/repos/niko/gitea-ci-gitops-tests/actions/workflows/gitops-service.yaml/dispatches" \
|
||||||
-H "Authorization: token ${{ secrets.GITOPS_DISPATCH_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.GITOPS_DISPATCH_TOKEN }}" \
|
||||||
|
|||||||
@@ -10,11 +10,17 @@ _gitops_fail() {
|
|||||||
if [ -n "${GITOPS_REPO:-}" ] && [ -n "${GITOPS_SHA:-}" ] && \
|
if [ -n "${GITOPS_REPO:-}" ] && [ -n "${GITOPS_SHA:-}" ] && \
|
||||||
[ -n "${SOURCE_REPO:-}" ] && [ -n "${SOURCE_COMMIT:-}" ] && \
|
[ -n "${SOURCE_REPO:-}" ] && [ -n "${SOURCE_COMMIT:-}" ] && \
|
||||||
[ -n "${GITEA_API_URL:-}" ] && [ -n "${GITEA_TOKEN:-}" ]; then
|
[ -n "${GITEA_API_URL:-}" ] && [ -n "${GITEA_TOKEN:-}" ]; then
|
||||||
local SOURCE_URL="${GITEA_API_URL}/${SOURCE_REPO}/commits/${SOURCE_COMMIT}"
|
local env repo context
|
||||||
|
env=$(dirname "${INPUT_FILE}")
|
||||||
|
repo=$(basename "${SOURCE_REPO}")
|
||||||
|
context="${repo}"
|
||||||
|
[ -n "${GIT_TAG_PREFIX:-}" ] && context="${repo}/${GIT_TAG_PREFIX}"
|
||||||
|
|
||||||
|
local SOURCE_URL="${GITEA_API_URL}/${SOURCE_REPO}/commit/${SOURCE_COMMIT}"
|
||||||
ROOT_REPO="${GITOPS_REPO}" ROOT_COMMIT="${GITOPS_SHA}" \
|
ROOT_REPO="${GITOPS_REPO}" ROOT_COMMIT="${GITOPS_SHA}" \
|
||||||
GITEA_API_URL="${GITEA_API_URL}" GITEA_TOKEN="${GITEA_TOKEN}" \
|
GITEA_API_URL="${GITEA_API_URL}" GITEA_TOKEN="${GITEA_TOKEN}" \
|
||||||
bash "${SCRIPT_DIR}/report-status.sh" failure "${MSG}" \
|
bash "${SCRIPT_DIR}/report-status.sh" failure "Install to ${env} ${VERSION}" \
|
||||||
"source/${SOURCE_REPO}" "" "${SOURCE_URL}" 2>/dev/null || true
|
"${context}" "" "${SOURCE_URL}" 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
@@ -32,12 +38,19 @@ _gitops_validate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_gitops_success() {
|
_gitops_success() {
|
||||||
local SOURCE_URL="${GITEA_API_URL}/${SOURCE_REPO}/commits/${SOURCE_COMMIT}"
|
local env repo context
|
||||||
|
env=$(dirname "${INPUT_FILE}")
|
||||||
|
repo=$(basename "${SOURCE_REPO}")
|
||||||
|
context="${repo}"
|
||||||
|
[ -n "${GIT_TAG_PREFIX:-}" ] && context="${repo}/${GIT_TAG_PREFIX}"
|
||||||
|
|
||||||
|
local SOURCE_URL="${GITEA_API_URL}/${SOURCE_REPO}/commit/${SOURCE_COMMIT}"
|
||||||
|
|
||||||
ROOT_REPO="${GITOPS_REPO}" ROOT_COMMIT="${GITOPS_SHA}" \
|
ROOT_REPO="${GITOPS_REPO}" ROOT_COMMIT="${GITOPS_SHA}" \
|
||||||
GITEA_API_URL="${GITEA_API_URL}" GITEA_TOKEN="${GITEA_TOKEN}" \
|
GITEA_API_URL="${GITEA_API_URL}" GITEA_TOKEN="${GITEA_TOKEN}" \
|
||||||
bash "${SCRIPT_DIR}/report-status.sh" success "Source build" \
|
bash "${SCRIPT_DIR}/report-status.sh" success \
|
||||||
"source/${SOURCE_REPO}" "" "${SOURCE_URL}"
|
"Install to ${env} ${VERSION}" \
|
||||||
|
"${context}" "" "${SOURCE_URL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
_gitops_substitute() {
|
_gitops_substitute() {
|
||||||
|
|||||||
Reference in New Issue
Block a user