piilloparametrit eksplisiittisiksi
This commit is contained in:
@@ -52,22 +52,17 @@ jobs:
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
bash .ci/scripts/publish-git-pages.sh "reports/${GITHUB_SHA:0:8}/bats"
|
||||
bash .ci/scripts/publish-git-pages.sh "bats/" "$PAGES_HOST" "$GIT_PAGES_PUBLISH_URL" "$GIT_PAGES_PUBLISH_TOKEN"
|
||||
|
||||
- name: Set bats commit status
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${BATS_EXIT}" = "0" ]; then
|
||||
STATUS="success"
|
||||
DESC="Bats tests"
|
||||
URL="https://${PAGES_HOST}/${GITHUB_REPOSITORY}/reports/${GITHUB_SHA:0:8}/bats/"
|
||||
bash .ci/scripts/report-status.sh success "Bats tests" "" "$GITEA_API_URL" "$GITEA_TOKEN" "ci-bats" "$PAGES_HOST" "bats/"
|
||||
else
|
||||
STATUS="failure"
|
||||
DESC="Bats tests FAILED"
|
||||
URL="https://${PAGES_HOST}/${GITHUB_REPOSITORY}/reports/${GITHUB_SHA:0:8}/bats/"
|
||||
bash .ci/scripts/report-status.sh failure "Bats tests FAILED" "" "$GITEA_API_URL" "$GITEA_TOKEN" "ci-bats" "$PAGES_HOST" "bats/"
|
||||
fi
|
||||
bash .ci/scripts/report-status.sh "$STATUS" "$DESC" "$URL" ci-bats
|
||||
|
||||
cucumber:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -115,7 +110,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${TOOL_OK}" = "true" ]; then
|
||||
bash .ci/scripts/publish-git-pages.sh "reports/${GITHUB_SHA:0:8}/cucumber"
|
||||
bash .ci/scripts/publish-git-pages.sh "cucumber/" "$PAGES_HOST" "$GIT_PAGES_PUBLISH_URL" "$GIT_PAGES_PUBLISH_TOKEN"
|
||||
fi
|
||||
|
||||
- name: Set cucumber commit status
|
||||
@@ -123,19 +118,12 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${TOOL_OK}" != "true" ]; then
|
||||
STATUS="failure"
|
||||
DESC="Cucumber tool unavailable"
|
||||
URL="${GITEA_API_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
|
||||
bash .ci/scripts/report-status.sh failure "Cucumber tool unavailable" "" "$GITEA_API_URL" "$GITEA_TOKEN" "ci-cucumber" "$PAGES_HOST"
|
||||
elif [ "${CUCUMBER_EXIT}" = "0" ]; then
|
||||
STATUS="success"
|
||||
DESC="Cucumber tests passed"
|
||||
URL="https://${PAGES_HOST}/${GITHUB_REPOSITORY}/reports/${GITHUB_SHA:0:8}/cucumber/"
|
||||
bash .ci/scripts/report-status.sh success "Cucumber tests passed" "" "$GITEA_API_URL" "$GITEA_TOKEN" "ci-cucumber" "$PAGES_HOST" "cucumber/"
|
||||
else
|
||||
STATUS="failure"
|
||||
DESC="Cucumber tests FAILED"
|
||||
URL="https://${PAGES_HOST}/${GITHUB_REPOSITORY}/reports/${GITHUB_SHA:0:8}/cucumber/"
|
||||
bash .ci/scripts/report-status.sh failure "Cucumber tests FAILED" "" "$GITEA_API_URL" "$GITEA_TOKEN" "ci-cucumber" "$PAGES_HOST" "cucumber/"
|
||||
fi
|
||||
bash .ci/scripts/report-status.sh "$STATUS" "$DESC" "$URL" ci-cucumber
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -153,7 +141,4 @@ jobs:
|
||||
|
||||
- name: Set build commit status
|
||||
run: |
|
||||
bash .ci/scripts/report-status.sh success \
|
||||
"Build complete" \
|
||||
"${GITEA_API_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" \
|
||||
ci-build
|
||||
bash .ci/scripts/report-status.sh success "Build complete" "" "$GITEA_API_URL" "$GITEA_TOKEN" "ci-build" "$PAGES_HOST"
|
||||
|
||||
@@ -14,14 +14,14 @@ on:
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GITEA_API_URL: https://gitea.app.keskikuja.site
|
||||
PAGES_HOST: ci-reports.helm-dev.keskikuja.site
|
||||
GIT_PAGES_PUBLISH_URL: https://ci-reports.helm-dev.keskikuja.site
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
GIT_PAGES_PUBLISH_TOKEN: ${{ secrets.GIT_PAGES_PUBLISH_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Publish reports
|
||||
run: bash scripts/publish.sh reports
|
||||
run: |
|
||||
bash scripts/publish.sh "reports" \
|
||||
"https://gitea.app.keskikuja.site" \
|
||||
"${{ secrets.GITEA_TOKEN }}" \
|
||||
"ci-reports.helm-dev.keskikuja.site" \
|
||||
"https://ci-reports.helm-dev.keskikuja.site" \
|
||||
"${{ secrets.GIT_PAGES_PUBLISH_TOKEN }}"
|
||||
|
||||
Reference in New Issue
Block a user