Skip to content

Commit

Permalink
Update gitlab config file
Browse files Browse the repository at this point in the history
gitlab seems to require a .yml extension (not .yaml).

The actual syntax was also quite wrong.

And the image golang:1.20 does not need (nor contain 'sudo').

Signed-off-by: Marc Khouzam <[email protected]>
  • Loading branch information
marckhouzam authored and vuil committed May 3, 2023
1 parent ee05e1d commit 10dda4d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
21 changes: 0 additions & 21 deletions cmd/plugin/builder/template/plugintemplates/gitlab-ci.yaml.tmpl

This file was deleted.

20 changes: 20 additions & 0 deletions cmd/plugin/builder/template/plugintemplates/gitlab-ci.yml.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
default:
image: golang:1.20

stages:
- build

build-job:
stage: build
script:
- apt-get update
- apt-get install -y ca-certificates
- echo "deb https://storage.googleapis.com/tanzu-cli-os-packages/apt tanzu-cli-jessie main" | tee /etc/apt/sources.list.d/tanzu.list
- apt-get update --allow-insecure-repositories
- apt-get install -y tanzu-cli --allow-unauthenticated
- tanzu ceip-participation set false
- tanzu version
- tanzu plugin install builder
- make plugin-build-install-local
- make test
- make lint
2 changes: 1 addition & 1 deletion cmd/plugin/builder/template/plugintemplates/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ var GithubWorkflowBuild string

// GitlabCI contains the Gitlab CI template
//
//go:embed gitlab-ci.yaml.tmpl
//go:embed gitlab-ci.yml.tmpl
var GitlabCI string
2 changes: 1 addition & 1 deletion cmd/plugin/builder/template/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var GitIgnore = Target{

// GitLabCI target
var GitLabCI = Target{
Filepath: ".gitlab-ci.yaml",
Filepath: ".gitlab-ci.yml",
Template: plugintemplates.GitlabCI,
}

Expand Down

0 comments on commit 10dda4d

Please sign in to comment.