firecow / gitlab-ci-local

Tired of pushing to test your .gitlab-ci.yml?
MIT License
2.15k stars 125 forks source link

Support gitlab-ci Timestamp variables #1112

Closed nolange closed 1 month ago

nolange commented 6 months ago

Minimal .gitlab-ci.yml illustrating the issue

---
job:
  script:
    - echo "$CI_COMMIT_TIMESTAMP"
    - echo "$CI_PIPELINE_CREATED_AT"
    - echo "$CI_JOB_STARTED_AT"

Expected behavior

Output like:

2022-11-22T16:19:31+01:00
2022-11-22T16:19:32+01:00
2022-11-22T16:19:32+01:00

Host information Debian 12 "Bookworm", x86-64 gitlab-ci-local 4.46.0

Containerd binary podman

Additional context

Those variables are often used for reproducible builds and stored as meta-information for future reference. Please add support for them