Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug/sysdig-teams #700

Merged
merged 37 commits into from Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
aa76ef1
test gh-actions
stewartshea Jul 13, 2020
518e736
added name
stewartshea Jul 13, 2020
23ac36a
update workflow
stewartshea Jul 13, 2020
d0d9627
test update to actions
stewartshea Jul 13, 2020
9096a3d
update workflow
stewartshea Jul 13, 2020
06151d7
syntax fix
stewartshea Jul 13, 2020
131917d
add runs-on
stewartshea Jul 13, 2020
a427c20
update path
stewartshea Jul 13, 2020
7c52411
update workflow with branch
stewartshea Jul 13, 2020
2120d05
fix typo
stewartshea Jul 13, 2020
aeb5caa
update openshift action definition
stewartshea Jul 13, 2020
84033b0
test workflow mod
stewartshea Jul 13, 2020
77cfe50
update workflow
stewartshea Jul 13, 2020
dc45846
fix secret ref
stewartshea Jul 14, 2020
78dbb0f
update workflow
stewartshea Jul 14, 2020
903a7af
change workflow version
stewartshea Jul 14, 2020
4c329dd
mv dockerfile to root of operator
stewartshea Jul 14, 2020
c91d7b8
update workflow
stewartshea Jul 14, 2020
4c56058
dummy tax
stewartshea Jul 14, 2020
2c43ee7
double dummy tax
stewartshea Jul 14, 2020
7129537
test new branch ref
stewartshea Jul 14, 2020
3feae63
test new branchref idea
stewartshea Jul 14, 2020
88f9449
fixup final command
stewartshea Jul 14, 2020
8d8bd5e
change build name and image in manifest
stewartshea Jul 14, 2020
10f80f4
update actions path
stewartshea Jul 14, 2020
c95a6f0
add lab build and change pathfinder build. Fix playbook
stewartshea Jul 14, 2020
164e174
update lab build pipeline
stewartshea Jul 14, 2020
21ad80b
update build pipelin
stewartshea Jul 14, 2020
fb93efb
update github actions path
stewartshea Jul 14, 2020
e19773b
test path kick
stewartshea Jul 14, 2020
9dd0142
add workflows to path
stewartshea Jul 14, 2020
78e2295
remove wildcard from actions
stewartshea Jul 14, 2020
99a589a
debugging actions filter
stewartshea Jul 14, 2020
1dd4bb1
still debugging actions filter
stewartshea Jul 14, 2020
a3d6f13
reduce delete scope in github actions
stewartshea Jul 14, 2020
82b2f87
debugging lab workflow
stewartshea Jul 14, 2020
591cb75
fix up wildcard
stewartshea Jul 14, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/sysdig-teams-operator-build-lab.yaml
@@ -0,0 +1,31 @@
name: sysdig-teams-operator-build-lab
on:
push:
branches:
- '**'
- '!master'
paths:
- 'monitoring/sysdig/operator/sysdig-monitor/**'
- '.github/workflows/**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get the current branch name
shell: bash
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
id: branchref
- uses: actions/checkout@v1
with:
ref: ${{ github.ref }}
- name: OpenShift Action
uses: redhat-developer/openshift-actions@v1.1
with:
version: '3.11.235'
openshift_server_url: ${{ secrets.LAB_SYSDIG_OPERATOR_OPENSHIFT_SERVER_URL }}
parameters: '{"apitoken": "${{ secrets.LAB_SYSDIG_OPERATOR_SA_TOKEN }}"}'
cmd: |
'project ${{ secrets.LAB_SYSDIG_OPERATOR_PROJECT }}'
'delete is,bc -l build=gh-actions'
'new-build https://github.com/BCDevOps/platform-services#${{ steps.branchref.outputs.branch }} --context-dir=monitoring/sysdig/operator/sysdig-monitor --name sysdig-monitor-operator -l build=gh-actions'
29 changes: 29 additions & 0 deletions .github/workflows/sysdig-teams-operator-build-pathfinder.yaml
@@ -0,0 +1,29 @@
name: sysdig-teams-operator-build-pathfinder
on:
push:
branches:
- 'master'
paths:
- 'monitoring/sysdig/operator/sysdig-monitor/**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get the current branch name
shell: bash
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
id: branchref
- uses: actions/checkout@v1
with:
ref: ${{ github.ref }}
- name: OpenShift Action
uses: redhat-developer/openshift-actions@v1.1
with:
version: '3.11.235'
openshift_server_url: ${{ secrets.SYSDIG_OPERATOR_OPENSHIFT_SERVER_URL }}
parameters: '{"apitoken": "${{ secrets.SYSDIG_OPERATOR_SA_TOKEN }}"}'
cmd: |
'project ${{ secrets.SYSDIG_OPERATOR_PROJECT }}'
'delete is,bc -l build=gh-actions'
'new-build https://github.com/BCDevOps/platform-services#${{ steps.branchref.outputs.branch }} --context-dir=monitoring/sysdig/operator/sysdig-monitor --name sysdig-monitor-operator -l build=gh-actions'
5 changes: 4 additions & 1 deletion monitoring/sysdig/operator/readme.md
Expand Up @@ -105,4 +105,7 @@ curl -H "Authorization: Bearer $SYSDIG_TOKEN" -X GET https://app.sysdigcloud.com
curl -H "Authorization: Bearer $SYSDIG_TOKEN" -X GET https://app.sysdigcloud.com/api/token/${USERNAME}/${TEAMID}
{"token":{"key":"key_value"}}
```
- [ref](https://raw.githubusercontent.com/draios/python-sdc-client/master/sdcclient/_common.py)
- [ref](https://raw.githubusercontent.com/draios/python-sdc-client/master/sdcclient/_common.py)

## Build Process
GitHub Actions will create a new clean build from whatever branch changes are pushed to. This should be replaced with a method by which the lab environment is tested prior to a simple deployment into production.
Expand Up @@ -20,15 +20,15 @@ spec:
- /tmp/ansible-operator/runner
- stdout
# Replace this with the built image name
image: quay.io/shea_stewart/sysdig-monitor:latest
image: docker-registry.default.svc:5000/devops-sysdig/sysdig-monitor-operator:latest
imagePullPolicy: "Always"
volumeMounts:
- mountPath: /tmp/ansible-operator/runner
name: runner
readOnly: true
- name: operator
# Replace this with the built image name
image: quay.io/shea_stewart/sysdig-monitor:latest
image: docker-registry.default.svc:5000/devops-sysdig/sysdig-monitor-operator:latest
imagePullPolicy: "Always"
command:
- /usr/local/bin/entrypoint
Expand Down
Expand Up @@ -24,3 +24,4 @@

# Add a default dashboard if the team is new
- include_tasks: set_default_dashboard.yml
when: team_exists == false
3 changes: 2 additions & 1 deletion monitoring/sysdig/operator/sysdig-monitor/watches.yaml
Expand Up @@ -6,4 +6,5 @@
playbook: /opt/ansible/configure_teams.yml
finalizer:
name: finalizer.ops.gov.bc.ca
playbook: /opt/ansible/delete_team.yml
playbook: /opt/ansible/delete_team.yml