chemtech
@chemtech
Линуксойд, DevOps

Как получать последнюю ревизию кода в gitlab ci?

gitlab ce - бесплатный
gitlab-ci код обычный

build:
  stage: build
  image: maven:3.5.3-jdk-8
  artifacts:
    paths:
    - assembly/target
    expire_in: 1 day
  script:
    - git checkout master
    - git pull
    - git reset --hard $(git describe --abbrev=0 --tags)
    - 'mvn $MAVEN_CLI_OPTS clean package -Dmaven.test.skip=true'


Лог
Running with gitlab-runner 11.5.0 (3afdaba6)
  on xxxxxxx 8565fbca
Using Docker executor with maven:3.5.3-jdk-8 ...
Pulling docker image maven:3.5.3-jdk-8 ...
Using docker image sha256:xxxxxxxxxxxxxxx for maven:3.5.3-jdk-8 ...
Running on runner-8565fbca-project-1557-concurrent-0 via xxxxxxxxxxxxxxxxxxxxx...
Fetching changes...
Removing .m2/repository/
Removing assembly/target/

HEAD is now at edeebaa9b xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Checking out 5fa6a2b7 as int...
Skipping Git submodules setup
Checking cache for int...
No URL provided, cache will be not downloaded from shared cache server. Instead a local version of cache will be extracted. 
Successfully extracted cache
Downloading artifacts for build (18164)...
Downloading artifacts from coordinator... ok        id=18164 responseStatus=200 OK token=jhELvLVJ
$ git checkout master
Previous HEAD position was 5fa6a2b7b... copy npm config to build-tag
Switched to branch 'master'
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
  (use "git pull" to update your local branch)
$ git pull
  • Вопрос задан
  • 189 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы