diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..10a5fd2 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,45 @@ +# 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: +- master + +pool: + vmImage: ubuntu-latest + +steps: + +- script: | + sudo apt update + sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev + wget https://www.python.org/ftp/python/3.11.9/Python-3.11.9.tgz + tar -xf Python-3.11.9.tgz + cd Python-3.11.9 + ./configure --enable-optimizations + sudo make altinstall + python3.11 -m venv oracle-cli + source oracle-cli/bin/activate + wget https://github.com/oracle/oci-cli/releases/download/v3.40.0/oci-cli-3.40.0.zip + unzip oci-cli-3.40.0.zip + cd oci-cli + pip install oci_cli-*-py2.py3-none-any.whl + + ##sudo bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)" + + mkdir /home/vsts/.oci + echo '[DEFAULT]' >> /home/vsts/.oci/config + echo 'user=ocid1.user.oc1..aaaaaaaa5qt6x2bhe3pqawphnt75xtdpmntisfgxeizqsol4f3kxmlcmphda' >> /home/vsts/.oci/config + echo 'fingerprint=34:36:4e:62:0c:c3:1f:80:5b:b0:18:80:d5:e9:73:1c' >> /home/vsts/.oci/config + echo 'key_file=/home/vsts/.oci/oci_api_key.pem' >> /home/vsts/.oci/config + echo 'tenancy=ocid1.tenancy.oc1..aaaaaaaarmf64ufoolro2kzrupzyazqycjapqsyacn7rju64jyw4zbyb6j6q' >> /home/vsts/.oci/config + echo 'region=us-ashburn-1' >> /home/vsts/.oci/config + + cd /home/vsts/.oci/ + wget -O oci_api_key.pem https://www.dropbox.com/scl/fi/3yjruq1imww3nkzvgby4v/oci_api_key.pem + + sudo chmod 600 /home/vsts/.oci/oci_api_key.pem + oci resource-manager job create-destroy-job --execution-plan-strategy AUTO_APPROVED --stack-id ocid1.ormstack.oc1.iad.amaaaaaaihuwreyaoaanscej56cowg2smdsrt5esdpz4uq7otrbyenyrnz7a + + displayName: 'Destroying Terraform Resource Manager Stack' \ No newline at end of file