sonicfi: Add sonicfi rap630c-311g and sonicfi rap630w-311g #2869
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 OpenWrt/uCentral images | |
env: | |
AWS_DEFAULT_OUTPUT: json | |
AWS_DEFAULT_REGION: us-east-1 | |
AWS_S3_BUCKET_NAME: ucentral-ap-firmware | |
AWS_ACCOUNT_ID: ${{ secrets.UCENTRAL_S3_ACCOUNT_ID }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.UCENTRAL_S3_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.UCENTRAL_S3_ACCESS_KEY_SECRET }} | |
on: | |
push: | |
branches: [ main, next, staging-* ] | |
tags: [ v* ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
x64_vm_image_name: ${{ steps.package_and_upload_image.outputs.x64_vm_image_name }} | |
strategy: | |
fail-fast: false | |
matrix: | |
target: ['actiontec_web7200', 'cig_wf186w', 'cig_wf188n', 'cig_wf194c4', 'cig_wf196-us', 'cig_wf196-ca', 'cig_wf196-ca-ath12', 'cig_wf610d', 'cig_wf660a', 'cig_wf660a', 'cig_wf808', 'cybertan_eww622-a1', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'edgecore_eap101', 'edgecore_eap101-ath12', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap104-ath12', 'liteon_wpx8324', 'edgecore_ecs4100-12ph', 'edgecore_ecw5211', 'edgecore_ecw5410', 'edgecore_oap100', 'edgecore_oap101_6e', 'edgecore_oap101e', 'edgecore_ssw2ac2600', 'edgecore_spw2ac1200', 'edgecore_spw2ac1200-lan-poe', 'hfcl_ion4','hfcl_ion4xi_wp', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'indio_um-305ac', 'indio_um-305ax', 'indio_um-325ac', 'indio_um-510ac-v3', 'indio_um-550ac', 'indio_um-310ax-v1', 'indio_um-510axp-v1', 'indio_um-510axm-v1', 'linksys_ea6350-v4', 'linksys_e8450-ubi', 'linksys_ea8300', 'meshpp_s618_cp03', 'meshpp_s618_cp01', 'udaya_a5-id2', 'wallys_dr40x9', 'wallys_dr6018', 'wallys_dr6018_v4', 'x64_vm', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build image for ${{ matrix.target }} | |
id: build | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Your Name" | |
make -j TARGET=${{ matrix.target }} | |
- name: Package and upload image for ${{ matrix.target }} | |
id: package_and_upload_image | |
env: | |
GH_BUILD_USERNAME: ${{ secrets.GH_BUILD_USERNAME }} | |
GH_BUILD_PASSWORD: ${{ secrets.GH_BUILD_PASSWORD }} | |
ARTIFACTORY_USERNAME: cicd-indoor-main | |
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | |
run: | | |
LOWERCASE_TARGET=`echo ${{ matrix.target }} | tr '[:upper:]' '[:lower:]'` | |
HASH=$(git rev-parse --short HEAD) | |
if [[ ${GITHUB_REF} == "refs/heads/"* ]] | |
then | |
REF=$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-') | |
IS_RELEASE="false" | |
else | |
REF=$(echo ${GITHUB_REF#refs/tags/} | tr '/' '-') | |
IS_RELEASE="true" | |
fi | |
BASENAME="$(date +%Y%m%d)-$LOWERCASE_TARGET-$REF-$HASH" | |
TAR_NAME="$BASENAME.tar.gz" | |
IMG_NAME="$BASENAME-upgrade.bin"; | |
JSON_NAME="$BASENAME.json"; | |
tar cfz "$TAR_NAME" -C openwrt/bin/targets/ . | |
curl -u $GH_BUILD_USERNAME:$GH_BUILD_PASSWORD -T "$TAR_NAME" "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/$LOWERCASE_TARGET/"$TAR_NAME"" | |
IMG_NAME="$BASENAME-upgrade.bin"; | |
TIP_VERSION="$(grep DISTRIB_TIP= openwrt/tmp/openwrt_release | cut -d\' -f2)" | |
echo -e "{\n\t\"image\":\""${IMG_NAME}"\",\n\t\"revision\": \""${TIP_VERSION}"\",\n\t\"timestamp\":\""$(date +%s)"\",\n\t\"compatible\": \""${LOWERCASE_TARGET}"\"\n}" > latest-upgrade.json | |
[ -f openwrt/tmp/image-file ] && curl -u $GH_BUILD_USERNAME:$GH_BUILD_PASSWORD -T "openwrt/$(cat openwrt/tmp/image-file)" "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/$LOWERCASE_TARGET/"$IMG_NAME"" | |
[ -f openwrt/tmp/image-file ] && curl -u $GH_BUILD_USERNAME:$GH_BUILD_PASSWORD -T "latest-upgrade.json" "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/$LOWERCASE_TARGET/latest-upgrade.json" | |
[ -f openwrt/tmp/image-file ] && aws s3 cp --acl public-read --content-type "application/octet-stream" "openwrt/$(cat openwrt/tmp/image-file)" "s3://$AWS_S3_BUCKET_NAME/$IMG_NAME" | |
[ -f openwrt/tmp/image-file ] && aws s3api put-object-tagging --bucket "$AWS_S3_BUCKET_NAME" --key "$IMG_NAME" --tagging "{\"TagSet\":[{\"Key\":\"release\",\"Value\":\"$IS_RELEASE\"}]}" | |
[ -f openwrt/tmp/image-file ] && aws s3 cp --acl public-read --content-type "application/json" "latest-upgrade.json" "s3://$AWS_S3_BUCKET_NAME/$JSON_NAME" | |
[ -f openwrt/tmp/image-file ] && aws s3api put-object-tagging --bucket "$AWS_S3_BUCKET_NAME" --key "$JSON_NAME" --tagging "{\"TagSet\":[{\"Key\":\"release\",\"Value\":\"$IS_RELEASE\"}]}" | |
if [ ${{ matrix.target }} == 'x64_vm' ]; then | |
echo "x64_vm_image_name=$(echo $IMG_NAME)" >> $GITHUB_OUTPUT | |
fi | |
trigger-testing: | |
runs-on: ubuntu-latest | |
needs: build | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Trigger testing of release | |
uses: peter-evans/repository-dispatch@v1 | |
with: | |
token: ${{ secrets.WLAN_TESTING_PAT }} | |
repository: Telecominfraproject/wlan-testing | |
event-type: new-ap-release | |
client-payload: '{"ref": "${GITHUB_REF#refs/tags/}", "sha": "${{ github.sha }}"}' | |
create-x64_vm-ami: | |
runs-on: ubuntu-latest | |
needs: build | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use create-ami-from-image composite action | |
uses: ./.github/actions/create-ami-from-image | |
with: | |
firmware_image_name: ${{ needs.build.outputs.x64_vm_image_name }} | |
firmware_image_s3_bucket: ${{ env.AWS_S3_BUCKET_NAME }} |