mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-02-14 18:29:52 +00:00
Add CircleCI
This commit is contained in:
35
.circleci/config.yml
Normal file
35
.circleci/config.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
version: 2
|
||||
jobs:
|
||||
|
||||
build:
|
||||
docker:
|
||||
- image: errordeveloper/skaffold:66cc263ef18f107adce245b8fc622a8ea46385f2
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker: {docker_layer_caching: true}
|
||||
- run:
|
||||
name: Run unit tests and build the image with Skaffold
|
||||
command: skaffold build --profile=test
|
||||
|
||||
deploy:
|
||||
docker:
|
||||
- image: errordeveloper/skaffold:66cc263ef18f107adce245b8fc622a8ea46385f2
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker: {docker_layer_caching: true}
|
||||
- run:
|
||||
name: Login to the registry
|
||||
command: echo $REGISTRY_PASSWORD | docker login --username $REGISTRY_USERNAME --password-stdin
|
||||
- run:
|
||||
name: Build and push the image to the registry with Skaffold
|
||||
command: skaffold build --profile=production
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
main:
|
||||
jobs:
|
||||
- build
|
||||
- deploy:
|
||||
requires: [build]
|
||||
filters:
|
||||
branches: {only: [master]}
|
||||
@@ -1,27 +1,33 @@
|
||||
apiVersion: skaffold/v1alpha2
|
||||
kind: Config
|
||||
|
||||
## Default profile for use with `skaffold dev`
|
||||
build:
|
||||
|
||||
artifacts:
|
||||
- imageName: podinfo
|
||||
docker:
|
||||
dockerfilePath: ./Dockerfile.ci
|
||||
|
||||
deploy:
|
||||
|
||||
kubectl: { manifests: [ deploy/skaffold/* ] }
|
||||
kubectl: { manifests: [ deploy/skaffold/dev/* ] }
|
||||
|
||||
profiles:
|
||||
|
||||
- name: production
|
||||
|
||||
- name: test
|
||||
## This profile runs unit tests and builds the image
|
||||
build:
|
||||
|
||||
local: { skipPush: false }
|
||||
local: { skipPush: true }
|
||||
artifacts:
|
||||
- imageName: podinfo
|
||||
- imageName: stefanprodan/podinfo
|
||||
docker:
|
||||
dockerfilePath: ./Dockerfile.ci
|
||||
deploy: {} # not needed here as such
|
||||
|
||||
deploy: {}
|
||||
- name: production
|
||||
## This profile pushes the image
|
||||
build:
|
||||
local: { skipPush: false }
|
||||
artifacts:
|
||||
- imageName: stefanprodan/podinfo
|
||||
docker:
|
||||
dockerfilePath: ./Dockerfile.ci
|
||||
deploy: {} # no-op, flux will take care of this
|
||||
|
||||
Reference in New Issue
Block a user