@@ -827,201 +827,203 @@ jobs:
827827 steps : ${{ toJson(steps) }}
828828 channel : ' #eng-dataset-cloud-tech'
829829
830- k8s-smoketest :
831- runs-on : ${{ vars.RUNNER }}
832- needs :
833- - build_image_tarball
834- name : K8s Smoketest - ${{ inputs.builder_name }}
835- if : vars.K8S_TESTS_DISABLED != 'true' && github.ref_name != '_release_build' && (github.event_name != 'pull_request' || ! github.event.pull_request.draft)
836- steps :
837- - name : Checkout Repository
838- uses : actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
839-
840- - name : install python and requirements
841- uses : ./.github/actions/install_python_and_requirements
842- with :
843- python_version : ${{ inputs.python_version }}
844-
845- - name : Set up QEMU
846- id : qemu
847- uses : docker/setup-qemu-action@v3
848- with :
849- image : tonistiigi/binfmt:qemu-v6.2.0
850- platforms : all
851-
852- - name : Login to DockerHub
853- uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
854- with :
855- username : ${{ secrets.PULL_REGISTRY_USERNAME }}
856- password : ${{ secrets.PULL_REGISTRY_PASSWORD }}
857-
858- - name : Set up Docker Context for Buildx
859- id : buildx-context
860- run : |
861- docker context create builders || echo Already exists
862-
863- - name : Set up Docker Buildx
864- uses : docker/setup-buildx-action@v3
865- with :
866- driver-opts : network=host
867- endpoint : builders
868-
869- # TODO Investigate, no longer working
870- # - name: Expose GitHub Runtime To Be Able to Use GHA Cache By Docker.
871- # uses: crazy-max/ghaction-github-runtime@715c25b40ccc0df9b62bfa8be3ccc57d09dbc4b1
872-
873- - name : Setup minikube k8s cluster
874- uses : ./.github/actions/setup-minikube-cluster/
875- with :
876- k8s_version : v1.22.0
877- minikube_driver : " "
878- container_runtime : " docker"
879- github_token : " ${{ secrets.GITHUB_TOKEN }}"
880-
881- - name : Download OCI tarball of the built image.
882- uses : actions/download-artifact@v4
883- with :
884- name : container-image-tarball-k8s-${{ inputs.builder_name }}
885- path : /tmp/image_tarball
886-
887- - name : Build test image
888- env :
889- USE_GHA_CACHE : " 1"
890- CACHE_VERSION : ${{ inputs.cache_version }}
891- run : |
892- python3 tests/end_to_end_tests/container_images_test/scripts/build_test_image.py \
893- --image-builder-name ${{ inputs.builder_name }} \
894- --base-image ${{ inputs.base_image }} \
895- --architecture x86_64 \
896- --image-oci-tarball /tmp/image_tarball/k8s-${{ inputs.builder_name }}.tar \
897- --result-image-name k8s-image:test \
898- --image-type k8s
899-
900- - name : Run Tests (with coverage)
901- env :
902- CIRCLE_BUILD_NUM : ${{ github.run_number }}
903- SCALYR_SERVER : https://agent.scalyr.com
904- SCALYR_API_KEY : ${{ secrets.CT_SCALYR_TOKEN_PROD_US_CLOUDTECH_TESTING_WRITE }}
905- READ_API_KEY : ${{ secrets.CT_SCALYR_TOKEN_PROD_US_CLOUDTECH_TESTING_READ }}
906- run : |
907- source ./.circleci/smoketest_k8s.sh scalyr/scalyr-agent-ci-unittest:4 300 no_delete_existing_k8s_objs k8s-image:test
908-
909- - name : Upload test results
910- uses : actions/upload-artifact@v4
911- with :
912- name : k8s-smoketest
913- path : |
914- .coverage
915- if : ${{ success() || failure() }}
916-
917- docker-smoketest :
918- name : Docker Smoketest - ${{ inputs.builder_name }} ${{ matrix.variant.image_type }}
919- if : github.ref_name != '_release_build'
920- needs :
921- - build_image_tarball
922- runs-on : ${{ vars.RUNNER }}
923- strategy :
924- fail-fast : false
925- matrix :
926- variant :
927- - image_type : docker-json
928- timeout : 300
929- - image_type : docker-syslog
930- timeout : 300
931- - image_type : docker-api
932- timeout : 300
933- steps :
934- - name : Checkout Repository
935- uses : actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
936-
937- - name : install python and requirements
938- uses : ./.github/actions/install_python_and_requirements
939- with :
940- python_version : ${{ inputs.python_version }}
941-
942- - name : Set up QEMU
943- id : qemu
944- uses : docker/setup-qemu-action@v3
945- with :
946- image : tonistiigi/binfmt:qemu-v6.2.0
947- platforms : all
948-
949- - name : Login to DockerHub
950- uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
951- with :
952- username : ${{ secrets.PULL_REGISTRY_USERNAME }}
953- password : ${{ secrets.PULL_REGISTRY_PASSWORD }}
954-
955- - name : Login to an internal build registry
956- if : vars.INTERNAL_BUILD_REGISTRY
957- uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
958- continue-on-error : true
959- with :
960- registry : ${{ vars.INTERNAL_BUILD_REGISTRY }}
961- username : ${{ secrets.INTERNAL_BUILD_REGISTRY_USERNAME }}
962- password : ${{ secrets.INTERNAL_BUILD_REGISTRY_PASSWORD }}
963-
964- # Context need to be created for a self-hosted runner
965- - name : Set up Docker Context for Buildx
966- id : buildx-context
967- run : |
968- docker context create builders || echo Already exists
969-
970- - name : Set up Docker Buildx
971- uses : docker/setup-buildx-action@v3
972- with :
973- driver-opts : network=host
974- endpoint : builders
975-
976- # TODO Investigate, no longer working
977- # - name: Expose GitHub Runtime To Be Able to Use GHA Cache By Docker.
978- # uses: crazy-max/ghaction-github-runtime@715c25b40ccc0df9b62bfa8be3ccc57d09dbc4b1
979-
980- - name : Download OCI tarball of the built image.
981- uses : actions/download-artifact@v4
982- with :
983- name : container-image-tarball-${{ matrix.variant.image_type }}-${{ inputs.builder_name }}
984- path : /tmp/image_tarball
985-
986- - name : Build test image
987- env :
988- USE_GHA_CACHE : " 1"
989- CACHE_VERSION : ${{ inputs.cache_version }}
990- run : |
991- python3 tests/end_to_end_tests/container_images_test/scripts/build_test_image.py \
992- --image-builder-name ${{ inputs.builder_name }} \
993- --base-image ${{ inputs.base_image }} \
994- --architecture x86_64 \
995- --image-oci-tarball /tmp/image_tarball/${{ matrix.variant.image_type }}-${{ inputs.builder_name }}.tar \
996- --result-image-name ${{ matrix.variant.image_type }}-${{ inputs.builder_name }}:test \
997- --image-type ${{ matrix.variant.image_type }}
998-
999- - name : Run Tests (with coverage)
1000- env :
1001- CIRCLE_BUILD_NUM : ${{ github.run_number }}
1002- SCALYR_SERVER : https://agent.scalyr.com
1003- SCALYR_API_KEY : ${{ secrets.CT_SCALYR_TOKEN_PROD_US_CLOUDTECH_TESTING_WRITE }}
1004- READ_API_KEY : ${{ secrets.CT_SCALYR_TOKEN_PROD_US_CLOUDTECH_TESTING_READ }}
1005- run : |
1006- source ./.circleci/smoketest_docker.sh scalyr/scalyr-agent-ci-unittest:4 ${{ matrix.variant.image_type }} ${{ matrix.variant.timeout }} ${{ matrix.variant.image_type }}-${{ inputs.builder_name }}:test
1007-
1008- - name : Upload test results
1009- uses : actions/upload-artifact@v4
1010- with :
1011- name : docker-smoketest-${{ matrix.variant.image_type }}-${{ inputs.builder_name }}
1012- path : |
1013- .coverage
1014- if : ${{ success() || failure() }}
1015-
1016- - name : Notify Slack on Failure
1017- if : ${{ failure() && github.ref_name == 'master' }}
1018- uses : act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f # v2.0.0
1019- env :
1020- SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
1021- with :
1022- status : ${{ job.status }}
1023- steps : ${{ toJson(steps) }}
1024- channel : ' #eng-dataset-cloud-tech'
830+ # TODO Make decision on whether this is to be replaced or simply removed
831+ # The scalyr-agent-ci-unittest image dependency is problematic because it uses a centos image
832+ # Ref: .circleci/docker_unified_smoke_unit/Dockerfile.unittest
833+ # k8s-smoketest:
834+ # runs-on: ${{ vars.RUNNER }}
835+ # needs:
836+ # - build_image_tarball
837+ # name: K8s Smoketest - ${{ inputs.builder_name }}
838+ # if: vars.K8S_TESTS_DISABLED != 'true' && github.ref_name != '_release_build' && (github.event_name != 'pull_request' || ! github.event.pull_request.draft)
839+ # steps:
840+ # - name: Checkout Repository
841+ # uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
842+ #
843+ # - name: Install python and requirements
844+ # uses: ./.github/actions/install_python_and_requirements
845+ # with:
846+ # python_version: ${{ inputs.python_version }}
847+ #
848+ # - name: Set up QEMU
849+ # id: qemu
850+ # uses: docker/setup-qemu-action@v3
851+ # with:
852+ # image: tonistiigi/binfmt:qemu-v6.2.0
853+ # platforms: all
854+ #
855+ # - name: Login to DockerHub
856+ # uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
857+ # with:
858+ # username: ${{ secrets.PULL_REGISTRY_USERNAME }}
859+ # password: ${{ secrets.PULL_REGISTRY_PASSWORD }}
860+ #
861+ # - name: Set up Docker Context for Buildx
862+ # id: buildx-context
863+ # run: |
864+ # docker context create builders || echo Already exists
865+ #
866+ # - name: Set up Docker Buildx
867+ # uses: docker/setup-buildx-action@v3
868+ # with:
869+ # driver-opts: network=host
870+ # endpoint: builders
871+ #
872+ # - name: Setup minikube k8s cluster
873+ # uses: ./.github/actions/setup-minikube-cluster/
874+ # with:
875+ # k8s_version: v1.22.0
876+ # minikube_driver: ""
877+ # container_runtime: "docker"
878+ # github_token: "${{ secrets.GITHUB_TOKEN }}"
879+ #
880+ # - name: Download OCI tarball of the built image.
881+ # uses: actions/download-artifact@v4
882+ # with:
883+ # name: container-image-tarball-k8s-${{ inputs.builder_name }}
884+ # path: /tmp/image_tarball
885+ #
886+ # - name: Build test image
887+ # env:
888+ # USE_GHA_CACHE: "1"
889+ # CACHE_VERSION: ${{ inputs.cache_version }}
890+ # run: |
891+ # python3 tests/end_to_end_tests/container_images_test/scripts/build_test_image.py \
892+ # --image-builder-name ${{ inputs.builder_name }} \
893+ # --base-image ${{ inputs.base_image }} \
894+ # --architecture x86_64 \
895+ # --image-oci-tarball /tmp/image_tarball/k8s-${{ inputs.builder_name }}.tar \
896+ # --result-image-name k8s-image:test \
897+ # --image-type k8s
898+ #
899+ # - name: Run Tests (with coverage)
900+ # env:
901+ # CIRCLE_BUILD_NUM: ${{ github.run_number }}
902+ # SCALYR_SERVER: https://agent.scalyr.com
903+ # SCALYR_API_KEY: ${{ secrets.CT_SCALYR_TOKEN_PROD_US_CLOUDTECH_TESTING_WRITE }}
904+ # READ_API_KEY: ${{ secrets.CT_SCALYR_TOKEN_PROD_US_CLOUDTECH_TESTING_READ }}
905+ # run: |
906+ # source ./.circleci/smoketest_k8s.sh scalyr/scalyr-agent-ci-unittest:4 300 no_delete_existing_k8s_objs k8s-image:test
907+ #
908+ # - name: Upload test results
909+ # uses: actions/upload-artifact@v4
910+ # with:
911+ # name: k8s-smoketest
912+ # path: |
913+ # .coverage
914+ # if: ${{ success() || failure() }}
915+
916+ # TODO Make decision on whether this is to be replaced or simply removed
917+ # The scalyr-agent-ci-unittest image dependency is problematic because it uses a centos image
918+ # Ref: .circleci/docker_unified_smoke_unit/Dockerfile.unittest
919+ # docker-smoketest:
920+ # name: Docker Smoketest - ${{ inputs.builder_name }} ${{ matrix.variant.image_type }}
921+ # if: github.ref_name != '_release_build'
922+ # needs:
923+ # - build_image_tarball
924+ # runs-on: ${{ vars.RUNNER }}
925+ # strategy:
926+ # fail-fast: false
927+ # matrix:
928+ # variant:
929+ # - image_type: docker-json
930+ # timeout: 300
931+ # - image_type: docker-syslog
932+ # timeout: 300
933+ # - image_type: docker-api
934+ # timeout: 300
935+ # steps:
936+ # - name: Checkout Repository
937+ # uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
938+ #
939+ # - name: install python and requirements
940+ # uses: ./.github/actions/install_python_and_requirements
941+ # with:
942+ # python_version: ${{ inputs.python_version }}
943+ #
944+ # - name: Set up QEMU
945+ # id: qemu
946+ # uses: docker/setup-qemu-action@v3
947+ # with:
948+ # image: tonistiigi/binfmt:qemu-v6.2.0
949+ # platforms: all
950+ #
951+ # - name: Login to DockerHub
952+ # uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
953+ # with:
954+ # username: ${{ secrets.PULL_REGISTRY_USERNAME }}
955+ # password: ${{ secrets.PULL_REGISTRY_PASSWORD }}
956+ #
957+ # - name: Login to an internal build registry
958+ # if: vars.INTERNAL_BUILD_REGISTRY
959+ # uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
960+ # continue-on-error: true
961+ # with:
962+ # registry: ${{ vars.INTERNAL_BUILD_REGISTRY }}
963+ # username: ${{ secrets.INTERNAL_BUILD_REGISTRY_USERNAME }}
964+ # password: ${{ secrets.INTERNAL_BUILD_REGISTRY_PASSWORD }}
965+ #
966+ # # Context need to be created for a self-hosted runner
967+ # - name: Set up Docker Context for Buildx
968+ # id: buildx-context
969+ # run: |
970+ # docker context create builders || echo Already exists
971+ #
972+ # - name: Set up Docker Buildx
973+ # uses: docker/setup-buildx-action@v3
974+ # with:
975+ # driver-opts: network=host
976+ # endpoint: builders
977+ #
978+ # # TODO Investigate, no longer working
979+ # #- name: Expose GitHub Runtime To Be Able to Use GHA Cache By Docker.
980+ # # uses: crazy-max/ghaction-github-runtime@715c25b40ccc0df9b62bfa8be3ccc57d09dbc4b1
981+ #
982+ # - name: Download OCI tarball of the built image.
983+ # uses: actions/download-artifact@v4
984+ # with:
985+ # name: container-image-tarball-${{ matrix.variant.image_type }}-${{ inputs.builder_name }}
986+ # path: /tmp/image_tarball
987+ #
988+ # - name: Build test image
989+ # env:
990+ # USE_GHA_CACHE: "1"
991+ # CACHE_VERSION: ${{ inputs.cache_version }}
992+ # run: |
993+ # python3 tests/end_to_end_tests/container_images_test/scripts/build_test_image.py \
994+ # --image-builder-name ${{ inputs.builder_name }} \
995+ # --base-image ${{ inputs.base_image }} \
996+ # --architecture x86_64 \
997+ # --image-oci-tarball /tmp/image_tarball/${{ matrix.variant.image_type }}-${{ inputs.builder_name }}.tar \
998+ # --result-image-name ${{ matrix.variant.image_type }}-${{ inputs.builder_name }}:test \
999+ # --image-type ${{ matrix.variant.image_type }}
1000+ #
1001+ # - name: Run Tests (with coverage)
1002+ # env:
1003+ # CIRCLE_BUILD_NUM: ${{ github.run_number }}
1004+ # SCALYR_SERVER: https://agent.scalyr.com
1005+ # SCALYR_API_KEY: ${{ secrets.CT_SCALYR_TOKEN_PROD_US_CLOUDTECH_TESTING_WRITE }}
1006+ # READ_API_KEY: ${{ secrets.CT_SCALYR_TOKEN_PROD_US_CLOUDTECH_TESTING_READ }}
1007+ # run: |
1008+ # source ./.circleci/smoketest_docker.sh scalyr/scalyr-agent-ci-unittest:4 ${{ matrix.variant.image_type }} ${{ matrix.variant.timeout }} ${{ matrix.variant.image_type }}-${{ inputs.builder_name }}:test
1009+ #
1010+ # - name: Upload test results
1011+ # uses: actions/upload-artifact@v4
1012+ # with:
1013+ # name: docker-smoketest-${{ matrix.variant.image_type }}-${{ inputs.builder_name }}
1014+ # path: |
1015+ # .coverage
1016+ # if: ${{ success() || failure() }}
1017+ #
1018+ # - name: Notify Slack on Failure
1019+ # if: ${{ failure() && github.ref_name == 'master' }}
1020+ # uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f # v2.0.0
1021+ # env:
1022+ # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
1023+ # with:
1024+ # status: ${{ job.status }}
1025+ # steps: ${{ toJson(steps) }}
1026+ # channel: '#eng-dataset-cloud-tech'
10251027
10261028 publish_images :
10271029 name : Publish image ${{ matrix.variant.image_type }}-${{ inputs.builder_name }}
0 commit comments