From 3c6636ac7bfb90b6f2f7faaff6bb76908dacbfc2 Mon Sep 17 00:00:00 2001 From: Yaroslav Drachenko Date: Fri, 10 Feb 2023 14:22:29 +0200 Subject: [PATCH] CR-16573 -- fix (#790) * add rootless * Revert "CR-16573 -- rootless (#789)" This reverts commit 059fc5b64bf776430934f522b7f2ab2f0f2b7c8f. * boost pipelines * fix bootsted pipelines * reorganize boosted pipelines * fix arm tagging --- Dockerfile | 11 - Dockerfile-debian | 10 - Dockerfile-debian-rootless | 50 +++++ Dockerfile-rootless | 49 +++++ codefresh-arm.yml | 149 ++++++++++++++ codefresh-release.yml | 69 +++++++ codefresh.yml | 189 ++++++++++++++++-- .../cli/commands/pipeline/run.local.js | 9 - package.json | 2 +- 9 files changed, 487 insertions(+), 51 deletions(-) create mode 100644 Dockerfile-debian-rootless create mode 100644 Dockerfile-rootless diff --git a/Dockerfile b/Dockerfile index 8c97efa69..52ad07e0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,15 +35,4 @@ RUN yarn generate-completion RUN ln -s $(pwd)/lib/interface/cli/codefresh /usr/local/bin/codefresh RUN codefresh components update --location components - -# we keep /root as home directory because cli by default looks for $HOME/.cfconfig -# and we do not want to break user automation if he used to bind his .cfconfig -# to the /root/.cfconfig -RUN adduser -D -h /root -s /bin/sh cfu \ - && chown -R $(id -g cfu) /root /cf-cli \ - && chgrp -R $(id -g cfu) /root /cf-cli \ - && chmod -R g+rwX /root - -USER cfu - ENTRYPOINT ["codefresh"] diff --git a/Dockerfile-debian b/Dockerfile-debian index 955158b99..f610e2b7c 100644 --- a/Dockerfile-debian +++ b/Dockerfile-debian @@ -37,14 +37,4 @@ RUN ln -s $(pwd)/lib/interface/cli/codefresh /usr/local/bin/codefresh RUN codefresh components update --location components -# we keep /root as home directory because cli by default looks for $HOME/.cfconfig -# and we do not want to break user automation if he used to bind his .cfconfig -# to the /root/.cfconfig -RUN useradd -m -d /root -s /bin/sh cfu \ - && chown -R $(id -g cfu) /root /cf-cli \ - && chgrp -R $(id -g cfu) /root /cf-cli \ - && chmod -R g+rwX /root - -USER cfu - ENTRYPOINT ["codefresh"] diff --git a/Dockerfile-debian-rootless b/Dockerfile-debian-rootless new file mode 100644 index 000000000..955158b99 --- /dev/null +++ b/Dockerfile-debian-rootless @@ -0,0 +1,50 @@ +# go hub binary +FROM golang:alpine as go +RUN apk --update add ca-certificates git +RUN go install github.com/github/hub@latest + +# python yq binary +FROM six8/pyinstaller-alpine:alpine-3.6-pyinstaller-v3.4 as yq +ARG YQ_VERSION=2.10.0 +ENV PATH="/pyinstaller:$PATH" +RUN pip install yq==${YQ_VERSION} +RUN pyinstaller --noconfirm --onefile --log-level DEBUG --clean --distpath /tmp/ $(which yq) + +# Main +FROM node:18.12.1-bullseye-slim + +RUN apt update +RUN apt -y install ca-certificates git curl bash jq busybox && ln -s /bin/busybox /usr/bin/[[ + +COPY --from=go /go/bin/hub /usr/local/bin/hub +COPY --from=yq /tmp/yq /usr/local/bin/yq + +WORKDIR /cf-cli + +COPY package.json /cf-cli +COPY yarn.lock /cf-cli +COPY check-version.js /cf-cli +COPY run-check-version.js /cf-cli + +RUN yarn install --prod --frozen-lockfile && \ + yarn cache clean + +COPY . /cf-cli + +RUN yarn generate-completion + +RUN ln -s $(pwd)/lib/interface/cli/codefresh /usr/local/bin/codefresh + +RUN codefresh components update --location components + +# we keep /root as home directory because cli by default looks for $HOME/.cfconfig +# and we do not want to break user automation if he used to bind his .cfconfig +# to the /root/.cfconfig +RUN useradd -m -d /root -s /bin/sh cfu \ + && chown -R $(id -g cfu) /root /cf-cli \ + && chgrp -R $(id -g cfu) /root /cf-cli \ + && chmod -R g+rwX /root + +USER cfu + +ENTRYPOINT ["codefresh"] diff --git a/Dockerfile-rootless b/Dockerfile-rootless new file mode 100644 index 000000000..8c97efa69 --- /dev/null +++ b/Dockerfile-rootless @@ -0,0 +1,49 @@ +# go hub binary +FROM golang:alpine as go +RUN apk --update add ca-certificates git +RUN go install github.com/github/hub@latest + +# python yq binary +FROM six8/pyinstaller-alpine:alpine-3.6-pyinstaller-v3.4 as yq +ARG YQ_VERSION=2.10.0 +ENV PATH="/pyinstaller:$PATH" +RUN pip install yq==${YQ_VERSION} +RUN pyinstaller --noconfirm --onefile --log-level DEBUG --clean --distpath /tmp/ $(which yq) + +# Main +FROM node:18.12.1-alpine3.15 + +RUN apk --update add --no-cache ca-certificates git curl bash jq + +COPY --from=go /go/bin/hub /usr/local/bin/hub +COPY --from=yq /tmp/yq /usr/local/bin/yq + +WORKDIR /cf-cli + +COPY package.json /cf-cli +COPY yarn.lock /cf-cli +COPY check-version.js /cf-cli +COPY run-check-version.js /cf-cli + +RUN yarn install --prod --frozen-lockfile && \ + yarn cache clean + +COPY . /cf-cli + +RUN yarn generate-completion + +RUN ln -s $(pwd)/lib/interface/cli/codefresh /usr/local/bin/codefresh + +RUN codefresh components update --location components + +# we keep /root as home directory because cli by default looks for $HOME/.cfconfig +# and we do not want to break user automation if he used to bind his .cfconfig +# to the /root/.cfconfig +RUN adduser -D -h /root -s /bin/sh cfu \ + && chown -R $(id -g cfu) /root /cf-cli \ + && chgrp -R $(id -g cfu) /root /cf-cli \ + && chmod -R g+rwX /root + +USER cfu + +ENTRYPOINT ["codefresh"] diff --git a/codefresh-arm.yml b/codefresh-arm.yml index e4212baba..92741b99b 100644 --- a/codefresh-arm.yml +++ b/codefresh-arm.yml @@ -1,6 +1,13 @@ version: "1.0" +mode: parallel +stages: + - prepare + - build + - push-dev + - push-master steps: main_clone: + stage: prepare title: 'Cloning main repository...' type: git-clone repo: ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}} @@ -8,6 +15,7 @@ steps: git: ${{GIT_CONTEXT}} build_image: + stage: build type: parallel steps: @@ -29,7 +37,31 @@ steps: image_name: ${{IMAGE_NAME}} tag: ${{CF_SHORT_REVISION}}${{DEBIAN_TAG_POSTFIX}} + build_image_alpine_rootless: + title: "Building the alpine image..." + type: build + working_directory: ${{WORKDIR}} + disable_push: true + dockerfile: ./Dockerfile-rootless + image_name: ${{IMAGE_NAME}} + tag: ${{CF_SHORT_REVISION}}${{ROOTLESS_TAG_POSTFIX}} + + build_image_debian_rootless: + title: "Building the debian image..." + type: build + working_directory: ${{WORKDIR}} + disable_push: true + dockerfile: ./Dockerfile-debian-rootless + image_name: ${{IMAGE_NAME}} + tag: ${{CF_SHORT_REVISION}}${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}} + when: + steps: + - name: main_clone + on: + - success + push_dev_alpine: + stage: push-dev type: push candidate: ${{build_image_alpine}} title: "Pushing alpine image to registry with revision tag" @@ -44,8 +76,14 @@ steps: push_gcr_enterprise_dev: registry: "${{REGISTRY_INTEGRATION_ENTERPRISE}}" title: "Pushing image to gcr.io registry with revision tag" + when: + steps: + - name: build_image + on: + - success push_dev_debian: + stage: push-dev type: push candidate: ${{build_image_debian}} title: "Pushing debian image to registry with revision tag" @@ -60,14 +98,68 @@ steps: push_gcr_enterprise_dev_debian: registry: "${{REGISTRY_INTEGRATION_ENTERPRISE}}" title: "Pushing image to gcr.io registry with revision tag" + when: + steps: + - name: build_image + on: + - success + + push_dev_alpine_rootless: + stage: push-dev + type: push + candidate: ${{build_image_alpine_rootless}} + title: "Pushing rootless alpine image to registry with revision tag" + tag: ${{CF_SHORT_REVISION}}${{ROOTLESS_TAG_POSTFIX}}${{ARM_TAG_POSTFIX}} + scale: + push_quay_dev_rootless: + registry: "${{REGISTRY_INTEGRATION_QUAY}}" + title: "Pushing image to quay.io registry with revision tag" + push_dockerhub_dev_rootless: + registry: "${{REGISTRY_INTEGRATION_DOCKERHUB}}" + title: "Pushing image to dockerhub registry with revision tag" + push_gcr_enterprise_dev_rootless: + registry: "${{REGISTRY_INTEGRATION_ENTERPRISE}}" + title: "Pushing image to gcr.io registry with revision tag" + when: + steps: + - name: build_image + on: + - success + + push_dev_debian_rootless: + stage: push-dev + type: push + candidate: ${{build_image_debian_rootless}} + title: "Pushing rootless debian image to registry with revision tag" + tag: ${{CF_SHORT_REVISION}}${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}}${{ARM_TAG_POSTFIX}} + scale: + push_quay_dev_debian_rootless: + registry: "${{REGISTRY_INTEGRATION_QUAY}}" + title: "Pushing image to quay.io registry with revision tag" + push_dockerhub_dev_debian_rootless: + registry: "${{REGISTRY_INTEGRATION_DOCKERHUB}}" + title: "Pushing image to dockerhub registry with revision tag" + push_gcr_enterprise_dev_debian_rootless: + registry: "${{REGISTRY_INTEGRATION_ENTERPRISE}}" + title: "Pushing image to gcr.io registry with revision tag" + when: + steps: + - name: build_image + on: + - success push_master_alpine: + stage: push-master type: push candidate: ${{build_image_alpine}} title: "Pushing alpine image with release tag" when: branch: only: [ master ] + steps: + - name: build_image + on: + - success tags: - "${{PACKAGE_VERSION}}${{ARM_TAG_POSTFIX}}" - "latest${{ARM_TAG_POSTFIX}}" @@ -83,12 +175,17 @@ steps: title: "Pushing image to gcr.io registry with release tag" push_master_debian: + stage: push-master type: push candidate: ${{build_image_debian}} title: "Pushing debian image with release tag" when: branch: only: [ master ] + steps: + - name: build_image + on: + - success tags: - "${{PACKAGE_VERSION}}${{DEBIAN_TAG_POSTFIX}}${{ARM_TAG_POSTFIX}}" - "latest${{DEBIAN_TAG_POSTFIX}}${{ARM_TAG_POSTFIX}}" @@ -102,3 +199,55 @@ steps: push_gcr_enterprise_prod_debian: registry: "${{REGISTRY_INTEGRATION_ENTERPRISE}}" title: "Pushing image to gcr.io registry with release tag" + + push_master_alpine_rootless: + stage: push-master + type: push + candidate: ${{build_image_alpine_rootless}} + title: "Pushing rootless alpine image with release tag" + when: + branch: + only: [ master ] + steps: + - name: build_image + on: + - success + tags: + - "${{PACKAGE_VERSION}}${{ROOTLESS_TAG_POSTFIX}}${{ARM_TAG_POSTFIX}}" + - "latest${{ROOTLESS_TAG_POSTFIX}}${{ARM_TAG_POSTFIX}}" + scale: + push_quay_prod_rootless: + registry: "${{REGISTRY_INTEGRATION_QUAY}}" + title: "Pushing alpine image to quay.io registry with release tag" + push_dockerhub_prod_rootless: + registry: "${{REGISTRY_INTEGRATION_DOCKERHUB}}" + title: "Pushing image to dockerhub registry with release tag" + push_gcr_enterprise_prod_rootless: + registry: "${{REGISTRY_INTEGRATION_ENTERPRISE}}" + title: "Pushing image to gcr.io registry with release tag" + + push_master_debian_rootless: + stage: push-master + type: push + candidate: ${{build_image_debian_rootless}} + title: "Pushing rootless debian image with release tag" + when: + branch: + only: [ master ] + steps: + - name: build_image + on: + - success + tags: + - "${{PACKAGE_VERSION}}${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}}${{ARM_TAG_POSTFIX}}" + - "latest${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}}${{ARM_TAG_POSTFIX}}" + scale: + push_quay_prod_debian_rootless: + registry: "${{REGISTRY_INTEGRATION_QUAY}}" + title: "Pushing image to quay.io registry with release tag" + push_dockerhub_prod_debian_rootless: + registry: "${{REGISTRY_INTEGRATION_DOCKERHUB}}" + title: "Pushing image to dockerhub registry with release tag" + push_gcr_enterprise_prod_debian_rootless: + registry: "${{REGISTRY_INTEGRATION_ENTERPRISE}}" + title: "Pushing image to gcr.io registry with release tag" diff --git a/codefresh-release.yml b/codefresh-release.yml index 196cbf479..0e882c15f 100644 --- a/codefresh-release.yml +++ b/codefresh-release.yml @@ -124,6 +124,59 @@ steps: on: - success + # in case the candidate image will not be found the release flow will crash and this means that the build pipelines has failed + push_step_alpine_rootless: + stage: docker + type: push + title: "Push alpine release image" + image_name: codefresh/cli + tags: + - ${{PACKAGE_VERSION}}${{ROOTLESS_TAG_POSTFIX}} + - latest${{ROOTLESS_TAG_POSTFIX}} + scale: + push_to_dockerhub_alpine_rootless: + registry: dockerhub + title: "push to dockerhub" + candidate: codefresh/cli:${{CF_SHORT_REVISION}}${{ROOTLESS_TAG_POSTFIX}} + push_to_gcr_alpine_rootless: + title: "push to gcr" + candidate: gcr.io/codefresh-inc/codefresh/cli:${{CF_SHORT_REVISION}}${{ROOTLESS_TAG_POSTFIX}} + push_to_quay_alpine_rootless: + registry: cf-quay + title: "push to quay.io" + candidate: quay.io/codefresh/cli:${{CF_SHORT_REVISION}}${{ROOTLESS_TAG_POSTFIX}} + when: + steps: + - name: extract_version + on: + - success + + push_step_debian_rootless: + stage: docker + type: push + title: "Push debian release image" + image_name: codefresh/cli + tags: + - ${{PACKAGE_VERSION}}${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}} + - latest${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}} + scale: + push_to_dockerhub_debian_rootless: + registry: dockerhub + title: "push to dockerhub" + candidate: codefresh/cli:${{CF_SHORT_REVISION}}${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}} + push_to_gcr_debian_rootless: + title: "push to gcr" + candidate: gcr.io/codefresh-inc/codefresh/cli:${{CF_SHORT_REVISION}}${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}} + push_to_quay_debian_rootless: + registry: cf-quay + title: "push to quay.io" + candidate: quay.io/codefresh/cli:${{CF_SHORT_REVISION}}${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}} + when: + steps: + - name: extract_version + on: + - success + create_manifest_list: stage: docker type: "codefresh-inc/multiarch-manifester" @@ -153,6 +206,16 @@ steps: tags: - ${{PACKAGE_VERSION}}${{DEBIAN_TAG_POSTFIX}} - latest${{DEBIAN_TAG_POSTFIX}} + master_branch_tags_alpine_rootless: + arguments: + tags: + - ${{PACKAGE_VERSION}}${{ROOTLESS_TAG_POSTFIX}} + - latest${{ROOTLESS_TAG_POSTFIX}} + master_branch_tags_debian_rootless: + arguments: + tags: + - ${{PACKAGE_VERSION}}${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}} + - latest${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}} when: steps: - name: push_step_alpine @@ -161,6 +224,12 @@ steps: - name: push_step_debian on: - success + - name: push_step_alpine_rootless + on: + - success + - name: push_step_debian_rootless + on: + - success compile_executables: stage: build diff --git a/codefresh.yml b/codefresh.yml index 81e3d0499..f6875ef16 100644 --- a/codefresh.yml +++ b/codefresh.yml @@ -1,9 +1,17 @@ # this pipeline should not be run on version tag releases (it may cause a non correct sha to override version tagged image in dockerhub) version: "1.0" - +mode: parallel +stages: + - prepare + - test + - build + - push + - docker + - final steps: main_clone: + stage: prepare title: 'Cloning main repository...' type: git-clone repo: codefresh-io/cli @@ -11,14 +19,21 @@ steps: git: cf_github extract_version: + stage: prepare title: "Exporting package.json version" image: codefresh/build-cli commands: - 'export PACKAGE_VERSION=$(jq -r ".version" package.json)' - "echo Current version: $PACKAGE_VERSION" - "cf_export PACKAGE_VERSION" + when: + steps: + - name: main_clone + on: + - success check_version: + stage: prepare title: 'Checking if version already exists' image: codefresh/build-cli fail_fast: false @@ -37,14 +52,25 @@ steps: condition: all: skipVersionCheck: '"${{SKIP_VERSION_CHECK}}" != "true"' + steps: + - name: extract_version + on: + - success install_dependencies: + stage: test title: 'Installing testing dependencies' image: codefresh/build-cli commands: - yarn install --frozen-lockfile + when: + steps: + - name: extract_version + on: + - success parallel_tests: + stage: test type: parallel steps: eslint: @@ -71,8 +97,13 @@ steps: when: branch: ignore: [ master ] + steps: + - name: install_dependencies + on: + - success build_images: + stage: build type: parallel steps: @@ -88,27 +119,52 @@ steps: image-name: codefresh/cli tag: ${{CF_BRANCH_TAG_NORMALIZED}}${{DEBIAN_TAG_POSTFIX}} - run_arm_build: - type: codefresh-run - arguments: - PIPELINE_ID: codefresh-io/cli/build-arm - TRIGGER_ID: codefresh-io/cli - BRANCH: ${{CF_BRANCH}} - DETACH: false - VARIABLE: - - CF_REPO_OWNER=${{CF_REPO_OWNER}} - - CF_REPO_NAME=${{CF_REPO_NAME}} - - CF_REVISION=${{CF_REVISION}} - - CF_BRANCH=${{CF_BRANCH}} - - CF_SHORT_REVISION=${{CF_SHORT_REVISION}} - - GIT_CONTEXT=cf_github - - IMAGE_NAME=codefresh/cli - - WORKDIR=${{CF_VOLUME_PATH}}/${{CF_REPO_NAME}} - - ARM_TAG_POSTFIX="${{ARM_TAG_POSTFIX}}" - - DEBIAN_TAG_POSTFIX="${{DEBIAN_TAG_POSTFIX}}" - - PACKAGE_VERSION=${{PACKAGE_VERSION}} + build_step_alpine_rootless: + type: build + dockerfile: Dockerfile-rootless + image-name: codefresh/cli + tag: ${{CF_BRANCH_TAG_NORMALIZED}}${{ROOTLESS_TAG_POSTFIX}} + + build_step_debian_rootless: + type: build + dockerfile: Dockerfile-debian-rootless + image-name: codefresh/cli + tag: ${{CF_BRANCH_TAG_NORMALIZED}}${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}} + when: + steps: + - name: extract_version + on: + - success + + run_arm_build: + stage: build + type: codefresh-run + arguments: + PIPELINE_ID: codefresh-io/cli/build-arm + TRIGGER_ID: codefresh-io/cli + BRANCH: ${{CF_BRANCH}} + DETACH: false + VARIABLE: + - CF_REPO_OWNER=${{CF_REPO_OWNER}} + - CF_REPO_NAME=${{CF_REPO_NAME}} + - CF_REVISION=${{CF_REVISION}} + - CF_BRANCH=${{CF_BRANCH}} + - CF_SHORT_REVISION=${{CF_SHORT_REVISION}} + - GIT_CONTEXT=cf_github + - IMAGE_NAME=codefresh/cli + - WORKDIR=${{CF_VOLUME_PATH}}/${{CF_REPO_NAME}} + - ARM_TAG_POSTFIX="${{ARM_TAG_POSTFIX}}" + - DEBIAN_TAG_POSTFIX="${{DEBIAN_TAG_POSTFIX}}" + - ROOTLESS_TAG_POSTFIX="${{ROOTLESS_TAG_POSTFIX}}" + - PACKAGE_VERSION=${{PACKAGE_VERSION}} + when: + steps: + - name: extract_version + on: + - success push_step_alpine: + stage: push type: push tag: '${{CF_SHORT_REVISION}}' candidate: ${{build_step_alpine}} @@ -121,8 +177,14 @@ steps: push_to_quay: registry: cf-quay title: "push to quay.io" + when: + steps: + - name: build_images + on: + - success push_step_debian: + stage: push type: push tag: '${{CF_SHORT_REVISION}}${{DEBIAN_TAG_POSTFIX}}' candidate: ${{build_step_debian}} @@ -135,8 +197,54 @@ steps: push_to_quay_debian: registry: cf-quay title: "push to quay.io" + when: + steps: + - name: build_images + on: + - success + + push_step_alpine_rootless: + stage: push + type: push + tag: '${{CF_SHORT_REVISION}}${{ROOTLESS_TAG_POSTFIX}}' + candidate: ${{build_step_alpine_rootless}} + scale: + push_to_dockerhub_rootless: + registry: dockerhub + title: "push to dockerhub" + push_to_gcr_rootless: + title: "push to gcr" + push_to_quay_rootless: + registry: cf-quay + title: "push to quay.io" + when: + steps: + - name: build_images + on: + - success + + push_step_debian_rootless: + stage: push + type: push + tag: '${{CF_SHORT_REVISION}}${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}}' + candidate: ${{build_step_debian_rootless}} + scale: + push_to_dockerhub_debian_rootless: + registry: dockerhub + title: "push to dockerhub" + push_to_gcr_debian_rootless: + title: "push to gcr" + push_to_quay_debian_rootless: + registry: cf-quay + title: "push to quay.io" + when: + steps: + - name: build_images + on: + - success create_manifest_list: + stage: docker type: "codefresh-inc/multiarch-manifester" arguments: image_name: codefresh/cli @@ -168,8 +276,40 @@ steps: arguments: tags: - ${{CF_SHORT_REVISION}}${{DEBIAN_TAG_POSTFIX}} + dev_branches_tags_rootless: + when: + branch: + ignore: [ master ] + arguments: + tags: + - ${{CF_SHORT_REVISION}}${{ROOTLESS_TAG_POSTFIX}} + dev_branches_tags_debian_rootless: + when: + branch: + ignore: [ master ] + arguments: + tags: + - ${{CF_SHORT_REVISION}}${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}} + when: + steps: + - name: push_step_alpine + on: + - success + - name: push_step_debian + on: + - success + - name: push_step_alpine_rootless + on: + - success + - name: push_step_debian_rootless + on: + - success + - name: run_arm_build + on: + - success fail_on_bad_version: + stage: final image: codefresh/build-cli commands: - exit 1 @@ -177,8 +317,13 @@ steps: condition: all: versionCheckFailed: steps.check_version.result == 'failure' + steps: + - name: create_manifest_list + on: + - success execute_release_pipeline: + stage: final title: "Execute release pipeline in case version was changed" type: codefresh-run arguments: @@ -193,3 +338,7 @@ steps: condition: all: versionCheckSucceeded: steps.check_version.result != 'failure' + steps: + - name: create_manifest_list + on: + - success diff --git a/lib/interface/cli/commands/pipeline/run.local.js b/lib/interface/cli/commands/pipeline/run.local.js index 144758b9d..b420411e4 100644 --- a/lib/interface/cli/commands/pipeline/run.local.js +++ b/lib/interface/cli/commands/pipeline/run.local.js @@ -67,15 +67,6 @@ class RunLocalCommand extends RunBaseCommand { this.docker.modem.followProgress(stream, onFinished, onProgress); } }); - }).catch((err) => { - if (err && _.includes(err.message, 'connect EACCES /var/run/docker.sock')) { - const message = 'Could not access /var/run/docker.sock. Warning: If you are trying to run Codefresh CLI ' - + 'through the docker container please consider to add option `--user root` to the `docker run` command. ' - + 'Recently we updated our Codefresh CLI images to run with rootless user and in order to access ' - + '/var/run/docker.sock you need to have root permissions.'; - return Promise.reject(new Error(message)); - } - return Promise.reject(err); }); } async runImpl(request) { diff --git a/package.json b/package.json index d1ec7a119..e3c1e4809 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codefresh", - "version": "0.82.0", + "version": "0.82.1", "description": "Codefresh command line utility", "main": "index.js", "preferGlobal": true,