Skip to content

Commit

Permalink
paritytech/ci_cd#852: Remove misused artifact instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Plakida committed Aug 24, 2023
1 parent ee56564 commit b28f3d4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
32 changes: 12 additions & 20 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ variables:
BUILDAH_IMAGE: "quay.io/buildah/stable:v1.29"
BUILDAH_COMMAND: "buildah --storage-driver overlay2"
RUN_IN_CONTAINER: "1"
# Improve gitlab cache performance
CACHE_COMPRESSION_LEVEL: "fastest"
FF_USE_FASTZIP: "true"

cache:
- key:
files:
- javascript/package-lock.json
- paths:
- javascript/packages/
- javascript/package.json
- javascript/package-lock.json

.kubernetes-env: &kubernetes-env
image: $CI_IMAGE
Expand Down Expand Up @@ -58,45 +70,25 @@ 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
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
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
Expand Down
6 changes: 3 additions & 3 deletions scripts/ci/docker/zombienet_injected.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ RUN groupadd --gid 10001 nonroot && \
--uid 10000 nonroot

WORKDIR /home/nonroot/zombie-net
COPY ./artifacts/packages ./packages
COPY javascript/packages ./packages
COPY scripts ./scripts
COPY tests ./tests
COPY artifacts/package.json ./
COPY artifacts/package-lock.json ./
COPY javascript/package.json ./
COPY javascript/package-lock.json ./
RUN npm install --production
RUN chown -R nonroot. /home/nonroot

Expand Down

0 comments on commit b28f3d4

Please sign in to comment.