v8/.circleci/config.yml

42 lines
1.9 KiB
YAML

# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/configuration-reference
version: 2.1
# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/configuration-reference/#jobs
jobs:
# Below is the definition of your job to build and test your app, you can rename and customize it as you want.
package-build-push:
# These next lines define a Docker executor: https://circleci.com/docs/executor-types/
# You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
# Be sure to update the Docker image tag below to openjdk version of your application.
# A list of available CircleCI Docker Convenience Images are available here: https://circleci.com/developer/images/image/cimg/openjdk
docker:
- image: cimg/openjdk:17.0.7
# Add steps to the job
# See: https://circleci.com/docs/configuration-reference/#steps
steps:
# Checkout the code as the first step.
- checkout
- setup_remote_docker
- run:
name: Login DockerHub
command: |
echo "$DOCKERHUB_USERPASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
- run:
name: Build Contact Center Docker Image
command: cd $CIRCLE_WORKING_DIRECTORY/contact-center && ./admin/build.sh
- run:
name: Push Contact Center Docker Image to DockerHub
command: cd $CIRCLE_WORKING_DIRECTORY/contact-center && ./admin/push.sh
# Invoke jobs via workflows
# See: https://circleci.com/docs/configuration-reference/#workflows
workflows:
dockerize: # This is the name of the workflow, feel free to change it to better match your workflow.
# Inside the workflow, you define the jobs you want to run.
jobs:
- package-build-push:
filters:
branches:
only: develop