Skip to content

Commit 6d24110

Browse files
author
Faiq Raza
committed
Use generic tokens for ssh and oci object storage
2 parents abe35c0 + c3e2733 commit 6d24110

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

.gitlab-ci.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,10 @@ predeploy:
5757
- dist/
5858
when: manual
5959
script:
60-
- git remote rm origin
61-
- mkdir ~/.ssh
62-
- echo $'Host * \n StrictHostKeyChecking=no' >> ~/.ssh/config
63-
- echo "$ID_RSA" | base64 -d >> ~/.ssh/id_rsa
64-
- chmod 600 ~/.ssh/id_rsa
65-
- git remote add origin git@gitlab-odx.oracledx.com:cloudnative/oci-grafana-plugin.git
66-
- git config --global user.email "faiq.raza@oracle.com"
67-
- git config --global user.name "faiqus"
68-
- git fetch
69-
- git checkout master
70-
- git reset --hard origin/master
60+
- git remote set-url origin https://faiqus:${CI_PUSH_TOKEN}@gitlab-odx.oracledx.com/cloudnative/oci-grafana-plugin.git
61+
- git config --global user.email "deploy@oracle.com"
62+
- git config --global user.name "deployboy"
63+
- git push --follow-tags origin test-branch-$CI_COMMIT_SHA
7164
- npm install
7265
- npm run bump
7366
- cat plugin.json | grep version | cut -d':' -f2 | xargs | cut -d, -f1 >> ./dist/VERSION
@@ -96,14 +89,9 @@ deploy:
9689
- echo "$OCI_PRIVATE_KEY" | base64 -d >> /root/.oci/oci_api_key.pem
9790
- echo "$OCI_PUBLIC_KEY" | base64 -d >> /root/.oci/oci_api_key_public.pem
9891
- echo "$OCI_CONFIG" | base64 -d >> /root/.oci/config
99-
- cat /root/.oci/config
10092
- oci setup repair-file-permissions --file /root/.oci/oci_api_key.pem
10193
- oci setup repair-file-permissions --file /root/.oci/oci_api_key_public.pem
10294
- oci setup repair-file-permissions --file /root/.oci/config
103-
- export HTTP_PROXY=http://www-proxy-hqdc.us.oracle.com:80
104-
- export HTTPS_PROXY=http://www-proxy-hqdc.us.oracle.com:80
105-
- export http_proxy=http://www-proxy-hqdc.us.oracle.com:80
106-
- export https_proxy=http://www-proxy-hqdc.us.oracle.com:80
107-
- oci os object put --force -ns oracle-cloudnative -bn Grafanaplugin --file plugin.tar --name plugin.tar --no-multipart --content-type tar --no-retry
95+
- oci os object put --force -ns oracle-cloudnative -bn Grafanaplugin --file plugin.tar --name plugin.tar-v$VERSION --no-multipart --content-type tar --no-retry
10896
- export PATH=/go/bin/:$PATH
10997
- ghr -u oracle -r oci-grafana-plugin "v$VERSION" plugin.tar

0 commit comments

Comments
 (0)