From aa59f4c38c9e3d3a3382fad4572ee548c5cc685b Mon Sep 17 00:00:00 2001 From: Oleg Plakida Date: Thu, 24 Aug 2023 17:25:56 +0100 Subject: [PATCH] paritytech/ci_cd#852: Remove misused artifact instructions --- .gitlab-ci.yml | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c2aee82cd4..3032d34ab8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -58,45 +58,41 @@ variables: - if: $CI_COMMIT_REF_NAME == "main" - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 -# telling gitlab to collect artifacts from artifacts/ folder to path it to other jobs -.collect-artifacts: &collect-artifacts - artifacts: - name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" - when: on_success - expire_in: 2 days - paths: - - artifacts/ - test: stage: test <<: *kubernetes-env <<: *common-refs - <<: *collect-artifacts + cache: + - key: + files: + - package-lock.json + - paths: + - packages/ + - package.json + - package-lock.json script: - - mkdir -p artifacts - cd javascript - npm install # - npm run test - echo testme - - cp -r packages/ ../artifacts/ - - cp package.json ../artifacts/ - - cp package-lock.json ../artifacts/ - - ls -ltr ../artifacts/* build: stage: build <<: *kubernetes-env <<: *common-refs - <<: *collect-artifacts + cache: + - key: + files: + - package-lock.json + - paths: + - packages/ + - package.json + - package-lock.json script: - - mkdir -p artifacts - cd javascript - npm install - npm run clean - npm run build - - cp -r packages/ ../artifacts/ - - cp package.json ../artifacts/ - - cp package-lock.json ../artifacts/ # template task for building and pushing an image .build-push-docker-image: &build-push-docker-image