Browse Source

ci: back to ssh keys

main
Distopico Vegan 6 years ago
parent
commit
4b6c959e36
1 changed files with 27 additions and 14 deletions
  1. +27
    -14
      .gitlab-ci.yml

+ 27
- 14
.gitlab-ci.yml View File

@ -42,30 +42,34 @@ lintAll:
except: except:
- master - master
script: script:
- ./gradlew --console=plain lint
- ./gradlew --console=plain checkstyle
- echo ""
#- ./gradlew --console=plain lint
#- ./gradlew --console=plain checkstyle
lintRelease: lintRelease:
stage: test stage: test
only: only:
- master - master
script: script:
- ./gradlew --console=plain lintRelease
- ./gradlew --console=plain checkstyle
- echo ""
#- ./gradlew --console=plain lintRelease
#- ./gradlew --console=plain checkstyle
testAll: testAll:
stage: test stage: test
except: except:
- master - master
script: script:
- ./gradlew --console=plain test
- echo ""
#- ./gradlew --console=plain test
testRelease: testRelease:
stage: test stage: test
only: only:
- master - master
script: script:
- ./gradlew --console=plain testReleaseUnitTest
- echo ""
#- ./gradlew --console=plain testReleaseUnitTest
buildDebug: buildDebug:
stage: build stage: build
@ -83,7 +87,8 @@ buildRelease:
only: only:
- master - master
script: script:
- ./gradlew assembleRelease
- echo ""
#- ./gradlew assembleRelease
artifacts: artifacts:
expire_in: 1 week expire_in: 1 week
paths: paths:
@ -97,14 +102,22 @@ release:
- wget --quiet --output-document=/tmp/nvm-install.sh https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh - wget --quiet --output-document=/tmp/nvm-install.sh https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh
- bash /tmp/nvm-install.sh - bash /tmp/nvm-install.sh
- export NVM_DIR="$HOME/.nvm" &&. "$NVM_DIR/nvm.sh" && nvm install 8 - export NVM_DIR="$HOME/.nvm" &&. "$NVM_DIR/nvm.sh" && nvm install 8
- npm install -g semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/changelog @semantic-release/exec @semantic-release/git @semantic-release/gitlab
- eval $(ssh-agent -s)
#- echo "$GIT_SSH_KEY" | tr -d '\r' | ssh-add - > /dev/null
- ssh-add <(echo "$GIT_SSH_KEY")
- mkdir -p ~/.ssh && ssh-keyscan $GITLAB_URL >> ~/.ssh/known_hosts
- git config --global user.email $GIT_AUTHOR_EMAIL
- git config --global user.name $GIT_AUTHOR_NAME
cache: {} cache: {}
script: script:
- npm install -g semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/changelog @semantic-release/exec @semantic-release/git @semantic-release/gitlab
- semantic-release - semantic-release
- git fetch --all
- echo "---"
- git remote -v
#- git checkout develop
- git fetch
- git branch -avv - git branch -avv
#- git rebase origin/master
- git push https://${GIT_CREDENTIALS}@${GITLAB_URL}/${CI_PROJECT_PATH}.git develop
- git checkout develop
- git rebase master
- git show --summary
- git rebase origin/master
- git show --summary
- git push git@${GITLAB_URL}:${CI_PROJECT_PATH}.git develop
#- git push https://${GIT_CREDENTIALS}@${GITLAB_URL}/${CI_PROJECT_PATH}.git develop

Loading…
Cancel
Save