惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threatpost
S
Securelist
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Threat Research - Cisco Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tenable Blog
I
Intezer
G
GRAHAM CLULEY
Spread Privacy
Spread Privacy
T
Tor Project blog
V
Vulnerabilities – Threatpost
NISL@THU
NISL@THU
L
Lohrmann on Cybersecurity
Schneier on Security
Schneier on Security
MyScale Blog
MyScale Blog
The GitHub Blog
The GitHub Blog
S
Security @ Cisco Blogs
The Register - Security
The Register - Security
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
L
LangChain Blog
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
MongoDB | Blog
MongoDB | Blog
小众软件
小众软件
The Hacker News
The Hacker News
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
U
Unit 42
博客园 - 叶小钗
Attack and Defense Labs
Attack and Defense Labs
Webroot Blog
Webroot Blog
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
H
Hackread – Cybersecurity News, Data Breaches, AI and More
aimingoo的专栏
aimingoo的专栏
T
Troy Hunt's Blog
V
Visual Studio Blog
P
Proofpoint News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
A
Arctic Wolf
T
The Exploit Database - CXSecurity.com
宝玉的分享
宝玉的分享
Vercel News
Vercel News
D
DataBreaches.Net
P
Palo Alto Networks Blog
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

CodeBlocQ

Jest - Mock Local Storage Have Mobx and React work with TypeScript Loose assertions on arguments passed to function with Jest TypeScript Abstract Class Check if a Docker image exists locally A-Star Pathfinding React Demo My Free and Open Source Expense Tracker App is on the App Store How to start a tech company as a non technical individual Setup gitment on your Hexo blog
Pass artifacts around in between stages in gitlab CI
Jonathan Klughertz · 2019-03-24 · via CodeBlocQ

Use the artifacts property to pass build artifacts from one build stage down to all the following stages.

.gitlab-cy.yml
stages:
- stage_1
- stage_2

one:
stage: stage_1
script:
- echo "File 1" >> ./file1.txt
- echo "File 2" >> ./file2.txt
- mkdir dir1
- echo "dir1 File" >> ./dir1/file.txt
- mkdir dir2
- echo "dir2 File" >> ./dir2/file.txt
artifacts:
paths:
- file1.txt
- dir1/

two:
stage: stage_2
script:
- ls
- ls dir1
- cat file1.txt
- cat dir1/file.txt

In the .gitlab-ci.yml above we are defining a build with 2 stages.

In stage_1 we are creating 4 files:

.
├── dir1
│   └── file.txt
├── dir2
│   └── file.txt
├── file1.txt
└── file2.txt

In stage_2, the following files files (created in stage_1) are available:

.
├── dir1
│   └── file.txt
├── file1.txt

The magic happens in the artifacts section of stage_1:

artifacts:
paths:
- file1.txt
- dir1/

which means pass file1.txt and the dir1 folder (+ it’s content) to all the following stages.