Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Remove AGW Make workflows for the AGW Bazel switchover #15144

Merged
merged 1 commit into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
139 changes: 1 addition & 138 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# owner: @magma/approvers-gw (agw-build, cwf-operator-build, feg-build), @magma/approvers-cloud (nms-build, orc8r-build)
# owner: @magma/approvers-gw (cwf-operator-build, feg-build), @magma/approvers-cloud (nms-build, orc8r-build)
# purpose: Building and publishing cloud and gateway components
# remediation: https://magma.github.io/magma/docs/next/basics/quick_start_guide#terminal-tab-2-build-orchestrator (orc8r), https://magma.github.io/magma/docs/next/basics/quick_start_guide#using-the-nms-ui (nms-build), https://magma.github.io/magma/docs/next/feg/deploy_build (feg-build)

Expand Down Expand Up @@ -107,127 +107,6 @@ jobs:
run: |
pip install artifactory
python ci-scripts/helm_repo_rotation.py
agw-build:
voisey marked this conversation as resolved.
Show resolved Hide resolved
if: github.event_name == 'push' && github.repository_owner == 'magma'
runs-on: macos-12
outputs:
artifacts: ${{ steps.publish_packages.outputs.artifacts }}
magma_package: ${{ steps.publish_packages.outputs.magma_package }}
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v3.1.0
with:
fetch-depth: 0
- name: Cache magma-dev-box
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # pin@v3.0.11
with:
path: ~/.vagrant.d/boxes/magmacore-VAGRANTSLASH-magma_dev
key: vagrant-box-magma-dev-v1.3.20221230
- name: Log in to vagrant cloud
run: |
if [[ -n "${{ secrets.VAGRANT_TOKEN }}" ]]
then
echo "Logging in to vagrant cloud to mitigate rate limiting."
vagrant cloud auth login --token "${{ secrets.VAGRANT_TOKEN }}"
else
echo "Vagrant cloud token is not configured. Skipping login."
fi
- uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # pin@v4.3.0
with:
python-version: '3.8.10'
- name: Install pre requisites
run: |
pip3 install --upgrade pip
pip3 install ansible fabric jsonpickle requests PyYAML
vagrant plugin install vagrant-disksize vagrant-vbguest vagrant-mutate vagrant-reload
- name: Open up network interfaces for VM
run: |
sudo mkdir -p /etc/vbox/
sudo touch /etc/vbox/networks.conf
sudo sh -c "echo '* 192.168.0.0/16' > /etc/vbox/networks.conf"
sudo sh -c "echo '* 3001::/64' >> /etc/vbox/networks.conf"
- name: Build AGW
run: |
export MAGMA_DEV_MEMORY_MB=4096
cd lte/gateway
fab release package --destroy-vm
mkdir magma-packages
vagrant ssh -c "cp -r magma-packages /vagrant"
- name: Setup JFROG CLI
uses: jfrog/setup-jfrog-cli@d0a59b1cdaeeb16e65b5039fc92b8507337f1559 # pin@v3
- name: Publish debian packages
id: publish_packages
if: github.event_name == 'push'
env:
DEBIAN_META_INFO: deb.distribution=focal-ci;deb.component=main;deb.architecture=amd64
run: |
# Default firebase output before anything can fail
ARTIFACTS='{"packages":[],"valid":false}'
echo "artifacts=$(echo $ARTIFACTS)" >> $GITHUB_OUTPUT

set -euo pipefail

cd lte/gateway/magma-packages

# Extract magma debian package version
version_pattern="magma_([0-9]+\.[0-9]+\.[0-9]+-[0-9]+-[a-z0-9]+)_amd64.deb"
magma_version=""
for i in *.deb; do
if [[ $i =~ $version_pattern ]]; then
magma_version=${BASH_REMATCH[1]}
fi
done
if [[ -z "$magma_version" ]]; then
echo "No file found with a matching version pattern \"${version_pattern}\". Files in folder:"
ls -la
exit 1
else
echo "Exporting magma version \"${magma_version}\""
echo "magma_package=magma=${magma_version}" >> $GITHUB_OUTPUT
fi

# Uploading packages to the registry
RESPONSE=$(jf rt upload \
--recursive=false \
--detailed-summary \
--url https://linuxfoundation.jfrog.io/artifactory/ \
--user ${{ secrets.LF_JFROG_USERNAME }} \
--password ${{ secrets.LF_JFROG_PASSWORD }} \
--target-props="${DEBIAN_META_INFO}" \
"(*).deb" magma-packages-test/pool/focal-ci/{1}.deb)

# Mapping response to output (for firebase)
echo "Response:"
echo $RESPONSE | jq
echo "Output (for firebase):"
ARTIFACTS=$(echo $RESPONSE | jq '{"valid": (.status=="success"), "packages": [.files[] | .target]}')
echo $ARTIFACTS | jq
echo "artifacts=$(echo $ARTIFACTS)" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3
if: github.event_name == 'pull_request'
with:
name: magma-packages
path: lte/gateway/magma-packages/*.deb
- name: Notify failure to slack
if: failure() && github.event_name == 'push'
env:
SLACK_TITLE: "Github action agw build failed"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: ${{ github.workflow }}
SLACK_AVATAR: ":boom:"
uses: Ilshidur/action-slack@689ad44a9c9092315abd286d0e3a9a74d31ab78a # pin@2.1.0
with:
args: "AGW build failed in run <https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}|${{github.run_id}}> from commit ${{ github.sha }}: ${{ github.event.head_commit.message || github.event.pull_request.title }}"
# Notify ci channel when push succeeds
- name: Notify success to Slack
if: success() && github.event_name == 'push'
env:
SLACK_TITLE: "Github action agw build got published"
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL_ARTIFACTS }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_OSS }}
SLACK_USERNAME: ${{ github.workflow }}
uses: Ilshidur/action-slack@689ad44a9c9092315abd286d0e3a9a74d31ab78a # pin@2.1.0
with:
args: "AGW build succeeded in run <https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}|${{github.run_id}}> from commit ${{ github.sha }}: ${{ github.event.head_commit.message || github.event.pull_request.title }}"

orc8r-build:
if: github.repository_owner == 'magma'
Expand Down Expand Up @@ -648,7 +527,6 @@ jobs:
runs-on: ubuntu-20.04
needs:
[
agw-build,
feg-build,
orc8r-build,
cwag-deploy,
Expand All @@ -667,7 +545,6 @@ jobs:
BUILD_METADATA: '{"github:workflow": "${{ github.workflow }}", "github:run_id": "${{ github.run_id }}", "github:actor": "${{ github.actor }}", "github:repository": "${{ github.repository }}",
"github:event_name": "${{ github.event_name }}", "github:sha": "${{ github.sha }}", "github:sha:url": "${{github.event.repository.owner.html_url}}/magma/commit/${{github.sha}}",
"github:ref": "${{ github.ref }}"}'
AGW_ARTIFACTS: ${{ needs.agw-build.outputs.artifacts }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for #15161 this functionality needs to be added to the bazel based debian build job

FEG_ARTIFACTS: ${{ needs.feg-build.outputs.artifacts }}
ORC8R_ARTIFACTS: ${{ needs.orc8r-build.outputs.artifacts }}
CWAG_ARTIFACTS: ${{ needs.cwag-deploy.outputs.artifacts }}
Expand Down Expand Up @@ -735,17 +612,3 @@ jobs:
SLACK_ICON_EMOJI: ":heavy_check_mark:"
SLACK_COLOR: "#00FF00"
SLACK_FOOTER: ' '
trigger-debian-integ-test:
if: always() && github.event_name == 'push' && github.repository_owner == 'magma' && github.ref == 'refs/heads/master'
runs-on: ubuntu-20.04
needs: agw-build
steps:
- name: Trigger debian integ test workflow
uses: peter-evans/repository-dispatch@f2696244ec00ed5c659a5cc77f7138ad0302dffb # pin@v2.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: magma/magma
event-type: build-all-artifact
client-payload: '{ "artifact": "${{ needs.agw-build.outputs.magma_package }}", "trigger_sha": "${{ github.sha }}", "commit_message": "$COMMIT_MESSAGE" }'
env:
COMMIT_MESSAGE: ${{ toJSON(github.event.head_commit.message) }}
102 changes: 0 additions & 102 deletions .github/workflows/lte-integ-test-magma-deb.yml

This file was deleted.

103 changes: 0 additions & 103 deletions .github/workflows/lte-integ-test.yml

This file was deleted.