Skip to content

Build WLS on AKS artifact #122

Build WLS on AKS artifact

Build WLS on AKS artifact #122

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/checkout@v2.3.4
- 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@v1
if: success()
with:
name: ${{steps.artifact_file.outputs.artifactName}}
path: ${{steps.artifact_file.outputs.artifactPath}}