Skip to content
Snippets Groups Projects
Commit b526f465 authored by Manuel Kieweg's avatar Manuel Kieweg
Browse files

Merge branch 'nightly' into 'master'

move go version to 1.16 and change check for absence of $CI_NIGHTLY

See merge request cocsn/gosdn!142
parents 7355ac97 04ff7299
No related branches found
No related tags found
No related merge requests found
Pipeline #68168 passed
FROM golang:1.15-buster AS builder FROM golang:1.16-buster AS builder
ARG GITLAB_USER ARG GITLAB_USER
ARG GITLAB_TOKEN ARG GITLAB_TOKEN
ARG BUILDARGS ARG BUILDARGS
......
...@@ -30,7 +30,7 @@ build:develop: ...@@ -30,7 +30,7 @@ build:develop:
TAG: $CI_REGISTRY_IMAGE:develop TAG: $CI_REGISTRY_IMAGE:develop
BUILDARGS: -race BUILDARGS: -race
rules: rules:
- if: $CI_COMMIT_BRANCH == "develop" - if: $CI_COMMIT_BRANCH == "develop" && $CI_NIGHTLY == null
<<: *build <<: *build
build:nightly:develop: build:nightly:develop:
...@@ -60,5 +60,5 @@ build:latest: ...@@ -60,5 +60,5 @@ build:latest:
variables: variables:
TAG: $CI_REGISTRY_IMAGE:latest TAG: $CI_REGISTRY_IMAGE:latest
rules: rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_NIGHTLY == null
<<: *build <<: *build
\ No newline at end of file
...@@ -40,7 +40,7 @@ deploy:develop: ...@@ -40,7 +40,7 @@ deploy:develop:
- job: "build:k8s-bot" - job: "build:k8s-bot"
artifacts: true artifacts: true
rules: rules:
- if: $CI_COMMIT_BRANCH == "develop" - if: $CI_COMMIT_BRANCH == "develop" && $CI_NIGHTLY == null
deploy:latest: deploy:latest:
<<: *deploy <<: *deploy
...@@ -50,7 +50,7 @@ deploy:latest: ...@@ -50,7 +50,7 @@ deploy:latest:
- job: "build:k8s-bot" - job: "build:k8s-bot"
artifacts: true artifacts: true
rules: rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_NIGHTLY == "" - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_NIGHTLY == null
deploy:nightly:mainline: deploy:nightly:mainline:
<<: *deploy <<: *deploy
......
...@@ -26,6 +26,7 @@ cache: ...@@ -26,6 +26,7 @@ cache:
TF_VAR_container_tag: $CI_REGISTRY_IMAGE:merge-request TF_VAR_container_tag: $CI_REGISTRY_IMAGE:merge-request
- if: $CI_COMMIT_BRANCH == "integration-test" - if: $CI_COMMIT_BRANCH == "integration-test"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_NIGHTLY
init: init:
stage: .pre stage: .pre
......
integration-test: integration-test:
image: golang:1.14 image: golang:1.16
stage: integration-test stage: integration-test
needs: needs:
- job: "apply" - job: "apply"
...@@ -8,6 +8,9 @@ integration-test: ...@@ -8,6 +8,9 @@ integration-test:
GOSDN_LOG: "nolog" GOSDN_LOG: "nolog"
GOSDN_TEST_API_ENDPOINT: http://gosdn-$CI_COMMIT_SHA.apps.ocp.fbi.h-da.de/api GOSDN_TEST_API_ENDPOINT: http://gosdn-$CI_COMMIT_SHA.apps.ocp.fbi.h-da.de/api
rules: rules:
- if: $CI_NIGHTLY
when: delayed
start_in: 2 minutes
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH - if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
when: delayed when: delayed
start_in: 2 minutes start_in: 2 minutes
...@@ -19,13 +22,14 @@ integration-test: ...@@ -19,13 +22,14 @@ integration-test:
- go test -race ./test/integration -v -coverprofile=coverage.out - go test -race ./test/integration -v -coverprofile=coverage.out
.test: &test .test: &test
image: golang:1.14 image: golang:1.16
stage: test stage: test
allow_failure: true allow_failure: true
variables: variables:
GOSDN_LOG: "nolog" GOSDN_LOG: "nolog"
rules: rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH - if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
- if: $CI_NIGHTLY
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
allow_failure: true allow_failure: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment