Skip to content

Commit

Permalink
Merge pull request #112 from xcomponent/UpdateCircleCi
Browse files Browse the repository at this point in the history
Update circle-ci
  • Loading branch information
Julien-Molina committed Jun 29, 2021
2 parents b0569c8 + 3c5657e commit e8c4b2e
Showing 1 changed file with 31 additions and 24 deletions.
55 changes: 31 additions & 24 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
version: 2
version: 2.1

references:
restore_repo: &restore_repo
restore_cache:
name: Restore checked out code
keys:
- v2-reactivexcomponent-net-repo-{{ .Branch }}-{{ .Revision }}
- v2-reactivexcomponent-net-repo-{{ .Branch }}-
- v2-reactivexcomponent-net-repo-
docker_auth: &docker_auth
auth:
username: xcomponentteam
password: $DOCKERHUB_PASSWORD

restore_nuget: &restore_nuget
restore_cache:
Expand All @@ -26,24 +24,27 @@ references:
name: Save nuget cache
key: v2-nuget-{{ .Branch }}-{{ checksum "shasum.tmp" }}
paths:
- /home/circleci/.nuget
- /home/circleci/.nuget

jobs:
checkout_code:
docker:
- image: circleci/node:10.12
- image: circleci/node:15.14
<<: *docker_auth
resource_class: small
steps:
- checkout
- save_cache:
key: v2-reactivexcomponent-net-repo-{{ .Branch }}-{{ .Revision }}
- persist_to_workspace:
root: /home/circleci/project
paths:
- .

build_reactiveapi:
docker:
- image: microsoft/dotnet:2.2-sdk
steps:
- *restore_repo
- attach_workspace:
at: /home/circleci/project
- *generate_nuget_shasum
- *restore_nuget
- run:
Expand All @@ -64,8 +65,10 @@ jobs:
build_integration_test:
docker:
- image: xcomponent/mono-dotnet-node-xvfb:1.2.0
<<: *docker_auth
steps:
- *restore_repo
- attach_workspace:
at: /home/circleci/project
- *generate_nuget_shasum
- *restore_nuget
- attach_workspace:
Expand All @@ -81,13 +84,15 @@ jobs:
root: /home/circleci/project
paths:
- docker

run_reactiveapi_integration_test:
docker:
- image: circleci/node:10.12
<<: *docker_auth
steps:
- setup_remote_docker
- *restore_repo
- attach_workspace:
at: /home/circleci/project
- setup_remote_docker
- attach_workspace:
at: /home/circleci/project
- run:
Expand All @@ -99,16 +104,18 @@ jobs:
deploy_nuget:
docker:
- image: microsoft/dotnet:2.2-sdk
<<: *docker_auth
steps:
- *restore_repo
- attach_workspace:
at: /home/circleci/project
- *generate_nuget_shasum
- *restore_nuget
- attach_workspace:
at: /home/circleci/project
- run:
name: Deploy nuget package
command: cd /home/circleci/project/ && ./build.sh -t PushPackage -buildConfiguration=Release -buildVersion=$CIRCLE_TAG -nugetkey=$NUGET_API_KEY

workflows:
version: 2
xcomponent_reactive_api:
Expand All @@ -121,31 +128,31 @@ workflows:
only: /.*/
- build_reactiveapi:
requires:
- checkout_code
- checkout_code
filters:
tags:
only: /^[0-9]++\.[0-9]++\.[0-9]++/
branches:
only: /.*/
- build_integration_test:
requires:
- build_reactiveapi
- build_reactiveapi
filters:
tags:
only: /^[0-9]++\.[0-9]++\.[0-9]++/
branches:
only: /.*/
- run_reactiveapi_integration_test:
requires:
- build_integration_test
- build_integration_test
filters:
tags:
only: /^[0-9]++\.[0-9]++\.[0-9]++/
branches:
only: /.*/
- deploy_nuget:
requires:
- run_reactiveapi_integration_test
- run_reactiveapi_integration_test
filters:
tags:
only: /^[0-9]++\.[0-9]++\.[0-9]++/
Expand Down

0 comments on commit e8c4b2e

Please sign in to comment.