diff --git a/docs/guides/modules/deploy/pages/deploy-android-applications.adoc b/docs/guides/modules/deploy/pages/deploy-android-applications.adoc index 0eba48cfce..dfb91a0116 100644 --- a/docs/guides/modules/deploy/pages/deploy-android-applications.adoc +++ b/docs/guides/modules/deploy/pages/deploy-android-applications.adoc @@ -360,6 +360,76 @@ run: sudo gem install fastlane + Then, replace the `run: fastlane playstore` step with `run: bundle exec fastlane playstore`. +[#track-deployments-with-deploy-markers] +== Track your deployments with deploy markers + +After setting up your Android app deployment to the Google Play Store, you can add deploy markers to track and manage your deployments in the CircleCI web app. Deploy markers provide visibility into your deployment history and enable rollback capabilities. + +[#what-are-deploy-markers] +=== What are deploy markers + +Deploy markers are a lightweight way to log your deployments in CircleCI. When you add deploy markers to your configuration, you can: + +* View a timeline of all deployments in the CircleCI web app +* Track deployment status (pending, running, success, or failed) +* Roll back to previous versions using rollback pipelines +* Trigger deployments directly from the CircleCI web app using deploy pipelines + +[#add-deploy-markers-to-your-android-deployment] +=== Add deploy markers to your Android deployment + +To add deploy markers to your Android deployment job, add the `circleci run release` commands to your deployment workflow. The following example shows a basic deployment marker setup: + +[source,yaml] +---- +jobs: + deploy: + docker: + - image: cimg/android:2024.11.1 + resource_class: large + steps: + - checkout + - run: + name: Plan deployment + command: | + circleci run release plan android-playstore-deploy \ + --target-version="${versionMajor}.${versionMinor}.${versionPatch}" \ + --environment-name="production" \ + --component-name="my-android-app" + - android/decode_keystore: + keystore_location: android/app/keystore + - android/create_keystore_properties: + working_directory: android + - android/create_google_play_key: + working_directory: android + - android/fastlane_deploy: + working_directory: android + lane_name: playstore + - run: + name: Update deployment status + command: circleci run release update android-playstore-deploy --status=running + - run: + name: Update deployment to SUCCESS + command: circleci run release update android-playstore-deploy --status=SUCCESS + when: on_success + - run: + name: Update deployment to FAILED + command: circleci run release update android-playstore-deploy --status=FAILED + when: on_fail +---- + +For complete instructions on configuring deploy markers, including status updates and advanced options, refer to the xref:configure-deploy-markers.adoc[Configure Deploy Markers] guide. + +[#set-up-rollback-and-deploy-pipelines] +=== Set up rollback and deploy pipelines + +Once you have deploy markers configured, you can set up rollback and deploy pipelines to manage your Android app deployments directly from the CircleCI web app: + +* xref:set-up-rollbacks.adoc[Set up a Rollback Pipeline] - Configure a pipeline to roll back to previous versions of your Android application +* xref:set-up-deploys.adoc[Set up a Deploy Pipeline] - Configure a pipeline to deploy new versions from the CircleCI web app + +These features provide additional control and visibility for your Android deployments to the Google Play Store. + [#next-steps] == Next steps diff --git a/docs/guides/modules/deploy/pages/deploy-ios-applications.adoc b/docs/guides/modules/deploy/pages/deploy-ios-applications.adoc index 799cdcb2fa..745f9c17d4 100644 --- a/docs/guides/modules/deploy/pages/deploy-ios-applications.adoc +++ b/docs/guides/modules/deploy/pages/deploy-ios-applications.adoc @@ -423,3 +423,66 @@ desc "Upload to TestFairy" end end ---- + +[#track-deployments-with-deploy-markers] +== Track your deployments with deploy markers + +After setting up your iOS app deployment, you can add deploy markers to track and manage your deployments in the CircleCI web app. Deploy markers work with all iOS distribution methods including App Store Connect, TestFlight, Visual Studio App Center, and TestFairy. + +[#what-are-deploy-markers] +=== What are deploy markers + +Deploy markers are a lightweight way to log your deployments in CircleCI. When you add deploy markers to your configuration, you can: + +* View a timeline of all deployments in the CircleCI web app +* Track deployment status (pending, running, success, or failed) +* Roll back to previous versions using rollback pipelines +* Trigger deployments directly from the CircleCI web app using deploy pipelines + +[#add-deploy-markers-to-your-ios-deployment] +=== Add deploy markers to your iOS deployment + +To add deploy markers to your iOS deployment job, add the `circleci run release` commands to your deployment workflow. The following example shows a basic deployment marker setup for a TestFlight deployment: + +[source,yaml] +---- +jobs: + build-and-deploy: + macos: + xcode: 15.0.0 + steps: + - checkout + - run: + name: Plan deployment + command: | + circleci run release plan ios-testflight-deploy \ + --target-version="${CIRCLE_BUILD_NUM}" \ + --environment-name="testflight" \ + --component-name="my-ios-app" + - run: + name: Fastlane deploy + command: bundle exec fastlane beta + - run: + name: Update deployment status + command: circleci run release update ios-testflight-deploy --status=running + - run: + name: Update deployment to SUCCESS + command: circleci run release update ios-testflight-deploy --status=SUCCESS + when: on_success + - run: + name: Update deployment to FAILED + command: circleci run release update ios-testflight-deploy --status=FAILED + when: on_fail +---- + +For complete instructions on configuring deploy markers, including status updates and advanced options, refer to the xref:configure-deploy-markers.adoc[Configure Deploy Markers] guide. + +[#set-up-rollback-and-deploy-pipelines] +=== Set up rollback and deploy pipelines + +Once you have deploy markers configured, you can set up rollback and deploy pipelines to manage your iOS app deployments directly from the CircleCI web app: + +* xref:set-up-rollbacks.adoc[Set up a Rollback Pipeline] - Configure a pipeline to roll back to previous versions of your iOS application +* xref:set-up-deploys.adoc[Set up a Deploy Pipeline] - Configure a pipeline to deploy new versions from the CircleCI web app + +These features provide additional control and visibility for your iOS deployments across all distribution platforms. diff --git a/docs/guides/modules/deploy/pages/deploy-over-ssh.adoc b/docs/guides/modules/deploy/pages/deploy-over-ssh.adoc index c09e950144..965c9eb012 100644 --- a/docs/guides/modules/deploy/pages/deploy-over-ssh.adoc +++ b/docs/guides/modules/deploy/pages/deploy-over-ssh.adoc @@ -64,3 +64,67 @@ workflows: branches: only: main # only deploy on the main branch ``` + +[#track-deployments-with-deploy-markers] +== Track your deployments with deploy markers + +After setting up your SSH deployment, you can add deploy markers to track and manage your deployments in the CircleCI web app. Deploy markers provide visibility into your deployment history and enable rollback capabilities. + +[#what-are-deploy-markers] +=== What are deploy markers + +Deploy markers are a lightweight way to log your deployments in CircleCI. When you add deploy markers to your configuration, you can: + +* View a timeline of all deployments in the CircleCI web app +* Track deployment status (pending, running, success, or failed) +* Roll back to previous versions using rollback pipelines +* Trigger deployments directly from the CircleCI web app using deploy pipelines + +[#add-deploy-markers-to-your-ssh-deployment] +=== Add deploy markers to your SSH deployment + +To add deploy markers to your SSH deployment job, add the `circleci run release` commands to your deployment workflow. The following example shows a basic deployment marker setup: + +[source,yaml] +---- +jobs: + deploy: + machine: + image: ubuntu-2204:2023.07.2 + steps: + - checkout + - run: + name: Plan deployment + command: | + circleci run release plan ssh-deploy \ + --target-version="${CIRCLE_SHA1:0:7}" \ + --environment-name="production" \ + --component-name="my-app" + - run: + name: Deploy Over SSH + command: | + ssh $SSH_USER@$SSH_HOST "" + - run: + name: Update deployment status + command: circleci run release update ssh-deploy --status=running + - run: + name: Update deployment to SUCCESS + command: circleci run release update ssh-deploy --status=SUCCESS + when: on_success + - run: + name: Update deployment to FAILED + command: circleci run release update ssh-deploy --status=FAILED + when: on_fail +---- + +For complete instructions on configuring deploy markers, including status updates and advanced options, refer to the xref:configure-deploy-markers.adoc[Configure Deploy Markers] guide. + +[#set-up-rollback-and-deploy-pipelines] +=== Set up rollback and deploy pipelines + +Once you have deploy markers configured, you can set up rollback and deploy pipelines to manage your SSH deployments directly from the CircleCI web app: + +* xref:set-up-rollbacks.adoc[Set up a Rollback Pipeline] - Configure a pipeline to roll back to previous versions of your application +* xref:set-up-deploys.adoc[Set up a Deploy Pipeline] - Configure a pipeline to deploy new versions from the CircleCI web app + +These features provide additional control and visibility for your SSH deployments. diff --git a/docs/guides/modules/deploy/pages/deploy-service-update-to-aws-ecs.adoc b/docs/guides/modules/deploy/pages/deploy-service-update-to-aws-ecs.adoc index 0cf8866f92..0b0481b2cb 100644 --- a/docs/guides/modules/deploy/pages/deploy-service-update-to-aws-ecs.adoc +++ b/docs/guides/modules/deploy/pages/deploy-service-update-to-aws-ecs.adoc @@ -211,6 +211,86 @@ workflows: - aws-ecs/deploy_service_update ---- +[#track-deployments-with-deploy-markers] +== Track your deployments with deploy markers + +After setting up your AWS ECS service updates, you can add deploy markers to track and manage your deployments in the CircleCI web app. Deploy markers provide visibility into your deployment history and enable rollback capabilities. + +[#what-are-deploy-markers] +=== What are deploy markers + +Deploy markers are a lightweight way to log your deployments in CircleCI. When you add deploy markers to your configuration, you can: + +* View a timeline of all deployments in the CircleCI web app +* Track deployment status (pending, running, success, or failed) +* Roll back to previous versions using rollback pipelines +* Trigger deployments directly from the CircleCI web app using deploy pipelines + +[#add-deploy-markers-to-your-ecs-deployment] +=== Add deploy markers to your ECS deployment + +To add deploy markers to your AWS ECS deployment job, you can create a custom job that wraps the deploy_service_update orb job with deploy marker commands. The following example shows how to integrate deploy markers: + +[source,yaml] +---- +jobs: + deploy-with-markers: + executor: aws-cli/default + steps: + - run: + name: Plan deployment + command: | + circleci run release plan ecs-service-deploy \ + --target-version="${CIRCLE_SHA1}" \ + --environment-name="production" \ + --component-name="${MY_APP_PREFIX}-service" + - aws-cli/setup: + role_arn: arn:aws:iam::123456789012 + - aws-ecs/deploy_service_update: + family: '${MY_APP_PREFIX}-service' + cluster: '${MY_APP_PREFIX}-cluster' + container_image_name_updates: 'container=${MY_APP_PREFIX}-service,tag=${CIRCLE_SHA1}' + - run: + name: Update deployment status + command: circleci run release update ecs-service-deploy --status=running + - run: + name: Update deployment to SUCCESS + command: circleci run release update ecs-service-deploy --status=SUCCESS + when: on_success + - run: + name: Update deployment to FAILED + command: circleci run release update ecs-service-deploy --status=FAILED + when: on_fail + +workflows: + build-and-deploy: + jobs: + - aws-ecr/build_and_push_image: + repo: '${MY_APP_PREFIX}' + tag: '${CIRCLE_SHA1}' + auth: + - aws-cli/setup: + role_arn: arn:aws:iam::123456789012 + - deploy-with-markers: + requires: + - aws-ecr/build_and_push_image + - verify-deployment: + requires: + - deploy-with-markers +---- + +For complete instructions on configuring deploy markers, including status updates and advanced options, refer to the xref:configure-deploy-markers.adoc[Configure Deploy Markers] guide. + +[#set-up-rollback-and-deploy-pipelines] +=== Set up rollback and deploy pipelines + +Once you have deploy markers configured, you can set up rollback and deploy pipelines to manage your AWS ECS deployments directly from the CircleCI web app: + +* xref:set-up-rollbacks.adoc[Set up a Rollback Pipeline] - Configure a pipeline to roll back to previous versions of your ECS service +* xref:set-up-deploys.adoc[Set up a Deploy Pipeline] - Configure a pipeline to deploy new versions from the CircleCI web app + +These features provide additional control and visibility for your AWS ECS service deployments. + [#next-steps] == Next steps diff --git a/docs/guides/modules/deploy/pages/deploy-to-artifactory.adoc b/docs/guides/modules/deploy/pages/deploy-to-artifactory.adoc index fdbde9d9cf..0008c8d7f3 100644 --- a/docs/guides/modules/deploy/pages/deploy-to-artifactory.adoc +++ b/docs/guides/modules/deploy/pages/deploy-to-artifactory.adoc @@ -139,6 +139,90 @@ workflows: context: artifactory ---- +[#track-deployments-with-deploy-markers] +== Track your deployments with deploy markers + +After setting up your Artifactory deployment, you can add deploy markers to track and manage your artifact uploads in the CircleCI web app. Deploy markers provide visibility into your deployment history and enable rollback capabilities. + +[#what-are-deploy-markers] +=== What are deploy markers + +Deploy markers are a lightweight way to log your deployments in CircleCI. When you add deploy markers to your configuration, you can: + +* View a timeline of all deployments in the CircleCI web app +* Track deployment status (pending, running, success, or failed) +* Roll back to previous versions using rollback pipelines +* Trigger deployments directly from the CircleCI web app using deploy pipelines + +[#add-deploy-markers-to-your-artifactory-deployment] +=== Add deploy markers to your Artifactory deployment + +To add deploy markers to your Artifactory deployment job, add the `circleci run release` commands to your deployment workflow. The following example shows a basic deployment marker setup: + +[source,yaml] +---- +jobs: + create-build-package: + docker: + - image: cimg/openjdk:17.0.10 + working_directory: ~/repo + steps: + - checkout + - run: + name: Plan deployment + command: | + circleci run release plan artifactory-deploy \ + --target-version="${CIRCLE_SHA1:0:7}" \ + --environment-name="production" \ + --component-name="my-artifact" + - run: + name: Install JFrog CLI + command: curl -fL https://getcli.jfrog.io/v2-jf | sh + - run: + name: Configure JFrog Creds + command: | + ./jf c add \ + --artifactory-url $ARTIFACTORY_URL \ + --user $ARTIFACTORY_USER \ + --password $ARTIFACTORY_APIKEY \ + --interactive=false + - run: + name: Maven Build and Deploy + command: | + ./jf mvnc \ + --server-id-resolve \ + --server-id-deploy \ + --repo-resolve-releases libs-release \ + --repo-resolve-snapshots libs-snapshot \ + --repo-deploy-releases release-candidates \ + --repo-deploy-snapshots snapshots \ + --include-patterns "*.jar, *.pom, *.xml" + ./jf mvn clean install + - run: + name: Update deployment status + command: circleci run release update artifactory-deploy --status=running + - run: + name: Update deployment to SUCCESS + command: circleci run release update artifactory-deploy --status=SUCCESS + when: on_success + - run: + name: Update deployment to FAILED + command: circleci run release update artifactory-deploy --status=FAILED + when: on_fail +---- + +For complete instructions on configuring deploy markers, including status updates and advanced options, refer to the xref:configure-deploy-markers.adoc[Configure Deploy Markers] guide. + +[#set-up-rollback-and-deploy-pipelines] +=== Set up rollback and deploy pipelines + +Once you have deploy markers configured, you can set up rollback and deploy pipelines to manage your Artifactory deployments directly from the CircleCI web app: + +* xref:set-up-rollbacks.adoc[Set up a Rollback Pipeline] - Configure a pipeline to roll back to previous versions of your artifacts +* xref:set-up-deploys.adoc[Set up a Deploy Pipeline] - Configure a pipeline to deploy new versions from the CircleCI web app + +These features provide additional control and visibility for your Artifactory deployments. + [#see-also] == See also diff --git a/docs/guides/modules/deploy/pages/deploy-to-aws.adoc b/docs/guides/modules/deploy/pages/deploy-to-aws.adoc index 1900e5122f..f0ead519bf 100644 --- a/docs/guides/modules/deploy/pages/deploy-to-aws.adoc +++ b/docs/guides/modules/deploy/pages/deploy-to-aws.adoc @@ -214,3 +214,69 @@ workflows: == AWS CodeDeploy The link:https://circleci.com/developer/orbs/orb/circleci/aws-code-deploy[AWS CodeDeploy] orb enables you to run deployments through AWS CodeDeploy. See the example in the developer hub to get started. + +[#track-deployments-with-deploy-markers] +== Track your deployments with deploy markers + +After setting up your AWS deployment, you can add deploy markers to track and manage your deployments in the CircleCI web app. Deploy markers work with all AWS deployment types including S3, ECR, ECS, and CodeDeploy. + +[#what-are-deploy-markers] +=== What are deploy markers + +Deploy markers are a lightweight way to log your deployments in CircleCI. When you add deploy markers to your configuration, you can: + +* View a timeline of all deployments in the CircleCI web app +* Track deployment status (pending, running, success, or failed) +* Roll back to previous versions using rollback pipelines +* Trigger deployments directly from the CircleCI web app using deploy pipelines + +[#add-deploy-markers-to-your-aws-deployment] +=== Add deploy markers to your AWS deployment + +To add deploy markers to your AWS deployment job, add the `circleci run release` commands to your deployment workflow. The following example shows a basic deployment marker setup for an S3 deployment: + +[source,yaml] +---- +jobs: + deploy: + docker: + - image: + steps: + - checkout + - run: + name: Plan deployment + command: | + circleci run release plan aws-s3-deploy \ + --target-version="${CIRCLE_SHA1:0:7}" \ + --environment-name="production" \ + --component-name="my-app" + - run: + name: Install awscli + command: sudo pip install awscli + - run: + name: Deploy to S3 + command: aws s3 sync + - run: + name: Update deployment status + command: circleci run release update aws-s3-deploy --status=running + - run: + name: Update deployment to SUCCESS + command: circleci run release update aws-s3-deploy --status=SUCCESS + when: on_success + - run: + name: Update deployment to FAILED + command: circleci run release update aws-s3-deploy --status=FAILED + when: on_fail +---- + +For complete instructions on configuring deploy markers, including status updates and advanced options, refer to the xref:configure-deploy-markers.adoc[Configure Deploy Markers] guide. + +[#set-up-rollback-and-deploy-pipelines] +=== Set up rollback and deploy pipelines + +Once you have deploy markers configured, you can set up rollback and deploy pipelines to manage your AWS deployments directly from the CircleCI web app: + +* xref:set-up-rollbacks.adoc[Set up a Rollback Pipeline] - Configure a pipeline to roll back to previous versions of your AWS application +* xref:set-up-deploys.adoc[Set up a Deploy Pipeline] - Configure a pipeline to deploy new versions from the CircleCI web app + +These features provide additional control and visibility for your AWS deployments across all services including S3, ECR, ECS, and CodeDeploy. diff --git a/docs/guides/modules/deploy/pages/deploy-to-azure-container-registry.adoc b/docs/guides/modules/deploy/pages/deploy-to-azure-container-registry.adoc index c4e8e312d5..bd5631cf7a 100644 --- a/docs/guides/modules/deploy/pages/deploy-to-azure-container-registry.adoc +++ b/docs/guides/modules/deploy/pages/deploy-to-azure-container-registry.adoc @@ -60,3 +60,82 @@ workflows: ``` If pushing to your repository is required, see the xref:permissions-authentication:users-organizations-and-integrations-guide.adoc#enable-project-to-check-out-additional-private-repositories[Users, Organizations, and Integrations Guide]. Then, configure the Azure Web App to use your production branch. + +[#track-deployments-with-deploy-markers] +== Track your deployments with deploy markers + +After setting up your Azure Container Registry deployment, you can add deploy markers to track and manage your deployments in the CircleCI web app. Deploy markers provide visibility into your deployment history and enable rollback capabilities. + +[#what-are-deploy-markers] +=== What are deploy markers + +Deploy markers are a lightweight way to log your deployments in CircleCI. When you add deploy markers to your configuration, you can: + +* View a timeline of all deployments in the CircleCI web app +* Track deployment status (pending, running, success, or failed) +* Roll back to previous versions using rollback pipelines +* Trigger deployments directly from the CircleCI web app using deploy pipelines + +[#add-deploy-markers-to-your-azure-deployment] +=== Add deploy markers to your Azure deployment + +To add deploy markers to your Azure Container Registry deployment job, add the `circleci run release` commands to your deployment workflow. The following example shows a basic deployment marker setup: + +[source,yaml] +---- +version: 2.1 + +orbs: + azure-acr: circleci/azure-acr@0.2.2 + +jobs: + deploy-with-markers: + docker: + - image: cimg/base:stable + steps: + - checkout + - run: + name: Plan deployment + command: | + circleci run release plan azure-acr-deploy \ + --target-version="${CIRCLE_SHA1:0:7}" \ + --environment-name="production" \ + --component-name="my-azure-app" + - azure-acr/build-and-push-image: + dockerfile: + path: + login-server-name: + registry-name: + repo: + - run: + name: Update deployment status + command: circleci run release update azure-acr-deploy --status=running + - run: + name: Update deployment to SUCCESS + command: circleci run release update azure-acr-deploy --status=SUCCESS + when: on_success + - run: + name: Update deployment to FAILED + command: circleci run release update azure-acr-deploy --status=FAILED + when: on_fail + +workflows: + build-deploy: + jobs: + - deploy-with-markers: + filters: + branches: + only: main +---- + +For complete instructions on configuring deploy markers, including status updates and advanced options, refer to the xref:configure-deploy-markers.adoc[Configure Deploy Markers] guide. + +[#set-up-rollback-and-deploy-pipelines] +=== Set up rollback and deploy pipelines + +Once you have deploy markers configured, you can set up rollback and deploy pipelines to manage your Azure Container Registry deployments directly from the CircleCI web app: + +* xref:set-up-rollbacks.adoc[Set up a Rollback Pipeline] - Configure a pipeline to roll back to previous versions of your Azure application +* xref:set-up-deploys.adoc[Set up a Deploy Pipeline] - Configure a pipeline to deploy new versions from the CircleCI web app + +These features provide additional control and visibility for your Azure Container Registry deployments. diff --git a/docs/guides/modules/deploy/pages/deploy-to-capistrano.adoc b/docs/guides/modules/deploy/pages/deploy-to-capistrano.adoc index 5b4f5bef83..5fa6af4b17 100644 --- a/docs/guides/modules/deploy/pages/deploy-to-capistrano.adoc +++ b/docs/guides/modules/deploy/pages/deploy-to-capistrano.adoc @@ -42,3 +42,69 @@ jobs: name: Deploy if tests pass and branch is Main command: bundle exec cap production deploy ``` + +[#track-deployments-with-deploy-markers] +== Track your deployments with deploy markers + +After setting up your Capistrano deployment, you can add deploy markers to track and manage your deployments in the CircleCI web app. Deploy markers provide visibility into your deployment history and enable rollback capabilities. + +[#what-are-deploy-markers] +=== What are deploy markers + +Deploy markers are a lightweight way to log your deployments in CircleCI. When you add deploy markers to your configuration, you can: + +* View a timeline of all deployments in the CircleCI web app +* Track deployment status (pending, running, success, or failed) +* Roll back to previous versions using rollback pipelines +* Trigger deployments directly from the CircleCI web app using deploy pipelines + +[#add-deploy-markers-to-your-capistrano-deployment] +=== Add deploy markers to your Capistrano deployment + +To add deploy markers to your Capistrano deployment job, add the `circleci run release` commands to your deployment workflow. The following example shows a basic deployment marker setup: + +[source,yaml] +---- +jobs: + deploy-job: + docker: + - image: + working_directory: ~/repo + steps: + - checkout + - run: + name: Plan deployment + command: | + circleci run release plan capistrano-deploy \ + --target-version="${CIRCLE_SHA1:0:7}" \ + --environment-name="production" + - run: + name: Bundle Install + command: bundle check || bundle install + - run: + name: Deploy if tests pass and branch is Main + command: bundle exec cap production deploy + - run: + name: Update deployment status + command: circleci run release update capistrano-deploy --status=running + - run: + name: Update deployment to SUCCESS + command: circleci run release update capistrano-deploy --status=SUCCESS + when: on_success + - run: + name: Update deployment to FAILED + command: circleci run release update capistrano-deploy --status=FAILED + when: on_fail +---- + +For complete instructions on configuring deploy markers, including status updates and advanced options, refer to the xref:configure-deploy-markers.adoc[Configure Deploy Markers] guide. + +[#set-up-rollback-and-deploy-pipelines] +=== Set up rollback and deploy pipelines + +Once you have deploy markers configured, you can set up rollback and deploy pipelines to manage your Capistrano deployments directly from the CircleCI web app: + +* xref:set-up-rollbacks.adoc[Set up a Rollback Pipeline] - Configure a pipeline to roll back to previous versions of your application +* xref:set-up-deploys.adoc[Set up a Deploy Pipeline] - Configure a pipeline to deploy new versions from the CircleCI web app + +These features provide additional control and visibility for your Capistrano deployments. diff --git a/docs/guides/modules/deploy/pages/deploy-to-cloud-foundry.adoc b/docs/guides/modules/deploy/pages/deploy-to-cloud-foundry.adoc index cd547a92ba..934b610cee 100644 --- a/docs/guides/modules/deploy/pages/deploy-to-cloud-foundry.adoc +++ b/docs/guides/modules/deploy/pages/deploy-to-cloud-foundry.adoc @@ -98,3 +98,80 @@ workflows: branches: only: main ``` + +[#track-deployments-with-deploy-markers] +== Track your deployments with deploy markers + +After setting up your Cloud Foundry deployment, you can add deploy markers to track and manage your deployments in the CircleCI web app. Deploy markers provide visibility into your deployment history and enable rollback capabilities. + +[#what-are-deploy-markers] +=== What are deploy markers + +Deploy markers are a lightweight way to log your deployments in CircleCI. When you add deploy markers to your configuration, you can: + +* View a timeline of all deployments in the CircleCI web app +* Track deployment status (pending, running, success, or failed) +* Roll back to previous versions using rollback pipelines +* Trigger deployments directly from the CircleCI web app using deploy pipelines + +[#add-deploy-markers-to-your-cloud-foundry-deployment] +=== Add deploy markers to your Cloud Foundry deployment + +To add deploy markers to your Cloud Foundry deployment job, add the `circleci run release` commands to your deployment workflow. The following example shows a basic deployment marker setup for a live deployment: + +[source,yaml] +---- +jobs: + live-deploy: + docker: + - image: + steps: + - checkout + - run: + name: Plan deployment + command: | + circleci run release plan cf-deploy \ + --target-version="${CIRCLE_SHA1:0:7}" \ + --environment-name="production" \ + --component-name="my-cf-app" + - run: + name: Setup CF CLI + command: | + curl -v -L -o cf-cli_amd64.deb "https://cli.run.pivotal.io/stable?release=debian64&source=github" + sudo dpkg -i cf-cli_amd64.deb + cf -v + cf api https://api.run.pivotal.io + cf auth "$CF_USER" "$CF_PASSWORD" + cf target -o "$CF_ORG" -s "$CF_SPACE" + - run: + name: Re-route live Domain to latest + command: | + cf map-route app-name-dark example.com -n www + cf unmap-route app-name example.com -n www + cf stop app-name + cf delete app-name -f + cf rename app-name-dark app-name + - run: + name: Update deployment status + command: circleci run release update cf-deploy --status=running + - run: + name: Update deployment to SUCCESS + command: circleci run release update cf-deploy --status=SUCCESS + when: on_success + - run: + name: Update deployment to FAILED + command: circleci run release update cf-deploy --status=FAILED + when: on_fail +---- + +For complete instructions on configuring deploy markers, including status updates and advanced options, refer to the xref:configure-deploy-markers.adoc[Configure Deploy Markers] guide. + +[#set-up-rollback-and-deploy-pipelines] +=== Set up rollback and deploy pipelines + +Once you have deploy markers configured, you can set up rollback and deploy pipelines to manage your Cloud Foundry deployments directly from the CircleCI web app: + +* xref:set-up-rollbacks.adoc[Set up a Rollback Pipeline] - Configure a pipeline to roll back to previous versions of your Cloud Foundry application +* xref:set-up-deploys.adoc[Set up a Deploy Pipeline] - Configure a pipeline to deploy new versions from the CircleCI web app + +These features provide additional control and visibility for your Cloud Foundry deployments, including support for Blue-Green deployment strategies. diff --git a/docs/guides/modules/deploy/pages/deploy-to-firebase.adoc b/docs/guides/modules/deploy/pages/deploy-to-firebase.adoc index 55ad6ca62d..de7f7cefdf 100644 --- a/docs/guides/modules/deploy/pages/deploy-to-firebase.adoc +++ b/docs/guides/modules/deploy/pages/deploy-to-firebase.adoc @@ -96,3 +96,68 @@ If you are using Google Cloud Functions with Firebase, instruct CircleCI to navi ---- - run: cd functions && npm install ---- + +[#track-deployments-with-deploy-markers] +== Track your deployments with deploy markers + +After setting up your Firebase deployment, you can add deploy markers to track and manage your deployments in the CircleCI web app. Deploy markers provide visibility into your deployment history and enable rollback capabilities. + +[#what-are-deploy-markers] +=== What are deploy markers + +Deploy markers are a lightweight way to log your deployments in CircleCI. When you add deploy markers to your configuration, you can: + +* View a timeline of all deployments in the CircleCI web app +* Track deployment status (pending, running, success, or failed) +* Roll back to previous versions using rollback pipelines +* Trigger deployments directly from the CircleCI web app using deploy pipelines + +[#add-deploy-markers-to-your-firebase-deployment] +=== Add deploy markers to your Firebase deployment + +To add deploy markers to your Firebase deployment job, add the `circleci run release` commands to your deployment workflow. The following example shows a basic deployment marker setup: + +[source,yaml] +---- +jobs: + deploy-job: + docker: + - image: + working_directory: /tmp/my-project + steps: + - checkout + - run: + name: Plan deployment + command: | + circleci run release plan firebase-deploy \ + --target-version="${CIRCLE_SHA1:0:7}" \ + --environment-name="production" + - run: + name: Deploy on Firebase + command: | + echo $SA_KEY > credentials.json + GOOGLE_APPLICATION_CREDENTIALS=credentials.json firebase deploy + - run: + name: Update deployment status + command: circleci run release update firebase-deploy --status=running + - run: + name: Update deployment to SUCCESS + command: circleci run release update firebase-deploy --status=SUCCESS + when: on_success + - run: + name: Update deployment to FAILED + command: circleci run release update firebase-deploy --status=FAILED + when: on_fail +---- + +For complete instructions on configuring deploy markers, including status updates and advanced options, refer to the xref:configure-deploy-markers.adoc[Configure Deploy Markers] guide. + +[#set-up-rollback-and-deploy-pipelines] +=== Set up rollback and deploy pipelines + +Once you have deploy markers configured, you can set up rollback and deploy pipelines to manage your Firebase deployments directly from the CircleCI web app: + +* xref:set-up-rollbacks.adoc[Set up a Rollback Pipeline] - Configure a pipeline to roll back to previous versions of your Firebase application +* xref:set-up-deploys.adoc[Set up a Deploy Pipeline] - Configure a pipeline to deploy new versions from the CircleCI web app + +These features provide additional control and visibility for your Firebase deployments. diff --git a/docs/guides/modules/deploy/pages/deploy-to-google-cloud-platform.adoc b/docs/guides/modules/deploy/pages/deploy-to-google-cloud-platform.adoc index fa63e0f627..6a35e9209a 100644 --- a/docs/guides/modules/deploy/pages/deploy-to-google-cloud-platform.adoc +++ b/docs/guides/modules/deploy/pages/deploy-to-google-cloud-platform.adoc @@ -75,3 +75,69 @@ workflows: ``` For another example, see our link:https://github.com/CircleCI-Public/circleci-demo-k8s-gcp-hello-app[CircleCI Google Cloud deployment example project]. + +[#track-deployments-with-deploy-markers] +== Track your deployments with deploy markers + +After setting up your Google Cloud Platform deployment, you can add deploy markers to track and manage your deployments in the CircleCI web app. Deploy markers work with all GCP deployment types including GKE, Cloud Run, and App Engine. + +[#what-are-deploy-markers] +=== What are deploy markers + +Deploy markers are a lightweight way to log your deployments in CircleCI. When you add deploy markers to your configuration, you can: + +* View a timeline of all deployments in the CircleCI web app +* Track deployment status (pending, running, success, or failed) +* Roll back to previous versions using rollback pipelines +* Trigger deployments directly from the CircleCI web app using deploy pipelines + +[#add-deploy-markers-to-your-gcp-deployment] +=== Add deploy markers to your GCP deployment + +To add deploy markers to your GCP deployment job, add the `circleci run release` commands to your deployment workflow. The following example shows a basic deployment marker setup for a GKE deployment: + +[source,yaml] +---- +jobs: + deploy-job: + docker: + - image: + working_directory: /tmp/my-project + steps: + - run: + name: Plan deployment + command: | + circleci run release plan gke-deploy \ + --target-version="${CIRCLE_SHA1:0:7}" \ + --environment-name="production" \ + --component-name="my-gcp-app" + - run: + name: Deploy Main to GKE + command: | + sudo /opt/google-cloud-sdk/bin/gcloud docker push us.gcr.io/${PROJECT_NAME}/hello + sudo chown -R ubuntu:ubuntu /home/ubuntu/.kube + kubectl patch deployment docker-hello-google -p '{"spec":{"template":{"spec":{"containers":[{"name":"docker-hello-google","image":"us.gcr.io/circle-ctl-test/hello:'"$CIRCLE_SHA1"'"}]}}}}' + - run: + name: Update deployment status + command: circleci run release update gke-deploy --status=running + - run: + name: Update deployment to SUCCESS + command: circleci run release update gke-deploy --status=SUCCESS + when: on_success + - run: + name: Update deployment to FAILED + command: circleci run release update gke-deploy --status=FAILED + when: on_fail +---- + +For complete instructions on configuring deploy markers, including status updates and advanced options, refer to the xref:configure-deploy-markers.adoc[Configure Deploy Markers] guide. + +[#set-up-rollback-and-deploy-pipelines] +=== Set up rollback and deploy pipelines + +Once you have deploy markers configured, you can set up rollback and deploy pipelines to manage your GCP deployments directly from the CircleCI web app: + +* xref:set-up-rollbacks.adoc[Set up a Rollback Pipeline] - Configure a pipeline to roll back to previous versions of your GCP application +* xref:set-up-deploys.adoc[Set up a Deploy Pipeline] - Configure a pipeline to deploy new versions from the CircleCI web app + +These features provide additional control and visibility for your Google Cloud Platform deployments. diff --git a/docs/guides/modules/deploy/pages/deploy-to-heroku.adoc b/docs/guides/modules/deploy/pages/deploy-to-heroku.adoc index 27d66c7466..f32a896a5b 100644 --- a/docs/guides/modules/deploy/pages/deploy-to-heroku.adoc +++ b/docs/guides/modules/deploy/pages/deploy-to-heroku.adoc @@ -105,3 +105,66 @@ workflows: ``` NOTE: Heroku provides the option "Wait for CI to pass before deploy" under deploy / automatic deploys. See the link:https://devcenter.heroku.com/articles/github-integration#automatic-deploys[Heroku documentation] for details. + +[#track-deployments-with-deploy-markers] +== Track your deployments with deploy markers + +After setting up your Heroku deployment, you can add deploy markers to track and manage your deployments in the CircleCI web app. Deploy markers provide visibility into your deployment history and enable rollback capabilities. + +[#what-are-deploy-markers] +=== What are deploy markers + +Deploy markers are a lightweight way to log your deployments in CircleCI. When you add deploy markers to your configuration, you can: + +* View a timeline of all deployments in the CircleCI web app +* Track deployment status (pending, running, success, or failed) +* Roll back to previous versions using rollback pipelines +* Trigger deployments directly from the CircleCI web app using deploy pipelines + +[#add-deploy-markers-to-your-heroku-deployment] +=== Add deploy markers to your Heroku deployment + +To add deploy markers to your Heroku deployment job, add the `circleci run release` commands to your deployment workflow. The following example shows a basic deployment marker setup: + +[source,yaml] +---- +jobs: + deploy: + docker: + - image: + steps: + - checkout + - run: + name: Plan deployment + command: | + circleci run release plan heroku-deploy \ + --target-version="${CIRCLE_SHA1:0:7}" \ + --environment-name="production" + - run: + name: Deploy Main to Heroku + command: | + git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git main + - run: + name: Update deployment status + command: circleci run release update heroku-deploy --status=running + - run: + name: Update deployment to SUCCESS + command: circleci run release update heroku-deploy --status=SUCCESS + when: on_success + - run: + name: Update deployment to FAILED + command: circleci run release update heroku-deploy --status=FAILED + when: on_fail +---- + +For complete instructions on configuring deploy markers, including status updates and advanced options, refer to the xref:configure-deploy-markers.adoc[Configure Deploy Markers] guide. + +[#set-up-rollback-and-deploy-pipelines] +=== Set up rollback and deploy pipelines + +Once you have deploy markers configured, you can set up rollback and deploy pipelines to manage your Heroku deployments directly from the CircleCI web app: + +* xref:set-up-rollbacks.adoc[Set up a Rollback Pipeline] - Configure a pipeline to roll back to previous versions of your Heroku application +* xref:set-up-deploys.adoc[Set up a Deploy Pipeline] - Configure a pipeline to deploy new versions from the CircleCI web app + +These features provide additional control and visibility for your Heroku deployments. diff --git a/docs/guides/modules/deploy/pages/deploy-to-npm-registry.adoc b/docs/guides/modules/deploy/pages/deploy-to-npm-registry.adoc index ccff8b675f..25f65ea604 100644 --- a/docs/guides/modules/deploy/pages/deploy-to-npm-registry.adoc +++ b/docs/guides/modules/deploy/pages/deploy-to-npm-registry.adoc @@ -72,3 +72,77 @@ git push --follow-tags == 5. Publish If tests passed, CircleCI will publish the package to npm automatically. + +[#track-deployments-with-deploy-markers] +== Track your deployments with deploy markers + +After setting up your npm registry deployment, you can add deploy markers to track and manage your package publications in the CircleCI web app. Deploy markers provide visibility into your deployment history and enable rollback capabilities. + +[#what-are-deploy-markers] +=== What are deploy markers + +Deploy markers are a lightweight way to log your deployments in CircleCI. When you add deploy markers to your configuration, you can: + +* View a timeline of all deployments in the CircleCI web app +* Track deployment status (pending, running, success, or failed) +* Roll back to previous versions using rollback pipelines +* Trigger deployments directly from the CircleCI web app using deploy pipelines + +[#add-deploy-markers-to-your-npm-deployment] +=== Add deploy markers to your npm deployment + +To add deploy markers to your npm deployment job, add the `circleci run release` commands to your deployment workflow. The following example shows a basic deployment marker setup: + +[source,yaml] +---- +jobs: + publish: + docker: + - image: + steps: + - checkout + - run: + name: Plan deployment + command: | + VERSION=$(node -p "require('./package.json').version") + circleci run release plan npm-deploy \ + --target-version="$VERSION" \ + --environment-name="production" \ + --component-name="my-npm-package" + - run: + name: Publish to NPM + command: | + npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN + npm publish + - run: + name: Update deployment status + command: circleci run release update npm-deploy --status=running + - run: + name: Update deployment to SUCCESS + command: circleci run release update npm-deploy --status=SUCCESS + when: on_success + - run: + name: Update deployment to FAILED + command: circleci run release update npm-deploy --status=FAILED + when: on_fail + +workflows: + tagged-build: + jobs: + - publish: + filters: + tags: + only: /v[0-9]+(\.[0-9]+)*/ +---- + +For complete instructions on configuring deploy markers, including status updates and advanced options, refer to the xref:configure-deploy-markers.adoc[Configure Deploy Markers] guide. + +[#set-up-rollback-and-deploy-pipelines] +=== Set up rollback and deploy pipelines + +Once you have deploy markers configured, you can set up rollback and deploy pipelines to manage your npm registry deployments directly from the CircleCI web app: + +* xref:set-up-rollbacks.adoc[Set up a Rollback Pipeline] - Configure a pipeline to roll back to previous versions of your npm package +* xref:set-up-deploys.adoc[Set up a Deploy Pipeline] - Configure a pipeline to deploy new versions from the CircleCI web app + +These features provide additional control and visibility for your npm package publications. diff --git a/docs/guides/modules/deploy/pages/ecs-ecr.adoc b/docs/guides/modules/deploy/pages/ecs-ecr.adoc index 04ff88914e..b831e3f301 100644 --- a/docs/guides/modules/deploy/pages/ecs-ecr.adoc +++ b/docs/guides/modules/deploy/pages/ecs-ecr.adoc @@ -138,6 +138,85 @@ workflows: Note the use of Workflows to define job run order/concurrency. See the xref:orchestrate:workflows.adoc[Using Workflows to Orchestrate Jobs] page for more information. +[#track-deployments-with-deploy-markers] +== Track your deployments with deploy markers + +After setting up your AWS ECR and ECS deployment, you can add deploy markers to track and manage your deployments in the CircleCI web app. Deploy markers provide visibility into your deployment history and enable rollback capabilities. + +[#what-are-deploy-markers] +=== What are deploy markers + +Deploy markers are a lightweight way to log your deployments in CircleCI. When you add deploy markers to your configuration, you can: + +* View a timeline of all deployments in the CircleCI web app +* Track deployment status (pending, running, success, or failed) +* Roll back to previous versions using rollback pipelines +* Trigger deployments directly from the CircleCI web app using deploy pipelines + +[#add-deploy-markers-to-your-ecs-deployment] +=== Add deploy markers to your ECS deployment + +To add deploy markers to your AWS ECS deployment job, add the `circleci run release` commands to your deployment workflow. The following example shows a deployment marker setup integrated with the AWS ECR/ECS orbs: + +[source,yaml] +---- +version: 2.1 + +orbs: + aws-ecr: circleci/aws-ecr@x.y.z + aws-ecs: circleci/aws-ecs@0x.y.z + +jobs: + deploy-with-markers: + docker: + - image: cimg/base:stable + steps: + - run: + name: Plan deployment + command: | + circleci run release plan ecs-deploy \ + --target-version="${CIRCLE_SHA1}" \ + --environment-name="production" \ + --component-name="${AWS_RESOURCE_NAME_PREFIX}-service" + - aws-ecs/deploy-service-update: + family: "${AWS_RESOURCE_NAME_PREFIX}-service" + cluster: "${AWS_RESOURCE_NAME_PREFIX}-cluster" + container-image-name-updates: "container=${AWS_RESOURCE_NAME_PREFIX}-service,tag=${CIRCLE_SHA1}" + - run: + name: Update deployment status + command: circleci run release update ecs-deploy --status=running + - run: + name: Update deployment to SUCCESS + command: circleci run release update ecs-deploy --status=SUCCESS + when: on_success + - run: + name: Update deployment to FAILED + command: circleci run release update ecs-deploy --status=FAILED + when: on_fail + +workflows: + build-and-deploy: + jobs: + - aws-ecr/build-and-push-image: + repo: "${AWS_RESOURCE_NAME_PREFIX}" + tag: "${CIRCLE_SHA1}" + - deploy-with-markers: + requires: + - aws-ecr/build-and-push-image +---- + +For complete instructions on configuring deploy markers, including status updates and advanced options, refer to the xref:configure-deploy-markers.adoc[Configure Deploy Markers] guide. + +[#set-up-rollback-and-deploy-pipelines] +=== Set up rollback and deploy pipelines + +Once you have deploy markers configured, you can set up rollback and deploy pipelines to manage your AWS ECS deployments directly from the CircleCI web app: + +* xref:set-up-rollbacks.adoc[Set up a Rollback Pipeline] - Configure a pipeline to roll back to previous versions of your ECS service +* xref:set-up-deploys.adoc[Set up a Deploy Pipeline] - Configure a pipeline to deploy new versions from the CircleCI web app + +These features provide additional control and visibility for your AWS ECR/ECS deployments. + [#see-also] == See also diff --git a/docs/guides/modules/deploy/pages/publish-packages-to-packagecloud.adoc b/docs/guides/modules/deploy/pages/publish-packages-to-packagecloud.adoc index e99c2eb9b8..eee3544652 100644 --- a/docs/guides/modules/deploy/pages/publish-packages-to-packagecloud.adoc +++ b/docs/guides/modules/deploy/pages/publish-packages-to-packagecloud.adoc @@ -235,6 +235,74 @@ You can read more about publishing npm packages to packagecloud on the CircleCI Packagecloud also provides a robust API to manage package repositories. You can read more about the link:https://packagecloud.io/docs/api[Packagecloud API] and how to upload, delete, and promote packages across repositories. +[#track-deployments-with-deploy-markers] +== Track your deployments with deploy markers + +After setting up your Packagecloud deployment, you can add deploy markers to track and manage your package publications in the CircleCI web app. Deploy markers provide visibility into your deployment history and enable rollback capabilities. + +[#what-are-deploy-markers] +=== What are deploy markers + +Deploy markers are a lightweight way to log your deployments in CircleCI. When you add deploy markers to your configuration, you can: + +* View a timeline of all deployments in the CircleCI web app +* Track deployment status (pending, running, success, or failed) +* Roll back to previous versions using rollback pipelines +* Trigger deployments directly from the CircleCI web app using deploy pipelines + +[#add-deploy-markers-to-your-packagecloud-deployment] +=== Add deploy markers to your Packagecloud deployment + +To add deploy markers to your Packagecloud deployment job, add the `circleci run release` commands to your deployment workflow. The following example shows a basic deployment marker setup: + +[source,yaml] +---- +jobs: + deploy: + working_directory: ~/repo + docker: + - image: cimg/ruby:3.1.2 + steps: + - attach_workspace: + at: ~/repo + - run: + name: Plan deployment + command: | + circleci run release plan packagecloud-deploy \ + --target-version="${CIRCLE_SHA1:0:7}" \ + --environment-name="production" \ + --component-name="my-package" + - run: + name: Install packagecloud CLI + command: gem install package_cloud + - run: + name: Push deb package + command: package_cloud push example-user/example-repo/debian/jessie debs/packagecloud-test_1.1-2_amd64.deb + - run: + name: Update deployment status + command: circleci run release update packagecloud-deploy --status=running + - run: + name: Update deployment to SUCCESS + command: circleci run release update packagecloud-deploy --status=SUCCESS + when: on_success + - run: + name: Update deployment to FAILED + command: circleci run release update packagecloud-deploy --status=FAILED + when: on_fail +---- + +For complete instructions on configuring deploy markers, including status updates and advanced options, refer to the xref:configure-deploy-markers.adoc[Configure Deploy Markers] guide. + +[#set-up-rollback-and-deploy-pipelines] +=== Set up rollback and deploy pipelines + +Once you have deploy markers configured, you can set up rollback and deploy pipelines to manage your Packagecloud deployments directly from the CircleCI web app: + +* xref:set-up-rollbacks.adoc[Set up a Rollback Pipeline] - Configure a pipeline to roll back to previous versions of your packages +* xref:set-up-deploys.adoc[Set up a Deploy Pipeline] - Configure a pipeline to deploy new versions from the CircleCI web app + +These features provide additional control and visibility for your Packagecloud package publications. + [#see-also] == See also