Build WLS on AKS artifact #128
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build WLS on AKS artifact | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [aks-package] | |
# Sample cURL | |
# curl --verbose -X POST https://api.github.com/repos/<github_user>/weblogic-azure/dispatches -H 'Accept: application/vnd.github.everest-preview+json' -H 'Authorization: token <personal_access_token>' --data '{"event_type": "aks-package"}' | |
env: | |
location: eastus | |
aksRepoUserName: oracle | |
aksRepoBranchName: main | |
jobs: | |
preflight: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get versions of external dependencies | |
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 | |
- name: Set up bicep | |
run: | | |
curl -Lo bicep https://github.com/Azure/bicep/releases/download/${bicepVersion}/bicep-linux-x64 | |
chmod +x ./bicep | |
sudo mv ./bicep /usr/local/bin/bicep | |
bicep --version | |
- uses: actions/[email protected] | |
- name: Set up Maven with GitHub token | |
uses: ./.github/actions/setupmaven | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Download arm-ttk used in partner center pipeline | |
run: | | |
wget -O arm-template-toolkit.zip https://aka.ms/arm-ttk-azureapps | |
unzip arm-template-toolkit.zip -d arm-ttk | |
- name: Checkout ${{ env.aksRepoUserName }}/weblogic-azure | |
uses: actions/checkout@v2 | |
with: | |
path: weblogic-azure | |
- name: Build and test weblogic-azure/weblogic-azure-aks | |
run: mvn -Pbicep -Passembly clean install -Ptemplate-validation-tests --file weblogic-azure/weblogic-azure-aks/pom.xml | |
- name: Generate artifact file name and path | |
id: artifact_file | |
run: | | |
version=$(mvn -q -Dexec.executable=echo -Dexec.args='${version.wls-on-aks-azure-marketplace}' --file weblogic-azure/pom.xml --non-recursive exec:exec) | |
artifactName=wls-on-aks-azure-marketplace-$version-arm-assembly | |
unzip weblogic-azure/weblogic-azure-aks/target/$artifactName.zip -d weblogic-azure/weblogic-azure-aks/target/$artifactName | |
echo "##[set-output name=artifactName;]${artifactName}" | |
echo "##[set-output name=artifactPath;]weblogic-azure/weblogic-azure-aks/target/$artifactName" | |
- name: Archive weblogic-azure/weblogic-azure-aks template | |
uses: actions/upload-artifact@v4 | |
if: success() | |
with: | |
name: ${{steps.artifact_file.outputs.artifactName}} | |
path: ${{steps.artifact_file.outputs.artifactPath}} |