ci: move jobs to integration
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
new file mode 100644
index 0000000..d168611
--- /dev/null
+++ b/.github/workflows/integration.yml
@@ -0,0 +1,63 @@
+name: integration
+
+concurrency:
+ group: ${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
+on:
+ pull_request:
+ types:
+ - opened
+ - synchronize
+ - reopened
+ paths:
+ - .github/workflows/integration.yml
+ - molecule/**
+ - playbooks/**
+ - plugins/**
+ - roles/**
+ push:
+ branches:
+ - main
+ paths:
+ - .github/workflows/integration.yml
+ - molecule/**
+ - playbooks/**
+ - plugins/**
+ - roles/**
+
+jobs:
+ molecule:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout project
+ uses: actions/checkout@v3.0.2
+
+ - name: Set up Go
+ uses: actions/setup-go@v3.3.0
+ with:
+ go-version-file: go.mod
+ cache: true
+
+ - name: Clean-up stale stacks
+ run: go run ./cmd/atmosphere-ci molecule cleanup
+ env:
+ OS_AUTH_URL: https://auth.vexxhost.net/v3
+ OS_REGION_NAME: ca-ymq-1
+ OS_USER_DOMAIN_NAME: Default
+ OS_USERNAME: ${{ secrets.OS_USERNAME }}
+ OS_PASSWORD: ${{ secrets.OS_PASSWORD }}
+ OS_PROJECT_DOMAIN_NAME: Default
+ OS_PROJECT_NAME: ${{ secrets.OS_PROJECT_NAME }}
+
+ - uses: gofrolist/molecule-action@v2.2.40
+ timeout-minutes: 90
+ env:
+ ATMOSPHERE_STACK_NAME: "atmosphere-${{ github.run_id }}-${{ github.run_attempt }}"
+ OS_AUTH_URL: https://auth.vexxhost.net/v3
+ OS_REGION_NAME: ca-ymq-1
+ OS_USER_DOMAIN_NAME: Default
+ OS_USERNAME: ${{ secrets.OS_USERNAME }}
+ OS_PASSWORD: ${{ secrets.OS_PASSWORD }}
+ OS_PROJECT_DOMAIN_NAME: Default
+ OS_PROJECT_NAME: ${{ secrets.OS_PROJECT_NAME }}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 7fb430a..e40395e 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -6,76 +6,37 @@
cancel-in-progress: true
jobs:
- # build-prometheus-ethtool-exporter:
- # runs-on: ubuntu-latest
- # steps:
- # - uses: actions/checkout@v3.0.2
- # with:
- # fetch-depth: 0
- # - uses: tj-actions/changed-files@v29.0.2
- # id: changed-files
- # with:
- # files: images/prometheus-ethtool-exporter/*
- # - uses: docker/setup-qemu-action@v2.0.0
- # if: steps.changed-files.outputs.any_changed == 'true'
- # - uses: docker/setup-buildx-action@v2.0.0
- # if: steps.changed-files.outputs.any_changed == 'true'
- # - run: echo PROJECT_REF=$(cat images/prometheus-ethtool-exporter/ref) >> $GITHUB_ENV
- # if: steps.changed-files.outputs.any_changed == 'true'
- # - uses: docker/login-action@v2.0.0
- # if: steps.changed-files.outputs.any_changed == 'true'
- # with:
- # registry: quay.io
- # username: ${{ secrets.QUAY_USERNAME }}
- # password: ${{ secrets.QUAY_ROBOT_TOKEN }}
- # - uses: docker/build-push-action@v3.1.1
- # if: steps.changed-files.outputs.any_changed == 'true'
- # with:
- # context: images/prometheus-ethtool-exporter
- # cache-from: type=gha,scope=prometheus-ethtool-exporter
- # cache-to: type=gha,mode=max,scope=prometheus-ethtool-exporter
- # platforms: linux/amd64,linux/arm64
- # push: true
- # build-args: |
- # PROJECT_REF=${{ env.PROJECT_REF }}
- # tags: |
- # quay.io/vexxhost/ethtool-exporter:${{ env.PROJECT_REF }}
-
- molecule:
+ build-prometheus-ethtool-exporter:
runs-on: ubuntu-latest
- # needs:
- # - build-prometheus-ethtool-exporter
- # - build-openstack-images
steps:
- - name: Checkout project
- uses: actions/checkout@v3.0.2
-
- - name: Set up Go
- uses: actions/setup-go@v3.3.0
+ - uses: actions/checkout@v3.0.2
with:
- go-version-file: go.mod
- cache: true
-
- - name: Clean-up stale stacks
- run: go run ./cmd/atmosphere-ci molecule cleanup
- env:
- OS_AUTH_URL: https://auth.vexxhost.net/v3
- OS_REGION_NAME: ca-ymq-1
- OS_USER_DOMAIN_NAME: Default
- OS_USERNAME: ${{ secrets.OS_USERNAME }}
- OS_PASSWORD: ${{ secrets.OS_PASSWORD }}
- OS_PROJECT_DOMAIN_NAME: Default
- OS_PROJECT_NAME: ${{ secrets.OS_PROJECT_NAME }}
-
- - uses: gofrolist/molecule-action@v2.2.40
- timeout-minutes: 90
- env:
- ATMOSPHERE_STACK_NAME: "atmosphere-${{ github.run_id }}-${{ github.run_attempt }}"
- OS_AUTH_URL: https://auth.vexxhost.net/v3
- OS_REGION_NAME: ca-ymq-1
- OS_USER_DOMAIN_NAME: Default
- OS_USERNAME: ${{ secrets.OS_USERNAME }}
- OS_PASSWORD: ${{ secrets.OS_PASSWORD }}
- OS_PROJECT_DOMAIN_NAME: Default
- OS_PROJECT_NAME: ${{ secrets.OS_PROJECT_NAME }}
-
+ fetch-depth: 0
+ - uses: tj-actions/changed-files@v29.0.2
+ id: changed-files
+ with:
+ files: images/prometheus-ethtool-exporter/*
+ - uses: docker/setup-qemu-action@v2.0.0
+ if: steps.changed-files.outputs.any_changed == 'true'
+ - uses: docker/setup-buildx-action@v2.0.0
+ if: steps.changed-files.outputs.any_changed == 'true'
+ - run: echo PROJECT_REF=$(cat images/prometheus-ethtool-exporter/ref) >> $GITHUB_ENV
+ if: steps.changed-files.outputs.any_changed == 'true'
+ - uses: docker/login-action@v2.0.0
+ if: steps.changed-files.outputs.any_changed == 'true'
+ with:
+ registry: quay.io
+ username: ${{ secrets.QUAY_USERNAME }}
+ password: ${{ secrets.QUAY_ROBOT_TOKEN }}
+ - uses: docker/build-push-action@v3.1.1
+ if: steps.changed-files.outputs.any_changed == 'true'
+ with:
+ context: images/prometheus-ethtool-exporter
+ cache-from: type=gha,scope=prometheus-ethtool-exporter
+ cache-to: type=gha,mode=max,scope=prometheus-ethtool-exporter
+ platforms: linux/amd64,linux/arm64
+ push: true
+ build-args: |
+ PROJECT_REF=${{ env.PROJECT_REF }}
+ tags: |
+ quay.io/vexxhost/ethtool-exporter:${{ env.PROJECT_REF }}