Skip to content

Commit

Permalink
Running just test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jermnelson committed Aug 5, 2021
1 parent 2325021 commit 94918fa
Showing 1 changed file with 2 additions and 58 deletions.
60 changes: 2 additions & 58 deletions .circleci/config.yml
Expand Up @@ -2,32 +2,12 @@ version: 2.1

orbs:
python: circleci/python@1.4.0

executors:
docker-publisher:
environment:
IMAGE_NAME: suldlss/dlme-airflow
docker:
- image: circleci/buildpack-deps:stretch
include-python-in-cache-key: 'false'

workflows:
test:
jobs:
- test
build:
jobs:
- build-image:
filters:
branches:
only: main
publish:
jobs:
- publish-docker:
requires:
- build-image
filters:
branches:
only: main

jobs:
test:
Expand All @@ -49,40 +29,4 @@ jobs:
# Run tests
- run:
name: Run tests
command: pytest

build-image:
executor: docker-publisher
steps:
- checkout
- run:
name: Build Docker image
command: |
docker build . -t $IMAGE_NAME:latest
- run:
name: Archive Docker image
command: |
docker save -o image.tar $IMAGE_NAME
- persist_to_workspace:
root: .
paths:
- ./image.tar

publish-docker:
executor: docker-publisher
steps:
- attach_workspace:
at: /tmp/workspace
- setup_remote_docker
- run:
name: Load archived Docker image
command: |
docker load -i /tmp/workspace/image.tar
- run:
name: Publish Docker Image to Docker Hub
command: |
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin
docker push $IMAGE_NAME:latest
command: PYTHONPATH=dlme_airflow pytest

0 comments on commit 94918fa

Please sign in to comment.