Skip to content

Instantly share code, notes, and snippets.

@petehouston
Last active April 10, 2020 04:57
Show Gist options
  • Save petehouston/feb3a8184b9c97c8e1a70a9ac371cb7e to your computer and use it in GitHub Desktop.
Save petehouston/feb3a8184b9c97c8e1a70a9ac371cb7e to your computer and use it in GitHub Desktop.
[Persist project data between CircleCI jobs] A tip to persist project data between CircleCI jobs #circleci #devops
step_1:
working_directory: ~/project
docker:
- image: petehouston/docker-php-gcloud-k8s-helm:latest
steps:
- checkout
- run:
name: "Composer: install"
command: composer install -n --prefer-dist
- persist_to_workspace:
root: ~/
paths:
- "project"
step_1:
working_directory: ~/project
docker:
- image: petehouston/docker-php-gcloud-k8s-helm:latest
steps:
- checkout
- run:
name: "Composer: install"
command: composer install -n --prefer-dist
step_2:
working_directory: ~/project
docker:
- image: google/cloud-sdk
steps:
- attach_workspace:
at: ~/
- setup_remote_docker
- gcp-gcr/gcr-auth:
gcloud-service-key: GCLOUD_SERVICE_KEY
google-compute-zone: GOOGLE_COMPUTE_ZONE
google-project-id: GOOGLE_PROJECT_ID
- gcp-gcr/build-image:
registry-url: us.gcr.io
- gcp-gcr/push-image:
image: my-awesome-project
registry-url: us.gcr.io
step_2:
working_directory: ~/project
docker:
- image: google/cloud-sdk
steps:
- checkout
- setup_remote_docker
- gcp-gcr/gcr-auth:
gcloud-service-key: GCLOUD_SERVICE_KEY
google-compute-zone: GOOGLE_COMPUTE_ZONE
google-project-id: GOOGLE_PROJECT_ID
- gcp-gcr/build-image:
registry-url: us.gcr.io
- gcp-gcr/push-image:
image: my-awesome-project
registry-url: us.gcr.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment