I need to setup the name of the environment in gitlab-ci.yml with the current date and time.
Is this possible? This is what I tried.
stages:
- RUN_TESTS
# - CLEAN
run-test:
stage: RUN_TESTS
before_script:
- echo "Running the tests..."
- aws configure set aws_access_key_id ${SPOT_RUNNER_ACCESS_KEY}
- aws configure set aws_secret_access_key ${SPOT_RUNNER_SECRET_KEY}
- aws configure set default.region ap-southeast-2
- $(aws ecr get-login --no-include-email --region ap-southeast-2)
- export BUCKET_NAME="effi-allure-reports"
- export date=$(date)
script:
- echo "test"
only:
- develop
tags:
- itela-spot-runner
environment:
name: $date
But when the pipeline runs, it says
This job is creating a deployment to .
that means that value has not been set. Can someone please help me on this?