Env extension issue

i created an env extension endpoint:
‘use strict’;

const express = require(‘express’);
const morgan = require(‘morgan’);
const bodyParser = require(‘body-parser’);
// Constants
const PORT = 8080;
const HOST = ‘0.0.0.0’;

// App
const app = express();
app.use(morgan(‘combined’, {
skip: function (req, res) { return req.method === ‘GET’ || req.method === ‘get’ }
}));
app.use(bodyParser.json()) // for parsing application/json
app.use(bodyParser.urlencoded({ extended: true })) // for parsing application/x-www-form-urlencoded

app.get(‘/’, (req, res) => {
res.send(‘Success’)
});

app.post(‘/’, (req, res) => {
console.log("Request body here: ")
console.log(req.body)
res.status(200).json([
{
name: ‘AWS_X’,
data: ‘aws-x’,
mask: false
},
{
name: ‘AWS_Y’,
data: ‘aws-y’,
mask: true
}
])
});

app.listen(PORT, HOST)
console.log(Running on http://${HOST}:${PORT});

and setup the runner (aws cloudformation) with:
Environment:
- Name: DRONE_RPC_HOST
Value: !Ref DroneRpcHost
- Name: DRONE_RPC_PROTO
Value: !Ref DroneRpcProtocol
- Name: DRONE_RPC_SECRET
Value: !Ref DroneRpcSecret
- Name: DRONE_RUNNER_CAPACITY
Value: !Ref DroneRunnerCapacity
- Name: DRONE_RUNNER_NAME
Value: drone-runner
- Name: DRONE_ENV_PLUGIN_ENDPOINT
Value: !Ref DroneEnvPluginEndpoint
- Name: DRONE_ENV_PLUGIN_SKIP_VERIFY
Value: true
- Name: DRONE_TRACE
Value: true
- Name: DRONE_DEBUG
Value: true

but the env variables do not enjected into the pipeline, i tested them like this:
steps:

  • name: test
    commands:
  • env
  • echo $AWS_X

and get empty

could you help please
thanks

1 Like

Hey @Ahmad_Saleem Could you give us more information on what exactly is empty so we can assist?