This is an automated email from the git hooks/post-receive script. New commit to branch bow-v2-go in repository bow. See https://gitlab.nuiton.org/chorem/bow.git commit 1f833bc411f260fd89dd76816e4c497e65574026 Author: Andrés Maldonado <maldonado@codelutin.com> Date: Thu Dec 9 11:55:21 2021 +0100 Factoriser .gitab-ci.yml --- .gitlab-ci.yml | 49 +++++++++++++---------------------------------- docker/docker-compose.yml | 2 +- 2 files changed, 14 insertions(+), 37 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 01a23ab..6850ad6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,42 +4,19 @@ stages: default: before_script: - - export IMAGE_NAME=$CI_REGISTRY_IMAGE:${CI_COMMIT_REF_SLUG/master/latest} + # En définissant un before_script, celui du template est effacé. Il faut donc définir à nouveau 'IMAGE_NAME' + - export IMAGE_NAME=$CI_REGISTRY_IMAGE:${CI_COMMIT_REF_SLUG/$CI_DEFAULT_BRANCH/latest} + - mkdir -p docker/configs + - cat readability-js/*.js > docker/configs/readability.js -generate-readability: - image: registry.nuiton.org/codelutin/dockerfiles:docker - stage: build - script: - - mkdir -p docker/script - - cat readability-js/*.js > docker/script/readability.js - artifacts: - paths: - - docker/script/readability.js +variables: + TARGET: saas + DEPLOY_DIR: docker + DOCKERFILE: docker/Dockerfile -dockerise: - image: registry.nuiton.org/codelutin/dockerfiles:docker - stage: build - script: - - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - - docker build -t $IMAGE_NAME -f docker/Dockerfile . - - docker push $IMAGE_NAME - - docker logout $CI_REGISTRY - tags: - - docker +include: + - project: 'codelutin/ci' + file: + - '/swarm/swarm-deployer.yml' + - '/swarm/build.yml' -deploy: - image: registry.nuiton.org/codelutin/swarm-deployer - when: manual - stage: deploy - script: - - export ZIP_NAME=$CI_PROJECT_NAME-${CI_COMMIT_REF_SLUG/master/latest}.zip - - export STACK_FILE=_stack.yml - - cd docker - - cat docker-compose.yml | envsubst > $STACK_FILE - - FILES="$STACK_FILE" - - for f in script config secret; do if [ -d $f ]; then FILES="$FILES $f"; fi; done - - zip -r $ZIP_NAME $FILES - - curl -F "name=$CI_PROJECT_NAME" -F "flavour=$CI_COMMIT_REF_SLUG" -F "target=saas" -F "info=${CI_COMMIT_REF_SLUG/master/latest}(${CI_COMMIT_SHORT_SHA}) - $CI_COMMIT_MESSAGE" -F "composeFile=$STACK_FILE" -F "zip=@$ZIP_NAME" "https://swarm-deployer.cloud.codelutin.com/api/v1/projects?swarm-deployer-to..." - environment: - name: ${CI_BUILD_REF_NAME} - url: https://bookmarks.cl diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 246f4ae..895d1df 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -18,7 +18,7 @@ volumes: configs: readability_script_js: - file: script/readability.js + file: configs/readability.js services: bow: -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.