Compare commits

..

4 Commits

Author SHA1 Message Date
moilanik 4e1325a6fb docker aina myös latest
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 19s
unit-tests Link to Bats reports
CI Feature / Bats tests (push) Successful in 1m46s
acc-tests Link to Cucumber reports
CI Feature / Cucumber tests (push) Successful in 58s
CI Feature / Report Summary (push) Successful in 4s
2026-06-16 14:27:35 +03:00
moilanik ea64d8703d fix fragile tests 2026-06-16 14:27:25 +03:00
niko 153205be40 cucumber kontin konf (#17)
CI Main / Load example-gitea-env.conf to pipeline env (push) Successful in 18s
CI Main / Check existing artifact (push) Successful in 12s
unit-tests Link to Bats reports
CI Main / Bats tests (push) Successful in 1m36s
acc-tests Link to Cucumber reports
CI Main / Cucumber tests (push) Successful in 48s
ci-docker-build-push Docker build & push 0.2.5 OK
CI Main / Build & Push Docker (push) Successful in 31s
CI Main / Report Summary (push) Successful in 3s
CI Main / Move provider version tag (push) Successful in 10s
Co-authored-by: moilanik <niko.moilanen@tietoevry.com>
Reviewed-on: #17
2026-06-16 13:24:29 +03:00
niko f3a54d6ed3 käytetään omia kontteja, eikä rakenneta lennosta! (#16)
CI Main / Load example-gitea-env.conf to pipeline env (push) Successful in 20s
CI Main / Check existing artifact (push) Successful in 11s
unit-tests Link to Bats reports
CI Main / Bats tests (push) Successful in 1m37s
acc-tests Link to Cucumber reports
CI Main / Cucumber tests (push) Failing after 39s
CI Main / Build & Push Docker (push) Has been skipped
CI Main / Report Summary (push) Successful in 5s
CI Main / Move provider version tag (push) Has been skipped
Co-authored-by: moilanik <niko.moilanen@tietoevry.com>
Reviewed-on: #16
2026-06-16 10:17:53 +03:00
9 changed files with 17 additions and 10 deletions
+8 -1
View File
@@ -50,7 +50,8 @@ jobs:
--label "git.commitBy=${{ github.actor }}" \ --label "git.commitBy=${{ github.actor }}" \
--label "build.date=${NOW}" \ --label "build.date=${NOW}" \
-f "${DOCKERFILE}" \ -f "${DOCKERFILE}" \
-t "${DOCKER_IMAGE_NAME}:${VERSION}" . -t "${DOCKER_IMAGE_NAME}:${VERSION}" \
-t "${DOCKER_IMAGE_NAME}:latest" .
REGISTRY="${DOCKER_REGISTRY:?DOCKER_REGISTRY not set in env.conf}" REGISTRY="${DOCKER_REGISTRY:?DOCKER_REGISTRY not set in env.conf}"
IMAGE="${DOCKER_IMAGE_NAME:?DOCKER_IMAGE_NAME not set in env.conf}" IMAGE="${DOCKER_IMAGE_NAME:?DOCKER_IMAGE_NAME not set in env.conf}"
@@ -62,6 +63,12 @@ jobs:
docker tag "${DOCKER_IMAGE_NAME}:${VERSION}" "$FULL_IMAGE" docker tag "${DOCKER_IMAGE_NAME}:${VERSION}" "$FULL_IMAGE"
echo "$DOCKER_PASSWORD" | docker login "$REGISTRY_HOST" -u "$DOCKER_USERNAME" --password-stdin echo "$DOCKER_PASSWORD" | docker login "$REGISTRY_HOST" -u "$DOCKER_USERNAME" --password-stdin
docker push "$FULL_IMAGE" docker push "$FULL_IMAGE"
FULL_LATEST="${REGISTRY}/${IMAGE}:latest"
echo "Pushing ${FULL_LATEST} ..."
docker tag "${DOCKER_IMAGE_NAME}:latest" "$FULL_LATEST"
docker push "$FULL_LATEST"
docker logout "$REGISTRY_HOST" docker logout "$REGISTRY_HOST"
- name: Report status SUCCESS - name: Report status SUCCESS
+1 -1
View File
@@ -41,7 +41,7 @@ jobs:
docker run --rm \ docker run --rm \
-v bats-workspace:/data \ -v bats-workspace:/data \
--entrypoint bash ${{ inputs.bats-image }} \ --entrypoint bash ${{ inputs.bats-image }} \
-c 'apk add -q lsof python3 jq curl ruby && cd /data && gem install bashcov -v 3.3.0 2>&1 | tail -1 && bashcov -- bats tests/' \ -c 'cd /data && bashcov -- bats tests/' \
> "reports/${GITHUB_SHA:0:8}/bats/results.txt" 2>&1 > "reports/${GITHUB_SHA:0:8}/bats/results.txt" 2>&1
BATS_EXIT=$? BATS_EXIT=$?
bash .ci/.gitea/scripts/bats-coverage.sh bats-workspace "reports/${GITHUB_SHA:0:8}/bats" bash .ci/.gitea/scripts/bats-coverage.sh bats-workspace "reports/${GITHUB_SHA:0:8}/bats"
@@ -36,8 +36,6 @@ jobs:
id: cucumber-tests id: cucumber-tests
shell: bash shell: bash
run: | run: |
apt-get update -qq && apt-get install -y -qq --no-install-recommends lsof jq
npm install @cucumber/cucumber > /dev/null 2>&1
mkdir -p "reports/${GITHUB_SHA:0:8}/cucumber" mkdir -p "reports/${GITHUB_SHA:0:8}/cucumber"
set +e set +e
npx cucumber-js \ npx cucumber-js \
+2 -2
View File
@@ -20,7 +20,7 @@ jobs:
secrets: inherit secrets: inherit
with: with:
env_json: ${{ needs.load-config.outputs.env_json }} env_json: ${{ needs.load-config.outputs.env_json }}
bats-image: bats/bats:latest bats-image: gitea.app.keskikuja.site/niko/ci-bats:latest
cucumber: cucumber:
name: Cucumber tests name: Cucumber tests
@@ -29,7 +29,7 @@ jobs:
secrets: inherit secrets: inherit
with: with:
env_json: ${{ needs.load-config.outputs.env_json }} env_json: ${{ needs.load-config.outputs.env_json }}
cucumber-node-image: node:22 cucumber-node-image: gitea.app.keskikuja.site/niko/ci-cucumber:latest
report-summary: report-summary:
name: Report Summary name: Report Summary
+2 -2
View File
@@ -29,7 +29,7 @@ jobs:
secrets: inherit secrets: inherit
with: with:
env_json: ${{ needs.load-config.outputs.env_json }} env_json: ${{ needs.load-config.outputs.env_json }}
bats-image: bats/bats:latest bats-image: gitea.app.keskikuja.site/niko/ci-bats:latest
cucumber: cucumber:
name: Cucumber tests name: Cucumber tests
@@ -39,7 +39,7 @@ jobs:
secrets: inherit secrets: inherit
with: with:
env_json: ${{ needs.load-config.outputs.env_json }} env_json: ${{ needs.load-config.outputs.env_json }}
cucumber-node-image: node:22 cucumber-node-image: gitea.app.keskikuja.site/niko/ci-cucumber:latest
build-push: build-push:
name: Build & Push Docker name: Build & Push Docker
+1
View File
@@ -7,3 +7,4 @@ tmp/
coverage/ coverage/
.DS_Store .DS_Store
reports/ reports/
.vscode/
+1
View File
@@ -4,3 +4,4 @@ RUN apt-get update -qq && \
apt-get clean && \ apt-get clean && \
rm -rf /var/lib/apt/lists/* && \ rm -rf /var/lib/apt/lists/* && \
npm install -g @cucumber/cucumber npm install -g @cucumber/cucumber
ENV NODE_PATH=/usr/local/lib/node_modules
@@ -6,7 +6,7 @@ const PROJECT_ROOT = path.resolve(__dirname, '..', '..', '..');
const MOCK_SCRIPT = path.join(PROJECT_ROOT, 'tests', 'helpers', 'mock-api.sh'); const MOCK_SCRIPT = path.join(PROJECT_ROOT, 'tests', 'helpers', 'mock-api.sh');
Before({ tags: '@mock' }, function () { Before({ tags: '@mock' }, function () {
const out = execSync(`bash -c 'source "${MOCK_SCRIPT}" && mock_start && sleep 0.3 && curl -s -o /dev/null -w "%{http_code}" --max-time 3 http://localhost:18080/api/v1/repos/health/check'`, { const out = execSync(`bash -c 'source "${MOCK_SCRIPT}" && mock_start && sleep 1 && curl -s -o /dev/null -w "%{http_code}" --max-time 3 http://localhost:18080/api/v1/repos/health/check'`, {
cwd: PROJECT_ROOT, cwd: PROJECT_ROOT,
encoding: 'utf-8', encoding: 'utf-8',
stdio: ['pipe', 'pipe', 'pipe'], stdio: ['pipe', 'pipe', 'pipe'],
+1 -1
View File
@@ -55,7 +55,7 @@ mock_start() {
nohup python3 "$(dirname "${BASH_SOURCE[0]}")/mock-server.py" "$MOCK_PORT" "$MOCK_CONFIG_FILE" "$MOCK_REQUEST_FILE" \ nohup python3 "$(dirname "${BASH_SOURCE[0]}")/mock-server.py" "$MOCK_PORT" "$MOCK_CONFIG_FILE" "$MOCK_REQUEST_FILE" \
</dev/null >/dev/null 2>&1 & </dev/null >/dev/null 2>&1 &
MOCK_PID=$! MOCK_PID=$!
sleep 0.5 sleep 1
} }
mock_stop() { mock_stop() {