-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UBI Upgrade & Python39 & Add locks for Teems Data (#2693)
- Loading branch information
1 parent
c85a77d
commit a8aeea5
Showing
5 changed files
with
139 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# Starter pipeline | ||
# Start with a minimal pipeline that you can customize to build and deploy your code. | ||
# Add steps that build, run tests, deploy, and more: | ||
# https://aka.ms/yaml | ||
|
||
trigger: | ||
branches: | ||
include: | ||
- master | ||
tags: | ||
include: | ||
- v* | ||
|
||
pool: | ||
vmImage: 'ubuntu-latest' | ||
|
||
variables: | ||
imageName: 'f5networks/k8s-bigip-ctlr-devel' | ||
quayConnection: 'quay-bot' | ||
redhatConnection: 'redhat-bot' | ||
dockerConnection: 'docker-bot' | ||
scanConnection: 'cis-scan-bot' | ||
quay_path: 'quay.io/f5networks/k8s-bigip-ctlr-devel' | ||
redhat_prj_name: 'cntr-ingress-svcs' | ||
docker_repo: 'f5networks/k8s-bigip-ctlr' | ||
chartPath: 'incubator' | ||
chartRepoName: 'charts' | ||
chartOrganization: F5Networks | ||
helmVersion: 'v3.5.4' | ||
chartsUpdated: False | ||
operatorUpdated: False | ||
operatorImageName: 'f5networks/f5-cis-operator-devel' | ||
operatorBundleImageName: 'f5networks/f5-cis-operator-bundle-devel' | ||
operatorIndexImage: 'f5networks/f5-cis-operator-index-devel' | ||
|
||
stages: | ||
- stage: PreCheck | ||
jobs: | ||
- job: Preverification | ||
steps: | ||
- task: CmdLine@2 | ||
displayName: Check Go format and Suspicious constructs | ||
inputs: | ||
script: 'make verify' | ||
- stage: ContainerImage | ||
dependsOn: PreCheck | ||
jobs: | ||
- job: BuildContainerImage | ||
steps: | ||
- script: | | ||
echo "##vso[task.setvariable variable=BUILD_VERSION]$(cat next-version.txt)" | ||
displayName: Set CIS Version | ||
- task: Docker@2 | ||
displayName: Login to redhat registry | ||
inputs: | ||
command: login | ||
containerRegistry: $(redhatConnection) | ||
- task: Docker@2 | ||
displayName: Login to quay registry | ||
inputs: | ||
command: login | ||
containerRegistry: $(quayConnection) | ||
- task: Docker@2 | ||
displayName: Login to docker registry | ||
condition: startsWith(variables['build.sourceBranch'], 'refs/tags/') | ||
inputs: | ||
command: login | ||
containerRegistry: $(dockerConnection) | ||
- task: Docker@2 | ||
displayName: Login to scan registry | ||
condition: startsWith(variables['build.sourceBranch'], 'refs/tags/') | ||
inputs: | ||
command: login | ||
containerRegistry: $(scanConnection) | ||
- task: Docker@2 | ||
displayName: Build from Red Hat Universal Base Image | ||
inputs: | ||
command: build | ||
containerRegistry: $(quayConnection) | ||
repository: $(imageName) | ||
Dockerfile: build-tools/Dockerfile.ubi | ||
buildContext: . | ||
tags: $(Build.SourceVersion) | ||
arguments: "--build-arg BUILD_INFO=azure-$(Build.BuildId)-$(Build.SourceVersion) --build-arg BUILD_VERSION=$(BUILD_VERSION) --build-arg RUN_TESTS=$(RUN_TESTS) --build-arg COVERALLS_TOKEN=$(COVERALLS_TOKEN)" | ||
- task: Docker@2 | ||
displayName: Push image to Quay | ||
inputs: | ||
command: push | ||
containerRegistry: $(quayConnection) | ||
repository: $(imageName) | ||
tags: $(Build.SourceVersion) | ||
- script: | | ||
set -ex | ||
podman pull --authfile $(DOCKER_CONFIG)/config.json $(quay_path):$(Build.SourceVersion) | ||
podman tag $(quay_path):$(Build.SourceVersion) scan.connect.redhat.com/$(REDHAT_PRJ_ID)/$(redhat_prj_name):$(BUILD_VERSION)-ubi8 | ||
podman push --authfile $(DOCKER_CONFIG)/config.json scan.connect.redhat.com/$(REDHAT_PRJ_ID)/$(redhat_prj_name):$(BUILD_VERSION)-ubi8 | ||
condition: and(succeeded(), startsWith(variables['build.sourceBranch'], 'refs/tags/')) | ||
displayName: 'Push image to Redhat' | ||
continueOnError: true | ||
- script: | | ||
set -ex | ||
docker pull $(quay_path):$(Build.SourceVersion) | ||
docker tag $(quay_path):$(Build.SourceVersion) $(docker_repo):latest | ||
docker tag $(quay_path):$(Build.SourceVersion) $(docker_repo):$(BUILD_VERSION) | ||
patch_version=`echo $(BUILD_VERSION) | awk -F '.' '{print $3}'` | ||
if [ "${patch_version}" == "0" ] ; then | ||
stripped_version=`echo $(BUILD_VERSION) | rev | cut -c3- | rev` | ||
docker tag $(quay_path):$(Build.SourceVersion) $(docker_repo):${stripped_version} | ||
docker push $(docker_repo):${stripped_version} | ||
fi | ||
docker push $(docker_repo):latest | ||
docker push $(docker_repo):$(BUILD_VERSION) | ||
displayName: 'Push image to DockerHub' | ||
condition: startsWith(variables['build.sourceBranch'], 'refs/tags/') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.14.1 | ||
1.14.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters