diff --git a/.github/workflows/staging-build-docker-temp.yml b/.github/workflows/staging-build-docker-temp.yml new file mode 100644 index 000000000..cfbf18ef9 --- /dev/null +++ b/.github/workflows/staging-build-docker-temp.yml @@ -0,0 +1,68 @@ +name: Build ES Docker + +on: + # schedule: + # - cron: '30 10 * * *' + repository_dispatch: + types: [staging-build-docker-temp] + push: + branches: [jmazanec15:knn-docker-build-fix] + +jobs: + build-es-docker: + strategy: + matrix: + java: [14] + name: Build ES Docker + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v1 + + - name: Configure AWS + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + + - name: Set Up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + + - name: Starting ES Docker Build + env: + DOCKER_USER: ${{ secrets.DOCKER_USER }} + DOCKER_PASS: ${{ secrets.DOCKER_PASS }} + run: | + echo "Executing On-demand Build for ES Docker Image" + ODFE_VER=`./bin/version-info --od` + echo "ODFE VERSION $ODFE_VER" + workdir=`pwd` + sudo apt-get install python-virtualenv + ./download_plugins.sh + cd elasticsearch + security=`ls docker/build/elasticsearch/plugins/|grep opendistro_security|wc -l` + + if [ $security -gt 0 ] + then + echo "Security plugin is available" + else + echo "Security plugin is NOT available" + fi + + cd docker + make build + + echo "******************************" + echo "Login to Docker" + echo "******************************" + docker login --username $DOCKER_USER --password $DOCKER_PASS + docker images|grep "amazon/opendistro-for-elasticsearch" > docker_id.out + image_id=`awk -F ' ' '{print $3}' docker_id.out` + DOCKER_NAME=odfe-test-$ODFE_VER + echo "Docker Id is $image_id" + docker tag $image_id opendistroforelasticsearch/opendistroforelasticsearch:$ODFE_VER + docker images + +