Skip to content
Snippets Groups Projects
Commit 98db7757 authored by jurgenhaas's avatar jurgenhaas
Browse files

Check for composer.json before configuring it

parent 3aa4be31
Branches
No related tags found
No related merge requests found
...@@ -21,8 +21,8 @@ stages: ...@@ -21,8 +21,8 @@ stages:
- if [[ "x$(command -v ssh)" != "x" && -n $SSH_PRIVATE_KEY ]]; then ssh git@${CI_SERVER_HOST}; fi - if [[ "x$(command -v ssh)" != "x" && -n $SSH_PRIVATE_KEY ]]; then ssh git@${CI_SERVER_HOST}; fi
- if [[ "x$(command -v glab)" != "x" && -n $GITLAB_ACCESS_TOKEN ]]; then glab auth login --hostname ${CI_SERVER_HOST} --token $GITLAB_ACCESS_TOKEN; fi - if [[ "x$(command -v glab)" != "x" && -n $GITLAB_ACCESS_TOKEN ]]; then glab auth login --hostname ${CI_SERVER_HOST} --token $GITLAB_ACCESS_TOKEN; fi
- if [[ "x$(command -v glab)" != "x" && -n $GITLAB_PRIVATE_TOKEN ]]; then glab auth login --hostname ${CI_SERVER_HOST} --token $GITLAB_PRIVATE_TOKEN; fi - if [[ "x$(command -v glab)" != "x" && -n $GITLAB_PRIVATE_TOKEN ]]; then glab auth login --hostname ${CI_SERVER_HOST} --token $GITLAB_PRIVATE_TOKEN; fi
- if [[ -n $GITLAB_ACCESS_TOKEN ]]; then composer config -g --no-plugins --no-interaction gitlab-token.${CI_SERVER_HOST} $GITLAB_ACCESS_TOKEN; fi - if [[ -n $GITLAB_ACCESS_TOKEN && -f composer.json ]]; then composer config -g --no-plugins --no-interaction gitlab-token.${CI_SERVER_HOST} $GITLAB_ACCESS_TOKEN; fi
- if [[ -n $GITLAB_PRIVATE_TOKEN ]]; then composer config -g --no-plugins --no-interaction gitlab-token.${CI_SERVER_HOST} $GITLAB_PRIVATE_TOKEN; fi - if [[ -n $GITLAB_PRIVATE_TOKEN && -f composer.json ]]; then composer config -g --no-plugins --no-interaction gitlab-token.${CI_SERVER_HOST} $GITLAB_PRIVATE_TOKEN; fi
- if [[ -n $DOCKER_AUTH_CONFIG ]]; then mkdir -p ~/.docker; echo $DOCKER_AUTH_CONFIG > ~/.docker/config.json; fi - if [[ -n $DOCKER_AUTH_CONFIG ]]; then mkdir -p ~/.docker; echo $DOCKER_AUTH_CONFIG > ~/.docker/config.json; fi
.preparecomposerplugins: .preparecomposerplugins:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment