Skip to content

Commit

Permalink
🚧 comment out k6 run
Browse files Browse the repository at this point in the history
  • Loading branch information
ff137 committed Dec 11, 2024
1 parent 1744523 commit 3575117
Showing 1 changed file with 78 additions and 78 deletions.
156 changes: 78 additions & 78 deletions .github/workflows/continuous-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1007,81 +1007,81 @@ jobs:
helm-version: ${{ env.HELM_VERSION }}
env:
IMAGE_TAG: ${{ needs.build.outputs.image_version }}
k6:
if: github.actor != 'dependabot[bot]' && github.event.pull_request.draft == false
name: K6
environment:
name: dev
needs:
- build
- deploy
permissions:
id-token: write
packages: write
runs-on: ubuntu-latest

timeout-minutes: 10

outputs:
image_version: ${{ steps.meta.outputs.version }}

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}

- name: Docker Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/xk6
tags: |
type=raw,value=latest,enable=${{ github.event.repository.default_branch == github.ref_name }}
type=sha,prefix=pr-${{ github.event.pull_request.number }}-,priority=601,enable=${{ github.event_name == 'pull_request' }}
type=sha,prefix={{branch}}-,priority=601,enable=${{ github.event_name == 'push' && github.ref_type == 'branch' }}
type=ref,event=branch,priority=600
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push Docker images
id: build_image
uses: docker/build-push-action@v6
with:
context: .
file: ./scripts/k6/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: |
type=gha,scope=build-xk6
type=registry,ref=ghcr.io/${{ github.repository_owner }}/xk6:latest
cache-to: type=gha,mode=max,scope=build-xk6

- name: Prepare output directory
run: mkdir -p ${{ github.workspace }}/scripts/k6/output && chmod 777 ${{ github.workspace }}/scripts/k6/output

- name: Run k6 tests
run: |
docker run --rm \
-v ${{ github.workspace }}/scripts/k6:/scripts \
-e CLIENT_ID=${{ secrets.CLIENT_ID }} \
-e GOVERNANCE_CLIENT_ID=${{ secrets.GOVERNANCE_CLIENT_ID }} \
-e CLIENT_SECRET=${{ secrets.CLIENT_SECRET }} \
-e GOVERNANCE_CLIENT_SECRET=${{ secrets.GOVERNANCE_CLIENT_SECRET }} \
-e CLOUDAPI_URL=${{ secrets.CLOUDAPI_URL }} \
-e OAUTH_ENDPOINT=${{ secrets.OAUTH_ENDPOINT }} \
-e GOVERNANCE_OAUTH_ENDPOINT=${{ secrets.GOVERNANCE_OAUTH_ENDPOINT }} \
--workdir /scripts \
--entrypoint /bin/sh \
ghcr.io/${{ github.repository_owner }}/xk6:${{ steps.meta.outputs.version }} \
/scripts/run_tests.sh
shell: bash
# k6:
# if: github.actor != 'dependabot[bot]' && github.event.pull_request.draft == false
# name: K6
# environment:
# name: dev
# needs:
# - build
# - deploy
# permissions:
# id-token: write
# packages: write
# runs-on: ubuntu-latest

# timeout-minutes: 10

# outputs:
# image_version: ${{ steps.meta.outputs.version }}

# steps:
# - name: Check out code
# uses: actions/checkout@v4

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3

# - uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ github.token }}

# - name: Docker Metadata
# id: meta
# uses: docker/metadata-action@v5
# with:
# images: ghcr.io/${{ github.repository_owner }}/xk6
# tags: |
# type=raw,value=latest,enable=${{ github.event.repository.default_branch == github.ref_name }}
# type=sha,prefix=pr-${{ github.event.pull_request.number }}-,priority=601,enable=${{ github.event_name == 'pull_request' }}
# type=sha,prefix={{branch}}-,priority=601,enable=${{ github.event_name == 'push' && github.ref_type == 'branch' }}
# type=ref,event=branch,priority=600
# type=ref,event=pr
# type=semver,pattern={{version}}
# type=semver,pattern={{major}}.{{minor}}

# - name: Build and push Docker images
# id: build_image
# uses: docker/build-push-action@v6
# with:
# context: .
# file: ./scripts/k6/Dockerfile
# push: true
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
# cache-from: |
# type=gha,scope=build-xk6
# type=registry,ref=ghcr.io/${{ github.repository_owner }}/xk6:latest
# cache-to: type=gha,mode=max,scope=build-xk6

# - name: Prepare output directory
# run: mkdir -p ${{ github.workspace }}/scripts/k6/output && chmod 777 ${{ github.workspace }}/scripts/k6/output

# - name: Run k6 tests
# run: |
# docker run --rm \
# -v ${{ github.workspace }}/scripts/k6:/scripts \
# -e CLIENT_ID=${{ secrets.CLIENT_ID }} \
# -e GOVERNANCE_CLIENT_ID=${{ secrets.GOVERNANCE_CLIENT_ID }} \
# -e CLIENT_SECRET=${{ secrets.CLIENT_SECRET }} \
# -e GOVERNANCE_CLIENT_SECRET=${{ secrets.GOVERNANCE_CLIENT_SECRET }} \
# -e CLOUDAPI_URL=${{ secrets.CLOUDAPI_URL }} \
# -e OAUTH_ENDPOINT=${{ secrets.OAUTH_ENDPOINT }} \
# -e GOVERNANCE_OAUTH_ENDPOINT=${{ secrets.GOVERNANCE_OAUTH_ENDPOINT }} \
# --workdir /scripts \
# --entrypoint /bin/sh \
# ghcr.io/${{ github.repository_owner }}/xk6:${{ steps.meta.outputs.version }} \
# /scripts/run_tests.sh
# shell: bash

0 comments on commit 3575117

Please sign in to comment.