diff --git a/.github/workflows/image-push.yml b/.github/workflows/image-push.yml new file mode 100644 index 0000000..368cc14 --- /dev/null +++ b/.github/workflows/image-push.yml @@ -0,0 +1,43 @@ +name: image-push + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.x + - name: Install dependencies + run: | + sudo pip install strato-skipper + mkdir -p ~/.docker + echo "{}" > ~/.docker/config.json + touch ${HOME}/.gitconfig + ln -s Dockerfile.bm-inventory Dockerfile + - name: build bm-inventory client + run: | + make create_inventory_client + - name: Get release version + id: get_version + run: echo ::set-env name=GIT_REVISION::$(echo ${GITHUB_SHA}) + - name: Publish test-infra to Registry + uses: elgohr/Publish-Docker-Github-Action@2.15 + with: + name: test-infra + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + REGISTRY: 'quay.io/ocpmetal' + dockerfile: "Dockerfile.test-infra" + buildargs: GIT_REVISION + tags: "ocpmetal,${{ env.GIT_REVISION }}" diff --git a/.gitignore b/.gitignore index f7373d8..480ef7e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ bm-inventory minikube *.log +**/RCS/** + diff --git a/Dockerfile.test-infra b/Dockerfile.test-infra index 0b38b4f..7b66d63 100644 --- a/Dockerfile.test-infra +++ b/Dockerfile.test-infra @@ -1,5 +1,7 @@ FROM centos:8 ENV container docker +ARG GIT_REVISION +LABEL "git_revision"=${GIT_REVISION} RUN yum -y install systemd make python3 virt-viewer virt-install libvirt-client git libvirt-devel gcc unzip wget jq && yum clean all; \ (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \