From a259f017dc04c962747065dd1b2158476f2fd62c Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Fri, 11 Nov 2022 09:34:36 +0100 Subject: [PATCH] fix(CI/CD): Fix corrupted file When modifying the starting script in the CI pipeline, a sed statement was emptying the file. This has been fixed by adding the proper insert flag. --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 698cdcf..aaa5e7a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,7 +25,8 @@ build-image: - echo "DOWNLOAD_URL=http://random.com" >> RELEASE - sed -i '14 i \ libatomic1 cron \\' Dockerfile - sed -i '45 i \ \n\# Setup crontab for scheduled backups\nRUN { cat; echo \"0 5 * * 6 gitlab-backup create SKIP=registry,builds,artifacts\"; } | crontab -\n\n' Dockerfile - - sed '/gitlab-ctl reconfigure/a \\nif command -v cron\; then\n\techo \"Starting cron daemon...\"\n\tcron\nfi' assets/wrapper > assets/wrapper + - tabs 4 + - sed -i '/gitlab-ctl reconfigure/a \\nif command -v cron\; then\n\techo \"Starting cron daemon...\"\n\tcron\nfi' assets/wrapper - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker build -t $CI_REGISTRY/athens-school/gitlab:$GITLAB_SHORT_VER . - docker push $CI_REGISTRY/athens-school/gitlab:$GITLAB_SHORT_VER