gigascience / gigadb-website

Source code for running GigaDB
http://gigadb.org
GNU General Public License v3.0
9 stars 15 forks source link

git log message content leaks into .secrets file in build_staging job #2065

Open kencho51 opened 4 weeks ago

kencho51 commented 4 weeks ago

User Story

As a developer I want git log messages to not appear in the GigadDB environment variables config file So that it doesn't break the deployment pipeline when the git log message contains special character

Acceptance criteria

Given a new commit message has special character When the deployment pipeline is run for that commit Then no error occurs due to the git log message

Additional infos

Implemenation: ensure CI_ Gitlab variables not needed by GigaDB are filtered out in Gitlab config file.

Describe the bug A clear and concise description of what the bug is.

When I tried to deploy the latest develop branch after rebase with the upstream, I got this error:

$ time docker-compose run --rm config
The REPO_NAME variable is not set. Defaulting to a blank string.
The PHP_FPM_START_SERVERS variable is not set. Defaulting to a blank string.
Creating network "kencho-gigadb-website_default" with the default driver
Creating network "kencho-gigadb-website_db-tier" with the default driver
Creating network "kencho-gigadb-website_web-tier" with driver "bridge"
Creating volume "kencho-gigadb-website_le_config" with default driver
Creating volume "kencho-gigadb-website_le_webrootpath" with default driver
Creating volume "kencho-gigadb-website_portainer_data" with default driver
Pulling config (rija/docker-alpine-shell-tools:1.0.1)...
1.0.1: Pulling from rija/docker-alpine-shell-tools
Current working directory: /var/www
An .env file is present, sourcing it
Running /var/www/ops/scripts/generate_config.sh for environment: staging
Sourcing secrets
./.secrets: line 110: -: command not found
Command exited with non-zero status 127
real    0m 4.18s
user    0m 0.75s
sys 0m 0.11s

Then I looked into the artifacts, in line 110 and 111 of the .secrets file, it contains:

- Allow user to upload dataset files to wasabi bucket and also s3 glacier bucket for backup
- Remove user suffix from wasabi profile and improve curators docs

The content is from this log message commit.

Additional context Add any other context about the problem here.

I tried sd_teardown to remove all the volumes and containers, and re-run the pipeline again, but got the same error.