小编kir*_*nde的帖子

使用 ci/cd 命令行提取或解压 gitlab 中的文件

实际上,我在 gitlab 上有我的 zip 文件,我想使用 gitlab CI/CD 提取这些文件。我在 .gitlab-ci.yml 中尝试过:

image: docker

stages:
  - build
  - test

services:
  - docker:dind

build:
  before_script:
  - apk add p7zip

  script:
  - cd \kmfs
  - 7z x -oChassisA ChassisA.zip
Run Code Online (Sandbox Code Playgroud)

输出

$ apk add p7zip
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
(1/3) Installing libgcc (6.4.0-r9)
(2/3) Installing libstdc++ (6.4.0-r9)
(3/3) Installing p7zip (16.02-r3)
Executing busybox-1.28.4-r3.trigger
OK: 11 MiB in 17 packages
$ cd \kmfs
$ 7z x -oChassisA ChassisA.zip

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor …
Run Code Online (Sandbox Code Playgroud)

continuous-integration extract unzip

5
推荐指数
1
解决办法
8454
查看次数

标签 统计

continuous-integration ×1

extract ×1

unzip ×1