Fix/git pages rentetin create tests (#46)
CI Main / Config load (push) Successful in 3m12s
CI Git-Pages Main / Config load (push) Successful in 3m4s
CI Main / Latest versio (push) Successful in 30s
CI Git-Pages Main / Latest version (push) Successful in 27s
ci-helm-build-push Helm push 0.1.9
unit-tests Bats test report
CI Main / Bats tests (push) Successful in 1m56s
CI Git-Pages Main / Build & Push Helm chart (push) Successful in 1m19s
acc-tests Cucumber test report
CI Main / Cucumber tests (push) Successful in 3m47s
ci-docker-build-push Docker push 0.2.34
CI Main / Build & Push Docker (push) Successful in 1m14s
gitops/gitea-ci-library/git-pages GitOps: git-pages 0.1.9
CI Git-Pages Main / GitOps (push) Successful in 3m37s
gitops/gitea-ci-library GitOps: 0.2.34
CI Main / GitOps (push) Successful in 40s
CI Main / Report Summary (push) Successful in 4s
CI Main / Move provider version tag (push) Successful in 12s
CI Git-Pages Main / Report Summary (push) Successful in 4s
CI Main / Config load (push) Successful in 3m12s
CI Git-Pages Main / Config load (push) Successful in 3m4s
CI Main / Latest versio (push) Successful in 30s
CI Git-Pages Main / Latest version (push) Successful in 27s
ci-helm-build-push Helm push 0.1.9
unit-tests Bats test report
CI Main / Bats tests (push) Successful in 1m56s
CI Git-Pages Main / Build & Push Helm chart (push) Successful in 1m19s
acc-tests Cucumber test report
CI Main / Cucumber tests (push) Successful in 3m47s
ci-docker-build-push Docker push 0.2.34
CI Main / Build & Push Docker (push) Successful in 1m14s
gitops/gitea-ci-library/git-pages GitOps: git-pages 0.1.9
CI Git-Pages Main / GitOps (push) Successful in 3m37s
gitops/gitea-ci-library GitOps: 0.2.34
CI Main / GitOps (push) Successful in 40s
CI Main / Report Summary (push) Successful in 4s
CI Main / Move provider version tag (push) Successful in 12s
CI Git-Pages Main / Report Summary (push) Successful in 4s
Co-authored-by: moilanik <niko.moilanen@tietoevry.com> Reviewed-on: #46
This commit was merged in pull request #46.
This commit is contained in:
@@ -149,3 +149,42 @@ curl -X PATCH https://ci-reports.helm-dev.keskikuja.site/owner/repo/commit/sha8/
|
||||
- `git-pages-publish-token` = plaintext (luetaan Giteaan viedessä)
|
||||
|
||||
Tarkemmat secret-ohjeet: [docs/secrets.md](docs/secrets.md).
|
||||
|
||||
---
|
||||
|
||||
## Testaus
|
||||
|
||||
Retention-logiikalle on unit-testit, jotka testaa funktiot ja Phase 3 -säännöt
|
||||
erikseen ilman ulkoisia riippuvuuksia.
|
||||
|
||||
```bash
|
||||
cd git-pages
|
||||
bats tests/retention.bats
|
||||
```
|
||||
|
||||
Testit käyttävät `<root>/files/retention-lib.sh` -jaettua kirjastoa, jota myös
|
||||
`retention-cleanup.sh` sourceaa. Uutta testiä kirjoittaessa:
|
||||
|
||||
1. Luo config `write_config`-helperilla
|
||||
2. Täytä `KEEP`-array testidatalla (muoto: `dir|owner|repo|branch|days`)
|
||||
3. Kutsu `apply_retention "$CONFIG"`
|
||||
4. Tarkista `TO_DELETE`-array ja `$output`
|
||||
|
||||
**Vaatimukset:** `bats`, `jq`, `date` (GNU date tai BSD date ISO 8601 -tuella).
|
||||
|
||||
---
|
||||
|
||||
## Retention
|
||||
|
||||
Ylläpitoscripti, joka poistaa vanhat raportit git-pagesista retention‑sääntöjen mukaan.
|
||||
Ajetaan sidecar‑ tai cronjob‑tilassa Kubernetesissa.
|
||||
|
||||
### Air gap -yhteensopimattomuus
|
||||
|
||||
Retention‑kontti asentaa tarvitsemansa työkalut (`curl`, `jq`) ajon aikana
|
||||
packagemanagerilla (`apt-get` / `apk`). Tämä **ei toimi air gap -ympäristössä**,
|
||||
jossa konttirekisteriin tai pakettivarastoihin ei ole verkkoyhteyttä.
|
||||
|
||||
**TODO:** Rakenna custom Docker‑image, jossa deps on valmiina:
|
||||
`FROM alpine:latest && apk add --no-cache curl jq`.
|
||||
Pushaa omaan rekisteriin ja päivitä `values.yaml`:n `retention.image`.
|
||||
|
||||
Reference in New Issue
Block a user