File tree 1 file changed +18
-18
lines changed
1 file changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -13,21 +13,22 @@ jobs:
13
13
name : Install Dependencies
14
14
command : npm install
15
15
16
- # Ensure ./dist directory exists
16
+ # Create artifacts in /tmp
17
17
- run :
18
- name : Create Dist Directory
19
- command : mkdir -p ./dist
18
+ name : Create Artifacts
19
+ command : |
20
+ echo "Dummy Artifact Content" > /tmp/dummy.txt
21
+ mkdir /tmp/artifacts
22
+ echo "Additional Artifact Content" > /tmp/artifacts/extra.txt
20
23
21
- # Create a dummy artifact (text file) for example
22
- - run :
23
- name : Create Dummy Artifact
24
- command : echo "Dummy Artifact Content" > ./dist/dummy.txt
24
+ # Store artifacts
25
+ - store_artifacts :
26
+ path : /tmp/dummy.txt
27
+ destination : artifacts
25
28
26
- # Save artifacts to workspace
27
- - persist_to_workspace :
28
- root : .
29
- paths :
30
- - ./dist # Assuming your build output is in a 'dist' directory
29
+ - store_artifacts :
30
+ path : /tmp/artifacts
31
+ destination : artifacts
31
32
32
33
test :
33
34
docker :
@@ -36,19 +37,18 @@ jobs:
36
37
steps :
37
38
- checkout
38
39
39
- # Restore dependencies
40
- - run :
41
- name : Install Dependencies
42
- command : npm install
43
-
44
40
# Attach workspace to access artifacts
45
41
- attach_workspace :
46
42
at : .
47
43
48
44
# Run your test steps using the artifacts from the workspace...
49
45
- run :
50
46
name : Display Dummy Artifact Content
51
- command : cat ./dist/dummy.txt
47
+ command : cat ./artifacts/dummy.txt
48
+
49
+ - run :
50
+ name : Display Additional Artifact Content
51
+ command : cat ./artifacts/extra.txt
52
52
53
53
workflows :
54
54
version : 2
You can’t perform that action at this time.
0 commit comments