You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pipelines/ecosystems/android.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,26 +73,28 @@ For more information about using Gradle tasks, see [Using tasks](https://docs.gr
73
73
74
74
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).
75
75
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.
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
88
90
```
89
91
90
92
### Test on the Android emulator
91
93
92
94
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.
93
95
94
96
> [!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.
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.
16
16
17
-
Use a pipeline to automatically:
17
+
Use a pipeline to:
18
18
19
19
* Build your project with [Maven](https://maven.apache.org/), [Gradle](https://gradle.org/), or [Ant](https://ant.apache.org/).
20
20
* Run tests and code analysis tools.
21
21
* Publish your app using a pipeline and Azure Artifacts.
22
22
* Deploy your app to [Azure App Service](java-webapp.md), [Azure Functions](java-function.md), or [Azure Kubernetes Service](kubernetes/aks-template.md).
23
23
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).
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.
47
47
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.
49
49
50
50
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).
51
51
@@ -95,9 +95,9 @@ You now have a working YAML pipeline (`azure-pipelines.yml`) in your repository
95
95
96
96
::: moniker range=">= azure-devops"
97
97
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).
99
99
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.
101
101
102
102
```yaml
103
103
pool:
@@ -106,17 +106,17 @@ pool:
106
106
107
107
See [Microsoft-hosted agents](../agents/hosted.md) for a complete list of images.
108
108
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.
110
110
111
111
::: moniker-end
112
112
113
113
::: moniker range="< azure-devops"
114
114
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.
116
116
117
117
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.
118
118
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.
120
120
121
121
```yaml
122
122
pool:
@@ -164,7 +164,7 @@ For a Gradle build, add the following task to the `azure-pipelines.yml` file. Fo
This article explains how to automatically buildRuby projects.
18
+
Learn how to use Azure Pipelines to build, test, and deploy your Ruby application.
19
19
20
20
## Create the Azure Pipelines
21
21
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.
23
23
24
24
1. Sign in to your Azure DevOps organization and go to your project.
25
25
26
-
1.Select**Pipelines** > **New pipeline**.
26
+
1.Go to**Pipelines** > **New pipeline**.
27
27
28
28
1. Select **GitHub** as the location of your source code.
29
29
@@ -33,14 +33,14 @@ Do the following steps to set up a pipeline for a Ruby app.
33
33
34
34
1. Select the `Ruby` template for your pipeline.
35
35
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.
37
37
38
38
1. Wait for the run to finish.
39
39
40
40
You have a working YAML file (`azure-pipelines.yml`) in your repository that's ready for you to customize.
41
41
42
42
> [!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.
44
44
45
45
## Build environment
46
46
@@ -50,18 +50,18 @@ For the exact versions of Ruby that are preinstalled, refer to [Microsoft-hosted
50
50
51
51
### Use a specific Ruby version
52
52
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.
vmImage: 'ubuntu-latest'# other options: 'macOS-latest', 'windows-latest'
57
+
vmImage: 'ubuntu-latest'
59
58
60
59
steps:
61
-
- task: UseRubyVersion@0
60
+
- task: UseRubyVersion@0
62
61
inputs:
63
-
versionSpec: '>= 2.5'
62
+
versionSpec: '>= 3.4'
64
63
addToPath: true
64
+
displayName: 'Set Ruby version'
65
65
```
66
66
67
67
### Install Rails
@@ -70,18 +70,18 @@ To install Rails, add the following snippet to your `azure-pipelines.yml` file.
70
70
71
71
```yaml
72
72
- script: gem install rails && rails -v
73
-
displayName: 'gem install rails'
73
+
displayName: 'Install Rails'
74
74
```
75
75
76
76
### Install dependencies
77
77
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.
79
79
80
80
```yaml
81
81
- script: |
82
-
CALL gem install bundler
82
+
gem install bundler
83
83
bundle install --retry=3 --jobs=4
84
-
displayName: 'bundle install'
84
+
displayName: 'Install dependencies with Bundler'
85
85
```
86
86
87
87
### Run Rake
@@ -95,9 +95,9 @@ To execute Rake in the context of the current bundle (as defined in your Gemfile
95
95
96
96
### Publish test results
97
97
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 JUnitstyle 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.
99
99
100
-
Add the [Publish Test Results](/azure/devops/pipelines/tasks/reference/publish-test-results-v2) task to publish JUnitstyle 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.
101
101
102
102
```yaml
103
103
- task: PublishTestResults@2
@@ -110,16 +110,17 @@ Add the [Publish Test Results](/azure/devops/pipelines/tasks/reference/publish-t
110
110
111
111
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.
112
112
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.
0 commit comments