Skip to content

Commit 29d5a6c

Browse files
committed
Rework circleci workflow for efficiency
Archiving was taking longer than building did
1 parent 316d6ed commit 29d5a6c

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

.circleci/config.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,38 +15,33 @@ jobs:
1515
name: Build Docker image
1616
command: |
1717
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+
2519
publish-latest:
2620
executor: docker-publisher
2721
steps:
28-
- attach_workspace:
29-
at: /tmp/workspace
22+
- checkout
3023
- setup_remote_docker
3124
- 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
3428
- run:
3529
name: Publish Docker Image to Docker Hub
3630
command: |
3731
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
3832
docker push $IMAGE_NAME:latest
33+
3934
workflows:
4035
version: 2
41-
build-master:
36+
build:
4237
jobs:
4338
- build:
4439
filters:
4540
branches:
46-
only: master
41+
ignore: master
42+
publish:
43+
jobs:
4744
- publish-latest:
48-
requires:
49-
- build
5045
filters:
5146
branches:
5247
only: master

0 commit comments

Comments
 (0)