From 36bdeb3faa8bcacb358dd5a8ab7916fdf4347e9c Mon Sep 17 00:00:00 2001 From: linwenxiang <991154416@qq.com> Date: Tue, 6 Apr 2021 18:09:23 +0800 Subject: [PATCH 1/3] =?UTF-8?q?ci=20:green=5Fheart:=20=E4=BF=AE=E6=94=B9k8?= =?UTF-8?q?s=20yaml=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/.drone.yml | 25 ------------------------- scripts/k8s/deploy.yml | 13 +------------ 2 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 scripts/.drone.yml diff --git a/scripts/.drone.yml b/scripts/.drone.yml deleted file mode 100644 index 0bbe6bd..0000000 --- a/scripts/.drone.yml +++ /dev/null @@ -1,25 +0,0 @@ -kind: pipeline -type: kubernetes -name: drone -steps: - - name: cmd - image: alpine - commands: - - sed -i 's/DRONE_COMMIT/${DRONE_COMMIT}/g' scripts/k8s/deploy.yml - - name: docker - image: plugins/docker - settings: - username: - from_secret: username - password: - from_secret: password - repo: registry.cn-shanghai.aliyuncs.com/go-admin-team/go-admin - tags: v1.2.2 - registry: registry.cn-shanghai.aliyuncs.com - - name: dron8s - image: bh90210/dron8s:latest - settings: - yaml: - - ./scripts/k8s/deploy.yml - kubeconfig: - from_secret: kubeconfig diff --git a/scripts/k8s/deploy.yml b/scripts/k8s/deploy.yml index f69d7e4..4a8d16b 100644 --- a/scripts/k8s/deploy.yml +++ b/scripts/k8s/deploy.yml @@ -15,14 +15,6 @@ spec: selector: app: go-admin --- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: go-admin-go-admin - namespace: go-admin - labels: - account: go-admin ---- apiVersion: apps/v1 kind: Deployment metadata: @@ -46,7 +38,7 @@ spec: serviceAccountName: go-admin-go-admin containers: - name: go-admin - image: registry.cn-shanghai.aliyuncs.com/go-admin-team/go-admin:v1.2.2 + image: ${IMAGE} ports: - containerPort: 8000 volumeMounts: @@ -57,9 +49,6 @@ spec: - name: go-admin-config mountPath: /config/ readOnly: true - env: - - name: COMMIT_TAG - value: "DRONE_COMMIT" volumes: - name: go-admin persistentVolumeClaim: From f21de0706a039bad399152c0080eaa5098498ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serhat=20=C5=9Eevki=20Din=C3=A7er?= Date: Mon, 12 Apr 2021 15:44:02 +0300 Subject: [PATCH 2/3] Create codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 67 +++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..b4ec574 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,67 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '15 21 * * 3' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + language: [ 'go' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 From cfd284e42e6568cf9fae928bcb199269cf4dd8e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serhat=20=C5=9Eevki=20Din=C3=A7er?= Date: Tue, 13 Apr 2021 00:01:00 +0300 Subject: [PATCH 3/3] rm schedule from codeql --- .github/workflows/codeql-analysis.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b4ec574..2e08b34 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,14 +1,3 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# name: "CodeQL" on: @@ -17,8 +6,6 @@ on: pull_request: # The branches below must be a subset of the branches above branches: [ master ] - schedule: - - cron: '15 21 * * 3' jobs: analyze: @@ -29,9 +16,6 @@ jobs: fail-fast: false matrix: language: [ 'go' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed steps: - name: Checkout repository