Skip to content
Snippets Groups Projects
Verified Commit ff1da792 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: wip new pipeline

parent 06ac2834
No related branches found
No related tags found
No related merge requests found
......@@ -121,19 +121,7 @@
#nativeBuildInputs = gitlabPackages;
shellHook = let
ciRepositoryUrl = builtins.getEnv "CI_REPOSITORY_URL";
ciProjectDir = builtins.getEnv "CI_PROJECT_DIR";
ciJobToken = builtins.getEnv "CI_JOB_TOKEN";
ciCommitSha = builtins.getEnv "CI_COMMIT_SHA";
ciCommitRefName = builtins.getEnv "CI_COMMIT_REF_NAME";
gitlabToken = builtins.getEnv "GITLAB_TOKEN";
gitlabUserEmail = builtins.getEnv "GITLAB_USER_EMAIL";
gitlabUserName = builtins.getEnv "GITLAB_USER_NAME";
in ''
shellHook = ''
set -x
......@@ -141,27 +129,27 @@
${pkgs'.coreutils}/bin/printenv
if [ -z "${gitlabToken}" ]; then
if [ -z "$GITLAB_TOKEN" ]; then
exit 1
fi
if [ -z "${ciRepositoryUrl}" ]; then
if [ -z "''${CI_REPOSITORY_URL}" ]; then
exit 1
fi
if [ -z "${ciProjectDir}" ]; then
if [ -z "''${CI_PROJECT_DIR}" ]; then
exit 1
fi
cd ${ciProjectDir} || exit 1
cd ''${CI_PROJECT_DIR} || exit 1
${pkgs'.git}/bin/git config --global user.email "${gitlabUserEmail}"
${pkgs'.git}/bin/git config --global user.name "${gitlabUserName}"
${pkgs'.git}/bin/git config --global credential.helper '!f() { echo "username=gitlab-ci-token"; echo "password=${ciJobToken}"; }; f'
${pkgs'.git}/bin/git config --global user.email "''${GITLAB_USER_EMAIL}"
${pkgs'.git}/bin/git config --global user.name "''${GITLAB_USER_NAME}"
${pkgs'.git}/bin/git config --global credential.helper '!f() { echo "username=gitlab-ci-token"; echo "password=''${CI_JOB_TOKEN}"; }; f'
${pkgs'.git}/bin/git config --global pull.rebase true
${pkgs'.git}/bin/git config --global http.sslVerify "false"
${pkgs'.git}/bin/git remote set-url origin https://pad:${gitlabToken}@''${CI_REPOSITORY_URL#*@}
${pkgs'.git}/bin/git remote set-url origin https://pad:''${GITLAB_TOKEN}@''${CI_REPOSITORY_URL#*@}
${pkgs'.git}/bin/git fetch --all --tags --unshallow
${pkgs'.git}/bin/git reset --hard origin/master
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment