Skip to content

Commit

Permalink
Merge pull request WASdev#113 from azure-javaee/remove_azure_javaee_i…
Browse files Browse the repository at this point in the history
…n_workflow

Remove azure javaee in workflows
  • Loading branch information
venunathb authored May 2, 2024
2 parents 963b04a + 409b51f commit f80b1b1
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 29 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,33 +50,32 @@ jobs:
run: |
curl -Lo external-deps-versions.properties https://raw.githubusercontent.com/Azure/azure-javaee-iaas/main/external-deps-versions.properties
source external-deps-versions.properties
echo "azCliVersion=${AZ_CLI_VERSION}" >> $GITHUB_ENV
echo "bicepVersion=${BICEP_VERSION}" >> $GITHUB_ENV
echo "refArmttk=${ARM_TTK_REFERENCE}" >> $GITHUB_ENV
echo "refJavaee=${AZURE_JAVAEE_IAAS_REFERENCE}" >> $GITHUB_ENV
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Checkout azure-javaee-iaas
uses: actions/checkout@v2
with:
repository: Azure/azure-javaee-iaas
path: azure-javaee-iaas
ref: ${{ env.refJavaee }}
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME # env variable for username
server-password: MAVEN_TOKEN # env variable for token
- name: Set Maven env
env:
MAVEN_USERNAME: github
MAVEN_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
echo "MAVEN_USERNAME=${MAVEN_USERNAME}" >> "$GITHUB_ENV"
echo "MAVEN_TOKEN=${MAVEN_TOKEN}" >> "$GITHUB_ENV"
- name: Checkout arm-ttk
uses: actions/checkout@v2
with:
repository: Azure/arm-ttk
path: arm-ttk
ref: ${{ env.refArmttk }}
- name: Checkout ${{ env.repoName }}
uses: actions/checkout@v2
with:
path: ${{ env.repoName }}
ref: ${{ github.event.inputs.ref }}
- name: Build azure-javaee-iaas
run: mvn -DskipTests clean install --file azure-javaee-iaas/pom.xml
- name: Build ${{ env.repoName }}
run: |
deployWLO=false
Expand Down
32 changes: 19 additions & 13 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Copyright (c) IBM Corporation.
# Copyright (c) Microsoft Corporation.
name: Package ARM
name: Package ARM and Update Offer Artifact
on:
workflow_dispatch:
inputs:
updateOfferArtifact:
description: 'Update offer artifact'
required: true
type: boolean
default: true
# Allows you to run this workflow using GitHub APIs
# PERSONAL_ACCESS_TOKEN=<GITHUB_PERSONAL_ACCESS_TOKEN>
# REPO_NAME=WASdev/azure.liberty.aro
Expand Down Expand Up @@ -30,16 +36,7 @@ jobs:
run: |
curl -Lo external-deps-versions.properties https://raw.githubusercontent.com/Azure/azure-javaee-iaas/main/external-deps-versions.properties
source external-deps-versions.properties
echo "azCliVersion=${AZ_CLI_VERSION}" >> $GITHUB_ENV
echo "bicepVersion=${BICEP_VERSION}" >> $GITHUB_ENV
echo "refArmttk=${ARM_TTK_REFERENCE}" >> $GITHUB_ENV
echo "refJavaee=${AZURE_JAVAEE_IAAS_REFERENCE}" >> $GITHUB_ENV
- name: Checkout azure-javaee-iaas
uses: actions/checkout@v2
with:
repository: Azure/azure-javaee-iaas
path: azure-javaee-iaas
ref: ${{ env.refJavaee }}
- name: Download arm-ttk used in partner center pipeline
run: |
wget -O arm-template-toolkit.zip https://aka.ms/arm-ttk-azureapps
Expand All @@ -53,9 +50,17 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build azure-javaee-iaas
run: mvn -DskipTests clean install --file azure-javaee-iaas/pom.xml

server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME # env variable for username
server-password: MAVEN_TOKEN # env variable for token
- name: Set Maven env
env:
MAVEN_USERNAME: github
MAVEN_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
echo "MAVEN_USERNAME=${MAVEN_USERNAME}" >> "$GITHUB_ENV"
echo "MAVEN_TOKEN=${MAVEN_TOKEN}" >> "$GITHUB_ENV"
- name: Build and test ${{ env.repoName }}
run: |
cd ${{ env.repoName }}
Expand All @@ -76,6 +81,7 @@ jobs:
name: ${{steps.artifact_file.outputs.artifactName}}
path: ${{steps.artifact_file.outputs.artifactPath}}
- name: Update offer artifact
if: ${{ inputs.updateOfferArtifact == true || github.event.client_payload.updateOfferArtifact == true }}
uses: microsoft/microsoft-partner-center-github-action@v3
with:
offerId: ${{ env.offerId }}
Expand Down
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,47 @@
1. Install [Maven](https://maven.apache.org/download.cgi).
1. Install [`jq`](https://stedolan.github.io/jq/download/).

## Local Build Setup and Requirements
This project utilizes [GitHub Packages](https://github.com/features/packages) for hosting and retrieving some dependencies. To ensure you can smoothly run and build the project in your local environment, specific configuration settings are required.

GitHub Packages requires authentication to download or publish packages. Therefore, you need to configure your Maven `settings.xml` file to authenticate using your GitHub credentials. The primary reason for this is that GitHub Packages does not support anonymous access, even for public packages.

Please follow these steps:

1. Create a Personal Access Token (PAT)
- Go to [Personal access tokens](https://github.com/settings/tokens).
- Click on Generate new token.
- Give your token a descriptive name, set the expiration as needed, and select the scopes (read:packages, write:packages).
- Click Generate token and make sure to copy the token.

2. Configure Maven Settings
- Locate or create the settings.xml file in your .m2 directory(~/.m2/settings.xml).
- Add the GitHub Package Registry server configuration with your username and the PAT you just created. It should look something like this:
```xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0
https://maven.apache.org/xsd/settings-1.2.0.xsd">

<!-- other settings
...
-->

<servers>
<server>
<id>github</id>
<username>YOUR_GITHUB_USERNAME</username>
<password>YOUR_PERSONAL_ACCESS_TOKEN</password>
</server>
</servers>

<!-- other settings
...
-->

</settings>
```

## Steps of deployment

1. Checkout [azure-javaee-iaas](https://github.com/Azure/azure-javaee-iaas)
Expand Down
23 changes: 19 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@
<groupId>com.ibm.websphere.azure</groupId>
<artifactId>azure.liberty.aro</artifactId>
<version>1.0.54</version>

<parent>
<groupId>com.microsoft.azure.iaas</groupId>
<artifactId>azure-javaee-iaas-parent</artifactId>
<version>1.0.19</version>
<version>1.0.22</version>
<relativePath></relativePath>
</parent>

<packaging>jar</packaging>
<name>${project.artifactId}</name>

Expand All @@ -42,10 +41,26 @@
<azure.apiVersion.aroCluster>2023-04-01</azure.apiVersion.aroCluster>
<azure.apiVersion.roleAssignment>2022-04-01</azure.apiVersion.roleAssignment>
<azure.apiVersion.userAssignedIdentities>2023-01-31</azure.apiVersion.userAssignedIdentities>
<azure.apiVersion.deploymentScript>2023-08-01</azure.apiVersion.deploymentScript>
<azure.apiVersion.deploymentScript>2023-08-01</azure.apiVersion.deploymentScript>
<!--Testing PID <customer.usage.attribution.id>pid-1a2a9b5a-6c82-42de-a938-9fdb6ffe8e55-partnercenter</customer.usage.attribution.id> -->
<customer.usage.attribution.id>pid-8942a2f7-32d6-4b69-b504-4c2fb23fe059-partnercenter</customer.usage.attribution.id>
<aro.start>acdd32ed-5fab-54b6-8d5a-097ed3dcfcf2</aro.start>
<aro.end>d9293179-8975-5587-b29f-8f09f2832c4f</aro.end>
</properties>

<repositories>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/azure-javaee/azure-javaee-iaas</url>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/azure-javaee/azure-javaee-iaas</url>
</pluginRepository>
</pluginRepositories>
</project>

0 comments on commit f80b1b1

Please sign in to comment.