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

Migrate from CircleCI to Github Actions #324

Merged
merged 42 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
936e3e4
Migrate from CircleCI to Github Actions
spirosoik Dec 15, 2022
fc31df4
[fix] Remove CircleCI
spirosoik Dec 15, 2022
8b77710
[fix] exclude vendor from lint
spirosoik Dec 16, 2022
377df79
[fix] golang version to 1.19
spirosoik Dec 16, 2022
a45854b
Use custom GOPATH in github actions (#328)
fmartingr Dec 24, 2022
266727e
Merge branch 'master' into feat/CLD-4711
mattermost-build Jan 12, 2023
bb36932
[fix] kind cluster wait to be created
spirosoik Jan 13, 2023
47e049d
Merge branch 'master' into feat/CLD-4711
mattermost-build Jan 19, 2023
0555abe
[fix] go cache dependency path
spirosoik Jan 19, 2023
4b8b896
[fix] update kind verson and k8s
spirosoik Jan 27, 2023
740b0fb
Merge branch 'master' into feat/CLD-4711
mattermost-build Jan 27, 2023
490936f
fix(ci): Add patch for MySQL operator on steup_test.sh
toninis Feb 2, 2023
7dd0d34
test: Add temp SSH session for debug
toninis Feb 8, 2023
7323c97
Merge branch 'master' into feat/CLD-4711
mattermost-build Feb 8, 2023
d33e66a
fixed fatal: detected dubious ownership issue with git checkout
toninis Feb 8, 2023
ebada40
test on local runners
toninis Feb 9, 2023
9c72d3e
upgrade percona to 5.7.35
toninis Feb 9, 2023
e893fe2
test in mac since I am now desperate
toninis Feb 9, 2023
470b5a8
try ubuntu-20.04
toninis Feb 9, 2023
207773e
test kind cluster from github actions
toninis Feb 9, 2023
a6b5856
1.24 k8s version
toninis Feb 9, 2023
5314f21
upgrade mysql-operator and use helm
toninis Feb 9, 2023
9eda10b
test with Percona 8.0
toninis Feb 14, 2023
a030ca5
remove upterm
toninis Feb 14, 2023
7ef02b6
add commented out tests
toninis Feb 14, 2023
02679f7
Merge branch 'master' into feat/CLD-4711
mattermost-build Feb 15, 2023
9f60236
test CVE upload results
toninis Feb 15, 2023
f427c7c
Update .github/workflows/ci.yml
spirosoik Feb 15, 2023
a9328f9
Update .github/workflows/cd.yml
spirosoik Feb 15, 2023
21c66f6
naming convention . Trivy fix
toninis Feb 15, 2023
4c1fde9
fix docker login
toninis Feb 15, 2023
52d89d2
fix sarif output
toninis Feb 15, 2023
8c12468
continue on error for now for trivy results
toninis Feb 15, 2023
d50c28d
always upload since there is no failure for now
toninis Feb 15, 2023
b8c1879
allow specifying a mysql database version
fmartingr Feb 15, 2023
706bd12
Set mysql version only for mysql database type
fmartingr Feb 15, 2023
6efdb33
ignore trivy result
fmartingr Mar 1, 2023
fa52f48
Merge remote-tracking branch 'origin/master' into feat/CLD-4711
fmartingr Mar 2, 2023
ad1302b
checking lesser retry interval
fmartingr Mar 2, 2023
7a9ef97
even longer...?
fmartingr Mar 2, 2023
83df8c3
try running in 4core machine
fmartingr Mar 7, 2023
4fec13f
Merge remote-tracking branch 'origin/master' into feat/CLD-4711
fmartingr Mar 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ all: generate check-style unittest build
unittest: ## Runs unit tests
$(GO) test -mod=vendor $(GO_LINKER_FLAGS) $(TEST_PACKAGES) -v -covermode=count -coverprofile=coverage.out

e2e-local:
./test/e2e_local.sh

goverall: $(GOVERALLS_GEN) ## Runs goveralls
$(GOVERALLS_GEN) -coverprofile=coverage.out -service=circle-ci -repotoken ${COVERALLS_REPO_TOKEN} || true

Expand Down
3 changes: 3 additions & 0 deletions apis/mattermost/v1alpha1/clusterinstallation_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ type Database struct {
// Defines the secret to be used when performing a database restore.
// +optional
BackupRestoreSecretName string `json:"backupRestoreSecretName,omitempty"`
// Defines the cluster version for the database to use
// +optional
Version string `json:"version,omitempty"`
fmartingr marked this conversation as resolved.
Show resolved Hide resolved
}

// ElasticSearch defines the ElasticSearch configuration for a ClusterInstallation.
Expand Down
6 changes: 6 additions & 0 deletions apis/mattermost/v1alpha1/clusterinstallation_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ const (
DefaultStorageSize = "50Gi"
// DefaultPullPolicy is ifNotPresent
DefaultPullPolicy = corev1.PullIfNotPresent
// DefaultDatabaseVersion
// /~https://github.com/bitpoke/mysql-operator/blob/master/pkg/util/constants/constants.go#L87
DefaultDatabaseVersion = "8.0"

// ClusterLabel is the label applied across all compoments
ClusterLabel = "v1alpha1.mattermost.com/installation"
Expand Down Expand Up @@ -141,6 +144,9 @@ func (db *Database) SetDefaults() {
if db.StorageSize == "" {
db.StorageSize = DefaultStorageSize
}
if db.Version == "" {
db.Version = DefaultDatabaseVersion
mirshahriar marked this conversation as resolved.
Show resolved Hide resolved
}
}

// getDeploymentContainerByName gets container from a deployment by name
Expand Down
3 changes: 3 additions & 0 deletions apis/mattermost/v1beta1/db_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ func (omd *OperatorManagedDatabase) SetDefaults() {
if omd.StorageSize == "" {
omd.StorageSize = DefaultStorageSize
}
if omd.Version == "" {
omd.Version = DefaultDatabaseVersion
}
}

func (db *Database) SetDefaultReplicasAndResources() {
Expand Down
3 changes: 3 additions & 0 deletions apis/mattermost/v1beta1/mattermost_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,9 @@ type OperatorManagedDatabase struct {
// Defines the secret to be used when performing a database restore.
// +optional
BackupRestoreSecretName string `json:"backupRestoreSecretName,omitempty"`
// Defines the cluster version for the database to use
// +optional
Version string `json:"version,omitempty"`
}

// FileStore defines the file store configuration for Mattermost.
Expand Down
2 changes: 2 additions & 0 deletions apis/mattermost/v1beta1/mattermost_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ const (
DefaultPullPolicy = corev1.PullIfNotPresent
// DefaultLocalFilePath is the default file path used with local (PVC) storage
DefaultLocalFilePath = "/mattermost/data"
// DefaultDatabaseVersion
DefaultDatabaseVersion = "8.0"

// ClusterLabel is the label applied across all components
ClusterLabel = "installation.mattermost.com/installation"
Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/installation.mattermost.com_mattermosts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ spec:
description: Defines the type of database to use for an Operator-Managed
database.
type: string
version:
description: Defines the cluster version for the database
to use
type: string
type: object
type: object
deploymentTemplate:
Expand Down
3 changes: 3 additions & 0 deletions config/crd/bases/mattermost.com_clusterinstallations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,9 @@ spec:
description: Defines the type of database to use for an Operator-Managed
database. This value is ignored when using a User-Managed database.
type: string
version:
description: Defines the cluster version for the database to use
type: string
type: object
elasticSearch:
description: ElasticSearch defines the ElasticSearch configuration
Expand Down
1 change: 1 addition & 0 deletions controllers/mattermost/clusterinstallation/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ func convertToOperatorManagedDB(ci *mattermostv1alpha1.ClusterInstallation) matt
BackupRemoteDeletePolicy: ci.Spec.Database.BackupRemoteDeletePolicy,
BackupSecretName: ci.Spec.Database.BackupSecretName,
BackupRestoreSecretName: ci.Spec.Database.BackupRestoreSecretName,
Version: ci.Spec.Database.Version,
},
}
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/components/mysql/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func Cluster(mattermost *mattermostv1alpha1.ClusterInstallation) *mysqlOperator.
},
},
Spec: mysqlOperator.MysqlClusterSpec{
MysqlVersion: "8.0",
MysqlVersion: mattermost.Spec.Database.Version,
Replicas: utils.NewInt32(mattermost.Spec.Database.Replicas),
SecretName: DefaultDatabaseSecretName(mattermost.Name),
VolumeSpec: mysqlOperator.VolumeSpec{
Expand Down Expand Up @@ -79,7 +79,7 @@ func ClusterV1Beta(mattermost *mmv1beta.Mattermost) *mysqlOperator.MysqlCluster
OwnerReferences: mattermostApp.MattermostOwnerReference(mattermost),
},
Spec: mysqlOperator.MysqlClusterSpec{
MysqlVersion: "8.0",
MysqlVersion: mattermost.Spec.Database.OperatorManaged.Version,
Replicas: mattermost.Spec.Database.OperatorManaged.Replicas,
SecretName: DefaultDatabaseSecretName(mattermost.Name),
VolumeSpec: mysqlOperator.VolumeSpec{
Expand Down