srghaer
CI / Load gitea-env.conf to pipeline env (push) Successful in 12s
ci-check-running Checking version...
ci-check Build version 0.1.0 required
ci-cucumber Cucumber tests
ci-bats Bats tests
ci-build Build complete
CI / Build & Push Artifact (push) Successful in 2m29s
CI / Load gitea-env.conf to pipeline env (push) Successful in 12s
ci-check-running Checking version...
ci-check Build version 0.1.0 required
ci-cucumber Cucumber tests
ci-bats Bats tests
ci-build Build complete
CI / Build & Push Artifact (push) Successful in 2m29s
This commit is contained in:
@@ -35,6 +35,7 @@ jobs:
|
||||
- name: Check existing artifact
|
||||
id: check
|
||||
run: |
|
||||
bash scripts/report-status.sh pending "Checking version..." ci-check-running
|
||||
VERSION=$(jq -r '.version' package.json)
|
||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
|
||||
@@ -105,6 +106,7 @@ jobs:
|
||||
shell: bash
|
||||
id: build
|
||||
run: |
|
||||
bash scripts/report-status.sh pending "Building Docker image..." ci-docker-build-running
|
||||
VERSION="${{ needs.check.outputs.version }}"
|
||||
NOW=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
docker build \
|
||||
@@ -163,6 +165,7 @@ jobs:
|
||||
shell: bash
|
||||
id: push
|
||||
run: |
|
||||
bash scripts/report-status.sh pending "Pushing to registry..." ci-docker-push-running
|
||||
VERSION="${{ needs.check.outputs.version }}"
|
||||
docker load -i /tmp/image/artifact.tar
|
||||
REGISTRY=$(echo "$GITEA_API_URL" | sed 's|https://||')
|
||||
@@ -195,6 +198,7 @@ jobs:
|
||||
shell: bash
|
||||
id: tag
|
||||
run: |
|
||||
bash scripts/report-status.sh pending "Creating tag..." ci-docker-tag-running
|
||||
VERSION="${{ needs.check.outputs.version }}"
|
||||
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X POST \
|
||||
"$GITEA_API_URL/api/v1/repos/${{ github.repository }}/tags" \
|
||||
|
||||
@@ -34,7 +34,15 @@ jobs:
|
||||
path: .ci
|
||||
|
||||
- name: Validate CI config
|
||||
run: bash .ci/scripts/ci-validate.sh
|
||||
run: |
|
||||
bash .ci/scripts/report-status.sh pending "Validating CI config..." ci-validate-running
|
||||
bash .ci/scripts/ci-validate.sh
|
||||
bash .ci/scripts/report-status.sh success "CI config valid" ci-validate
|
||||
|
||||
- name: Report validate running
|
||||
if: always()
|
||||
run: |
|
||||
bash .ci/scripts/report-status.sh pending "Validating CI config..." ci-validate-running
|
||||
|
||||
bats:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -65,6 +73,11 @@ jobs:
|
||||
echo "BATS_EXIT=${BATS_EXIT}" >> "${GITHUB_ENV}"
|
||||
exit ${BATS_EXIT}
|
||||
|
||||
- name: Report bats running
|
||||
if: always()
|
||||
run: |
|
||||
bash .ci/scripts/report-status.sh pending "Running Bats tests..." ci-bats-running
|
||||
|
||||
- name: Publish bats reports
|
||||
if: always()
|
||||
run: bash .ci/scripts/publish-git-pages.sh bats
|
||||
@@ -73,7 +86,7 @@ jobs:
|
||||
if: always()
|
||||
run: |
|
||||
if [ "${BATS_EXIT}" = "0" ]; then
|
||||
bash .ci/scripts/report-status.sh success "Bats tests" ci-bats bats
|
||||
bash .ci/scripts/report-status.sh success "Bats tests OK" ci-bats bats
|
||||
else
|
||||
bash .ci/scripts/report-status.sh failure "Bats tests FAILED" ci-bats bats
|
||||
fi
|
||||
@@ -105,13 +118,18 @@ jobs:
|
||||
STATE="success"
|
||||
[ "${CUCUMBER_EXIT}" != "0" ] && STATE="failure"
|
||||
if [ -f "reports/${GITHUB_SHA:0:8}/cucumber/index.html" ]; then
|
||||
bash .ci/scripts/report-status.sh "${STATE}" "Cucumber tests" ci-cucumber cucumber
|
||||
bash .ci/scripts/report-status.sh "${STATE}" "Cucumber tests OK" ci-cucumber cucumber
|
||||
else
|
||||
bash .ci/scripts/report-status.sh "${STATE}" "Cucumber tests" ci-cucumber
|
||||
bash .ci/scripts/report-status.sh "${STATE}" "Cucumber tests OK" ci-cucumber
|
||||
fi
|
||||
|
||||
exit ${CUCUMBER_EXIT}
|
||||
|
||||
- name: Report cucumber running
|
||||
if: always()
|
||||
run: |
|
||||
bash .ci/scripts/report-status.sh pending "Running Cucumber tests..." ci-cucumber-running
|
||||
|
||||
- name: Publish cucumber reports
|
||||
if: always()
|
||||
run: bash .ci/scripts/publish-git-pages.sh cucumber
|
||||
@@ -127,7 +145,9 @@ jobs:
|
||||
path: .ci
|
||||
|
||||
- name: Generate report index
|
||||
run: bash .ci/.gitea/scripts/generate-report-index.sh
|
||||
run: |
|
||||
bash .ci/scripts/report-status.sh pending "Generating report index..." ci-build-running
|
||||
bash .ci/.gitea/scripts/generate-report-index.sh
|
||||
|
||||
- name: Set build commit status
|
||||
run: bash .ci/scripts/report-status.sh success "Build complete" ci-build
|
||||
|
||||
Reference in New Issue
Block a user