Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: setup circleci for docker build #18

Merged
merged 7 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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:
devcontainer-publish:
docker:
- image: cimg/base:stable
resource_class: xlarge

parameters:
platform:
type: string
default: linux/amd64
tag:
type: string
default: latest

steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Build and publish
command: |
export IMAGE_NAME=secretflow/secretnote:<< parameters.tag >>

docker buildx build \
--platform=<< parameters.platform >> \
-f docker/app/Dockerfile \
-t ${IMAGE_NAME} \
--progress=plain \
.

docker login -u secretflow -p ${DOCKER_DEPLOY_TOKEN}
docker push ${IMAGE_NAME}

# Orchestrate jobs using workflows
# See: https://circleci.com/docs/configuration-reference/#workflows
workflows:
devcontainer-publish-amd64:
jobs:
- devcontainer-publish:
filters:
branches:
only:
- main
platform: linux/amd64
tag: unstable-amd64

devcontainer-publish-arm64:
jobs:
- devcontainer-publish:
filters:
branches:
only:
- main
platform: linux/arm64
tag: unstable-arm64
42 changes: 0 additions & 42 deletions .devcontainer/devcontainer.json

This file was deleted.

33 changes: 0 additions & 33 deletions .devcontainer/network/Dockerfile

This file was deleted.

38 changes: 0 additions & 38 deletions .devcontainer/network/docker-compose.yml

This file was deleted.

Loading
Loading