Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dbeaf9f8 authored by Alexandre Roux's avatar Alexandre Roux
Browse files

do not send builds when current build is not on server

parent b491bf62
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ build:
    - docker:19.03.1-dind
  script:
  - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME || true
  - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
  - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
  - docker build --cache-from $CI_REGISTRY_IMAGE:latest -t $CI_REGISTRY_IMAGE -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME .
  - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
  - if [ "${CI_COMMIT_REF_NAME}" = master ] ; then docker push $CI_REGISTRY_IMAGE:latest ; fi
+5 −0
Original line number Diff line number Diff line
@@ -64,6 +64,11 @@
        {
            $ret = array();

            if(is_null($this->currentBuild)){
                $this->logger->info("Unable to find current build on server, returning empty array");
                return $ret;
            }

            foreach ($this->builds as $build) {
               
                if (!$build->checkVersion($this->currentBuild)) {