Skip to content

Build WLS on AKS artifact #29

Build WLS on AKS artifact

Build WLS on AKS artifact #29

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
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: 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
- 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
unzip arm-template-toolkit.zip -d arm-ttk
- name: Build azure-javaee-iaas
run: mvn -DskipTests clean install --file azure-javaee-iaas/pom.xml
- 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=$(awk '/<version>[^<]+<\/version>/{gsub(/<version>|<\/version>/,"",$1);print $1;exit;}' weblogic-azure/weblogic-azure-aks/pom.xml)
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@v1
if: success()
with:
name: ${{steps.artifact_file.outputs.artifactName}}
path: ${{steps.artifact_file.outputs.artifactPath}}