Skip to content

Commit bcb3af7

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
Merging changes synced from https://github.com/MicrosoftDocs/azure-devops-docs-pr (branch live)
2 parents 8f3ecba + 9fce3a4 commit bcb3af7

File tree

3 files changed

+43
-40
lines changed

3 files changed

+43
-40
lines changed

docs/pipelines/ecosystems/android.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,28 @@ For more information about using Gradle tasks, see [Using tasks](https://docs.gr
7373
7474
To run on a device instead of an emulator, the Android Application Package (APK) must be signed. Zipaligning reduces the RAM the application consumes. If your build doesn't already [sign and zipalign](https://developer.android.com/studio/publish/app-signing) the APK, add the [Android Signing](/azure/devops/pipelines/tasks/reference/android-signing-v3) task to the pipeline. For more information, see [Sign a mobile app](../apps/mobile/app-signing.md).
7575
76-
For security, store the `jarsignerKeystorePassword` and `jarsignerKeyPassword` in [secret variables](../process/variables.md#secret-variables) and use those variables in your pipeline.
76+
For security, store the `apksignerKeystorePassword` and `apksignerKeyPassword` in [secret variables](../process/variables.md#secret-variables) and use those variables in your pipeline.
7777

7878
```yaml
79-
- task: AndroidSigning@2
79+
- task: AndroidSigning@3
8080
inputs:
81-
apkFiles: '**/*.apk'
82-
jarsign: true
83-
jarsignerKeystoreFile: 'pathToYourKeystoreFile'
84-
jarsignerKeystorePassword: '$(jarsignerKeystorePassword)'
85-
jarsignerKeystoreAlias: 'yourKeystoreAlias'
86-
jarsignerKeyPassword: '$(jarsignerKeyPassword)'
87-
zipalign: true
81+
apkFiles: '**/*.apk' # Specify the APK files to sign
82+
apksignerKeystoreFile: 'pathToYourKeystoreFile' # Path to the keystore file
83+
apksignerKeystorePassword: '$(apksignerKeystorePassword)' # Use a secret variable for security
84+
apksignerKeystoreAlias: 'yourKeystoreAlias' # Alias for the keystore
85+
apksignerKeyPassword: '$(apksignerKeyPassword)' # Use a secret variable for security
86+
apksignerVersion: 'latest' # Use the latest version of apksigner
87+
apksignerArguments: '--verbose' # Optional: Additional arguments for apksigner
88+
zipalign: true # Enable zipalign to optimize APK
89+
zipalignVersion: 'latest' # Use the latest version of zipalign
8890
```
8991

9092
### Test on the Android emulator
9193

9294
To install and run the Android emulator, add the [Bash](/azure/devops/pipelines/tasks/reference/bash-v3) task to your pipeline, and paste in the following code. The emulator starts as a background process and is available in later tasks. Arrange the emulator parameters to fit your testing environment.
9395

9496
> [!IMPORTANT]
95-
> If you're using a [Microsoft-hosted agent](../agents/hosted.md), use the MacOS agent image with the Android emulator. Current Android emulators require hardware acceleration to start. Azure DevOps hosted Ubuntu agents do not support hardware acceleration.
97+
> If you're using a [Microsoft-hosted agent](../agents/hosted.md), use the macOS agent image with the Android emulator. Current Android emulators require hardware acceleration to start. Azure DevOps hosted Ubuntu agents do not support hardware acceleration.
9698

9799
```yaml
98100
- task: Bash@3

docs/pipelines/ecosystems/java.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ monikerRange: "<=azure-devops"
1212

1313
[!INCLUDE [version-lt-eq-azure-devops](../../includes/version-lt-eq-azure-devops.md)]
1414

15-
Use Azure Pipelines to automate the build, test, and deployment of Java applications. This article shows you how to set up a pipeline for Java projects using tools like Maven, Gradle, or Ant. You'll also learn how to deploy your app to Azure services such as App Service, Functions, or Kubernetes.
15+
Use Azure Pipelines to automate the build, test, and deployment of Java applications. This article explains how to set up a pipeline for Java projects using tools like Maven, Gradle, or Ant. You also learn how to deploy your app to Azure services like App Service, Functions, or Kubernetes.
1616

17-
Use a pipeline to automatically:
17+
Use a pipeline to:
1818

1919
* Build your project with [Maven](https://maven.apache.org/), [Gradle](https://gradle.org/), or [Ant](https://ant.apache.org/).
2020
* Run tests and code analysis tools.
2121
* Publish your app using a pipeline and Azure Artifacts.
2222
* Deploy your app to [Azure App Service](java-webapp.md), [Azure Functions](java-function.md), or [Azure Kubernetes Service](kubernetes/aks-template.md).
2323

24-
If you're working on an Android project, see [Build, test, and deploy Android apps](android.md).
24+
If you work on an Android projects, see [Build, test, and deploy Android apps](android.md).
2525

2626
## Prerequisites
2727

@@ -45,7 +45,7 @@ https://github.com/MicrosoftDocs/pipelines-java
4545

4646
1. Follow the wizard steps, starting by selecting **GitHub** as the location of your source code. You might be redirected to GitHub to sign in. If so, enter your GitHub credentials.
4747

48-
1. Select your repository. You might be redirected to GitHub to install the Azure Pipelines app. If so, select **Approve & install**.
48+
1. Select your repository. You might be redirected to GitHub to install the Azure Pipelines app. If so, select **Approve & install** to proceed.
4949

5050
1. When you see the **Configure your pipeline** tab, select **Maven**, **Gradle**, or **Ant** depending on how you want to [build your code](#build-your-code).
5151

@@ -95,9 +95,9 @@ You now have a working YAML pipeline (`azure-pipelines.yml`) in your repository
9595

9696
::: moniker range=">= azure-devops"
9797

98-
Use Azure Pipelines to build Java apps without setting up any infrastructure. Build on Windows, Linux, or macOS images. The Microsoft-hosted agents in Azure Pipelines have modern JDKs and other tools for Java preinstalled. To check which versions of Java are installed, see [Microsoft-hosted agents](../agents/hosted.md).
98+
Use Azure Pipelines to build Java apps without setting up infrastructure. Build on Windows, Linux, or macOS images. Microsoft-hosted agents in Azure Pipelines have modern JDKs and other tools for Java preinstalled. To check which versions of Java are installed, see [Microsoft-hosted agents](../agents/hosted.md).
9999

100-
To select the appropriate image, update the following snippet in your `azure-pipelines.yml` file.
100+
Select the appropriate image by updating the following snippet in your `azure-pipelines.yml` file.
101101

102102
```yaml
103103
pool:
@@ -106,17 +106,17 @@ pool:
106106
107107
See [Microsoft-hosted agents](../agents/hosted.md) for a complete list of images.
108108
109-
As an alternative to using Microsoft-hosted agents, set up [self-hosted agents](../agents/agents.md#install) with Java installed. You can also use self-hosted agents to save more time if you have a large repo or you run incremental builds.
109+
As an alternative to Microsoft-hosted agents, set up [self-hosted agents](../agents/agents.md#install) with Java installed. Use self-hosted agents to save time if you have a large repo or run incremental builds.
110110
111111
::: moniker-end
112112
113113
::: moniker range="< azure-devops"
114114
115-
Builds run on a [self-hosted agent](../agents/agents.md#install). Ensure Java and the tools needed to build with your chosen method are installed on the agent's host.
115+
Builds run on a [self-hosted agent](../agents/agents.md#install). Ensure Java and the tools required for your chosen build method are installed on the agent's host.
116116
117117
You can select your agent pool and the agent capabilities in the **Agent pool** and **Agent Specification** sections of the **Options** tab in the pipeline editor.
118118
119-
For example to specify the agent pool and an agent with the Maven capability, add the following snippet to your `azure-pipelines.yml` file.
119+
For example, specify the agent pool and an agent with the Maven capability by adding the following snippet to your `azure-pipelines.yml` file.
120120

121121
```yaml
122122
pool:
@@ -164,7 +164,7 @@ For a Gradle build, add the following task to the `azure-pipelines.yml` file. Fo
164164

165165
```yaml
166166
steps:
167-
- task: Gradle@2
167+
- task: Gradle@3
168168
inputs:
169169
workingDirectory: ''
170170
gradleWrapperFile: 'gradlew'

docs/pipelines/ecosystems/ruby.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@ ms.author: vijayma
77
author: vijayma
88
ms.reviewer: dastahel
99
ms.custom: freshness-fy22q2, kr2b-contr-experiment
10-
ms.date: 01/20/2022
10+
ms.date: 06/09/2025
1111
monikerRange: azure-devops
1212
---
1313

1414
# Build and test Ruby apps
1515

1616
[!INCLUDE [version-eq-azure-devops](../../includes/version-eq-azure-devops.md)]
1717

18-
This article explains how to automatically build Ruby projects.
18+
Learn how to use Azure Pipelines to build, test, and deploy your Ruby application.
1919

2020
## Create the Azure Pipelines
2121

22-
Do the following steps to set up a pipeline for a Ruby app.
22+
Follow these steps to set up a pipeline for a Ruby app.
2323

2424
1. Sign in to your Azure DevOps organization and go to your project.
2525

26-
1. Select **Pipelines** > **New pipeline**.
26+
1. Go to **Pipelines** > **New pipeline**.
2727

2828
1. Select **GitHub** as the location of your source code.
2929

@@ -33,14 +33,14 @@ Do the following steps to set up a pipeline for a Ruby app.
3333

3434
1. Select the `Ruby` template for your pipeline.
3535

36-
1. A YAML file gets generated. Select **Save and run** > **Commit directly to the main branch**, and then choose **Save and run** again.
36+
1. A YAML file is generated. Select **Save and run** > **Commit directly to the main branch**, and then select **Save and run** again.
3737

3838
1. Wait for the run to finish.
3939

4040
You have a working YAML file (`azure-pipelines.yml`) in your repository that's ready for you to customize.
4141

4242
> [!TIP]
43-
> To make changes to the YAML file as described in this article, select the pipeline in the **Pipelines** page, and then **Edit** the `azure-pipelines.yml` file.
43+
> To make changes to the YAML file described in this article, select the pipeline on the **Pipelines** page, and then select **Edit** for the `azure-pipelines.yml` file.
4444
4545
## Build environment
4646

@@ -50,18 +50,18 @@ For the exact versions of Ruby that are preinstalled, refer to [Microsoft-hosted
5050

5151
### Use a specific Ruby version
5252

53-
Add the [Use Ruby Version](/azure/devops/pipelines/tasks/reference/use-ruby-version-v0) task to set the version of Ruby used in your pipeline. This snippet adds Ruby 2.4 or later to the path and sets subsequent pipeline tasks to use it.
53+
Add the [Use Ruby Version](/azure/devops/pipelines/tasks/reference/use-ruby-version-v0) task to set the Ruby version in your pipeline. This snippet adds Ruby 3.4 or later to the path and sets subsequent pipeline tasks to use it.
5454

5555
```yaml
56-
# https://learn.microsoft.com/azure/devops/pipelines/ecosystems/ruby
5756
pool:
58-
vmImage: 'ubuntu-latest' # other options: 'macOS-latest', 'windows-latest'
57+
vmImage: 'ubuntu-latest'
5958

6059
steps:
61-
- task: UseRubyVersion@0
60+
- task: UseRubyVersion@0
6261
inputs:
63-
versionSpec: '>= 2.5'
62+
versionSpec: '>= 3.4'
6463
addToPath: true
64+
displayName: 'Set Ruby version'
6565
```
6666
6767
### Install Rails
@@ -70,18 +70,18 @@ To install Rails, add the following snippet to your `azure-pipelines.yml` file.
7070

7171
```yaml
7272
- script: gem install rails && rails -v
73-
displayName: 'gem install rails'
73+
displayName: 'Install Rails'
7474
```
7575

7676
### Install dependencies
7777

78-
To use Bundler to install dependencies, add the following snippet to your `azure-pipelines.yml` file.
78+
Use Bundler to install dependencies by adding the following snippet to your `azure-pipelines.yml` file.
7979

8080
```yaml
8181
- script: |
82-
CALL gem install bundler
82+
gem install bundler
8383
bundle install --retry=3 --jobs=4
84-
displayName: 'bundle install'
84+
displayName: 'Install dependencies with Bundler'
8585
```
8686

8787
### Run Rake
@@ -95,9 +95,9 @@ To execute Rake in the context of the current bundle (as defined in your Gemfile
9595

9696
### Publish test results
9797

98-
The sample code includes unit tests written using [RSpec](https://rspec.info/). When Rake is run by the previous step, it runs the RSpec tests. The RSpec RakeTask in the Rakefile has been configured to produce JUnit style results using the RspecJUnitFormatter.
98+
The sample code includes unit tests written with [RSpec](https://rspec.info/). When Rake runs in the previous step, it executes the RSpec tests. The RSpec RakeTask in the Rakefile is configured to produce JUnit-style results using the RspecJUnitFormatter.
9999

100-
Add the [Publish Test Results](/azure/devops/pipelines/tasks/reference/publish-test-results-v2) task to publish JUnit style test results to the server. You get a rich test reporting experience that you can use for troubleshooting any failed tests and for test timing analysis.
100+
Add the [Publish Test Results](/azure/devops/pipelines/tasks/reference/publish-test-results-v2) task to publish JUnit-style test results to the server.
101101

102102
```yaml
103103
- task: PublishTestResults@2
@@ -110,16 +110,17 @@ Add the [Publish Test Results](/azure/devops/pipelines/tasks/reference/publish-t
110110

111111
The sample code uses [SimpleCov](https://github.com/colszowka/simplecov) to collect code coverage data when unit tests get run. SimpleCov is configured to use Cobertura and HTML report formatters.
112112

113-
Add the [Publish Code Coverage Results](/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v1) task to publish code coverage results to the server. When you do so, coverage metrics can be seen in the build summary and HTML reports can be downloaded for further analysis.
113+
Add the [Publish Code Coverage Results](/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v2) task to publish code coverage results to the server. This lets you view coverage metrics in the build summary and download HTML reports for further analysis.
114114

115115
```yaml
116-
- task: PublishCodeCoverageResults@1
116+
- task: PublishCodeCoverageResults@2
117117
inputs:
118118
codeCoverageTool: Cobertura
119119
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
120120
reportDirectory: '$(System.DefaultWorkingDirectory)/**/coverage'
121+
failIfCoverageEmpty: true
121122
```
122123

123124
## Build an image and push to container registry
124125

125-
For your Ruby app, you can also [build an image](containers/build-image.md) and [push it to a container registry](containers/push-image.md).
126+
For your Ruby app, you can [build an image](containers/build-image.md) and [push it to a container registry](containers/push-image.md).

0 commit comments

Comments
 (0)