Skip to content
Snippets Groups Projects
Commit f772760e authored by Lene Wasskog's avatar Lene Wasskog
Browse files

Update .gitlab-ci.yml file

parent 4e35cfed
Branches
Tags
No related merge requests found
Pipeline #6297 passed
...@@ -6,7 +6,7 @@ stages: ...@@ -6,7 +6,7 @@ stages:
- upload - upload
variables: variables:
COMMON_CONFIG_REMOTE: https://root:$CONFIG_ACCESS_TOKEN@$CI_SERVER_HOST/VIPS/vips-common-config.git COMMON_CONFIG_REMOTE: https://oauth2:$CICD_ACCESS_TOKEN@$CI_SERVER_HOST/VIPS/vips-common-config.git
COMMON_CONFIG_LOCAL: "vips-common-config" COMMON_CONFIG_LOCAL: "vips-common-config"
SETTINGS_XML: "ci_settings.xml" SETTINGS_XML: "ci_settings.xml"
MAVEN_POM: "-f pom.xml" MAVEN_POM: "-f pom.xml"
...@@ -29,7 +29,7 @@ before_script: ...@@ -29,7 +29,7 @@ before_script:
- git config --global user.name "${GITLAB_USER_NAME}" - git config --global user.name "${GITLAB_USER_NAME}"
- git config --global user.email "${GITLAB_USER_EMAIL}" - git config --global user.email "${GITLAB_USER_EMAIL}"
- echo "Get common settings" - echo "Get common settings"
- git clone $COMMON_CONFIG_REMOTE $COMMON_CONFIG_LOCAL - git clone --depth=1 "$COMMON_CONFIG_REMOTE" "$COMMON_CONFIG_LOCAL"
- cp $COMMON_CONFIG_LOCAL/$SETTINGS_XML . - cp $COMMON_CONFIG_LOCAL/$SETTINGS_XML .
- rm -rf $COMMON_CONFIG_LOCAL - rm -rf $COMMON_CONFIG_LOCAL
- apt-get update -y && apt-get install -y python3 && apt-get install -y rsync openssh-client - apt-get update -y && apt-get install -y python3 && apt-get install -y rsync openssh-client
...@@ -50,10 +50,10 @@ build-for-staging: ...@@ -50,10 +50,10 @@ build-for-staging:
build-for-production: build-for-production:
stage: build stage: build
script: script:
# Use access token given by CI/CD variable ACCESS_TOKEN to authenticate # Use access token given by CI/CD variable CICD_ACCESS_TOKEN to authenticate
# This is necessary in order to push changes to git # This is necessary in order to push changes to git
- &authenticate - &authenticate
- export NEW_REPO_URL=https://root:$ACCESS_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH.git - export NEW_REPO_URL=https://oauth2:$CICD_ACCESS_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH.git
- git remote set-url --push origin $NEW_REPO_URL - git remote set-url --push origin $NEW_REPO_URL
- git fetch origin --prune --prune-tags - git fetch origin --prune --prune-tags
...@@ -203,9 +203,9 @@ deploy-to-production: ...@@ -203,9 +203,9 @@ deploy-to-production:
upload-and-tag-release: upload-and-tag-release:
stage: upload stage: upload
script: script:
# Use access token given by CI/CD variable ACCESS_TOKEN to authenticate # Use access token given by CI/CD variable CICD_ACCESS_TOKEN to authenticate
# This is necessary in order to push changes to git # This is necessary in order to push changes to git
- export NEW_REPO_URL=https://root:$ACCESS_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH.git - export NEW_REPO_URL=https://oauth2:$CICD_ACCESS_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH.git
- git remote set-url --push origin $NEW_REPO_URL - git remote set-url --push origin $NEW_REPO_URL
- git fetch origin --prune --prune-tags - git fetch origin --prune --prune-tags
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment