forked from redhat-gpte-devopsautomation/nexus-operator-0.17
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·26 lines (23 loc) · 1.25 KB
/
build.sh
File metadata and controls
executable file
·26 lines (23 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# Update latest Roles
SDK_RELEASE=v0.9
MINOR_RELEASE=0
OCP_CLIENT_RELEASE=4.1.6
rm -rf roles
mkdir roles
git clone https://github.com/redhat-gpte-devopsautomation/ansible-operator-roles
cp -R ansible-operator-roles/roles/nexus-ocp ./roles
cp ansible-operator-roles/playbooks/nexus.yaml ./playbook.yml
rm -rf ansible-operator-roles
wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/${OCP_CLIENT_RELEASE}/openshift-client-linux-${OCP_CLIENT_RELEASE}.tar.gz
mkdir client
tar xzf openshift-client-linux-${OCP_CLIENT_RELEASE}.tar.gz -C client
rm -f openshift-client-linux-${OCP_CLIENT_RELEASE}.tar.gz
# Now build the Operator
operator-sdk build quay.io/gpte-devops-automation/nexus-operator:${SDK_RELEASE}.${MINOR_RELEASE}
docker tag quay.io/gpte-devops-automation/nexus-operator:${SDK_RELEASE}.${MINOR_RELEASE} quay.io/gpte-devops-automation/nexus-operator:latest
docker tag quay.io/gpte-devops-automation/nexus-operator:${SDK_RELEASE}.${MINOR_RELEASE} quay.io/gpte-devops-automation/nexus-operator:${SDK_RELEASE}
docker push quay.io/gpte-devops-automation/nexus-operator:${SDK_RELEASE}.${MINOR_RELEASE}
docker push quay.io/gpte-devops-automation/nexus-operator:${SDK_RELEASE}
docker push quay.io/gpte-devops-automation/nexus-operator:latest
rm -fr client