Skip to content

Commit

Permalink
add .gitlab-ci.yml crossplane-contrib#36
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Sushkov (teeverr) committed Jun 6, 2024
1 parent 040130a commit 2feef5a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@ stages:
.base:
image: tde-green-public-docker-local.artifactory.swisscom.com/go-with-up-cli:1.21.2-bookworm-0.19.2
variables:
KUBERNETES_CPU_REQUEST: "3"
KUBERNETES_CPU_LIMIT: "5"
KUBERNETES_MEMORY_REQUEST: "4Gi"
KUBERNETES_MEMORY_LIMIT: "4Gi"
GIT_SUBMODULE_STRATEGY: recursive
HTTPS_PROXY: http://server-proxy.corproot.net:8080
NO_PROXY: '127.0.0.1,localhost,code.swisscom.com,git.swisscom.com,artifactory.swisscom.com,bin.swisscom.com,icp.swisscom.com'
# GOPROXY: "https://artifactory.swisscom.com/artifactory/api/go/proxy-golang-go-virtual"
# GOFLAGS: '-buildvcs=false'
GOPROXY: "https://artifactory.swisscom.com/artifactory/api/go/proxy-golang-go-virtual"
GOFLAGS: '-buildvcs=false'
GOARCH: amd64
CGO_ENABLED: 0
GOOS: linux
script:
- mkdir -p $HOME/.docker && cat $DOCKER_CONFIG_JSON > $HOME/.docker/config.json
- git config --global --add safe.directory $CI_PROJECT_DIR
Expand All @@ -25,18 +32,12 @@ lint:
extends: .base
allow_failure: true
script:
- pwd
- make lint

build:
stage: build
extends: .base
variables:
GOARCH: amd64
CGO_ENABLED: 0
GOOS: linux
# GOPROXY: "https://artifactory.swisscom.com/artifactory/api/go/proxy-golang-go-virtual"
# GOFLAGS: '-buildvcs=false'
script:
- |
if [[ $CI_COMMIT_TAG =~ ^v?[0-9]{1,4}.[0-9]{1,4}.[0-9]{1,4}$ ]]; then
Expand All @@ -47,6 +48,6 @@ build:
BUILD_TYPE=development
fi
echo "this build classified as ${BUILD_TYPE} based on tag ${CI_COMMIT_TAG}"
- /go build -o provider-aws-linux-amd64 cmd/provider/main.go
- go build -o provider-aws-linux-amd64 cmd/provider/main.go
- /up xpkg build --package-root="." XPKG_EXAMPLES_DIR --examples-root="./examples" --output="./provider-aws.xpkg"
- /up xpkg publish ${DESTINATION_REGISTRY}/provider-aws:${CI_COMMIT_TAG} -f ./provider-aws.xpkg

0 comments on commit 2feef5a

Please sign in to comment.