File tree Expand file tree Collapse file tree 1 file changed +10
-15
lines changed Expand file tree Collapse file tree 1 file changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -15,38 +15,33 @@ jobs:
15
15
name : Build Docker image
16
16
command : |
17
17
docker build -t $IMAGE_NAME:latest .
18
- - run :
19
- name : Archive Docker image
20
- command : docker save -o image.tar $IMAGE_NAME
21
- - persist_to_workspace :
22
- root : .
23
- paths :
24
- - ./image.tar
18
+
25
19
publish-latest :
26
20
executor : docker-publisher
27
21
steps :
28
- - attach_workspace :
29
- at : /tmp/workspace
22
+ - checkout
30
23
- setup_remote_docker
31
24
- run :
32
- name : Load archived Docker image
33
- command : docker load -i /tmp/workspace/image.tar
25
+ name : Build Docker image
26
+ command : |
27
+ docker build -t $IMAGE_NAME:latest . | cat
34
28
- run :
35
29
name : Publish Docker Image to Docker Hub
36
30
command : |
37
31
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
38
32
docker push $IMAGE_NAME:latest
33
+
39
34
workflows :
40
35
version : 2
41
- build-master :
36
+ build :
42
37
jobs :
43
38
- build :
44
39
filters :
45
40
branches :
46
- only : master
41
+ ignore : master
42
+ publish :
43
+ jobs :
47
44
- publish-latest :
48
- requires :
49
- - build
50
45
filters :
51
46
branches :
52
47
only : master
You can’t perform that action at this time.
0 commit comments